You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the plasmo solve.jl, the function function JuMP.optimize!(graph::OptiGraph,optimizer;kwargs...) always return an empty (nothing) status from the JuMP.optimize!(...) call. Using the JuMP.termination_status however does work as follows:
model = Plasmo.getmodel(optinode)
JuMP.set_optimizer(optinode,optimizer)
JuMP.optimize!(model) #,optimizer;kwargs...)
status = JuMP.termination_status(model)
It would be nice to update this function as there's no other way to get the JuMP termination status of the model from the Plasmo.optimize!() functions.
The text was updated successfully, but these errors were encountered:
Before the major transition to MOI, JuMP returned the status, which just got passed through to Plasmo.jl. I think in the short term, I will go ahead and cache a reference to the underlying JuMP model that gets constructed in an optigraph. Then we can just write a few functions to get termination_status, primal_status, etc... that will work for an optigraph. I should be able to update the master branch to try out this week.
One of the improvements I would like to make is to make a more direct interface to MathOptInterface. This would also make model construction faster when using standard solvers. We can always keep the option to build a JuMP model too.
I went ahead and added JuMP.termination_status(::OptiGraph). I also added primal_status,dual_status, and raw_status for convenience. All of these functions just reference the internal optinode model that gets built during aggregation. You can access the internal model with getmodel(::OptiGraph) after you run optimize!
You can also look at the current optinode and reference map in the optigraph obj_dict after you run optimize!. The reference map is mapping between variables and constraints created on optinodes to the variables and constraints in the internal model.
I updated to v0.3.2. You should be able to just update to try it out.
in the plasmo solve.jl, the function function JuMP.optimize!(graph::OptiGraph,optimizer;kwargs...) always return an empty (nothing) status from the JuMP.optimize!(...) call. Using the JuMP.termination_status however does work as follows:
It would be nice to update this function as there's no other way to get the JuMP termination status of the model from the Plasmo.optimize!() functions.
The text was updated successfully, but these errors were encountered: