Version information:
julia> Pkg.status()
Status `~/Dropbox (Personal)/Research/Code/julia-projects/DiffEvals/ZygoteMaster/Project.toml`
[ec485272] ArnoldiMethod v0.0.4
[14197337] GenericLinearAlgebra v0.1.0
using SCS | |
using MathOptInterface # MathOptInterface v0.9.6 | |
const MOI = MathOptInterface | |
const MOIU = MOI.Utilities | |
const MOIB = MOI.Bridges | |
function make_model(vector) | |
optimizer = SCS.Optimizer(verbose=false) | |
T = Float64 | |
model = MOIB.full_bridge_optimizer( |
function convert_test(file, prefix) | |
# handle start and end: | |
# delete @testset for... and final "end" | |
file_contents = read(file, String) | |
file_contents = replace(file_contents, r"\h*@testset.*for\ssolver.*\n" => "") | |
file_contents = lstrip(file_contents) | |
file_contents = file_contents[1:prevind(file_contents, first(findlast("end", file_contents)))] | |
file_contents = replace(file_contents, r"\n\h\h\h\h(.*)" => SubstitutionString("\n\\1")) | |
# handle special cases |
using Mosek | |
using SCS | |
import DSP: conv | |
using Convex | |
conv(x::AbstractVector, y::AbstractVector) = DSP.conv(x,y) | |
conv(x::Variable, y::AbstractVector) = Convex.conv(x,y) | |
conv(x::AbstractVector, y::Variable) = Convex.conv(x,y) | |
using Random | |
using SparseArrays |
# Adapted from | |
# https://uk.mathworks.com/matlabcentral/fileexchange/46794-simdiag-m | |
# which has the following license: | |
# Copyright (c) 2009, Christian B. Mendl | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# | |
# * Redistributions of source code must retain the above copyright notice, this |