Skip to content

Instantly share code, notes, and snippets.

@blegat
Created May 28, 2019 15:28
Show Gist options
  • Save blegat/a86e8aa1ed9461b0b1c36ebc95fe770c to your computer and use it in GitHub Desktop.
Save blegat/a86e8aa1ed9461b0b1c36ebc95fe770c to your computer and use it in GitHub Desktop.
Julia compiler gets stuck compiling add_constraint, it is never called
using Pkg
pkg"add MathOptInterface#bl/socr"
using MathOptInterface
const MOI = MathOptInterface
const MOIU = MOI.Utilities
const MOIB = MOI.Bridges
MOIU.@model(NoRSOCModel, (), (),
(MOI.SecondOrderCone, MOI.PositiveSemidefiniteConeTriangle),
(), (), (), (),
(MOI.VectorAffineFunction,))
mock = MOIU.MockOptimizer(NoRSOCModel{Float64}());
bridged_mock = MOIB.LazyBridgeOptimizer(mock);
tQ = MOI.add_variables(bridged_mock, 4)
vov = MOI.VectorOfVariables(tQ)
println("Calling")
cX = MOI.add_constraint(bridged_mock, vov, MOI.RootDetConeTriangle(2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment