Solve standard continuous relaxation of model in v0.19-alpha


#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). https://github.com/JuliaOpt/JuMP.jl/blob/4b04d34fac5af2494611d972c24095d3ecbc20e8/NEWS.md#version-0110-november-30-2015.

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?)


#2

There’s no one-liner for this anymore. I opened an issue to track the feature request: https://github.com/JuliaOpt/JuMP.jl/issues/1611. 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).