vtjeng
November 12, 2018, 1:18am
1
JuMP (up to 0.18.4
) allowed you to pass the keyword relaxation=True
to solve the standard relaxation of a model (for example, onw with integer constraints). JuMP.jl/NEWS.md at 4b04d34fac5af2494611d972c24095d3ecbc20e8 · jump-dev/JuMP.jl · GitHub .
Is it possible to do this in 0.19-alpha
using the optimize!
function? (Will this be supported some time in the final 0.19
release if it isn’t currently?)
There’s no one-liner for this anymore. I opened an issue to track the feature request: Feature request: solve relaxation · Issue #1611 · jump-dev/JuMP.jl · GitHub . However, I don’t consider it blocking for the 0.19 release.
You can achieve the same result in a generic way by querying all variables from the model (https://github.com/JuliaOpt/JuMP.jl/issues/1612 ) and manually setting and unsetting integrality constraints (i.e., is_integer
, set_integer
, unset_integer
, is_binary
, set_binary
, unset_binary
around https://github.com/JuliaOpt/JuMP.jl/blob/10878c9fd513036510c0402e9f01402ca5dc12b1/src/variables.jl#L461 ).