-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dual
does not work on linkconstraints set after optimize!
is called
#97
Comments
Thanks for reporting. Yes, i bet it is failing to track the new constraint once it has a solution. This should (hopefully) be a straight-forward fix. |
@jalving I think this is the same problem, but thought I would pass on an extra example I ran into (took me a while to realize it was probably stemming from this same problem above). I have found that after calling using Plasmo, HiGHS, JuMP
g0 = OptiGraph()
@optinode(g0, node1)
@variable(node1, x1 >= 0)
@objective(node1, Min, x1)
@optinode(g0, node2)
@variable(node2, x2 >= 0)
@objective(node2, Min, x2)
@linkconstraint(g0, g0[:node1][:x1] + g0[:node2][:x2] >= 1)
@linkconstraint(g0, g0[:node1][:x1] + g0[:node2][:x2] >= 2)
set_optimizer(g0, HiGHS.Optimizer)
optimize!(g0)
println(objective_value(g0))
@linkconstraint(g0, g0[:node2][:x2] + g0[:node1][:x1] >= 3)
optimize!(g0)
println(objective_value(g0)) # Objective value should be 3, but it equals 2
MOIU.reset_optimizer(g0)
optimize!(g0)
println(objective_value(g0)) # Objective value now equals 3 |
@dlcole3 this seems to be fixed in v0.6. The only issue i see is that the optigraph no longer supports |
Working with the inner caching optimizer is now supported. we also support working with the optimizer directly (i.e. JuMP.DIRECT). See #122. |
Plasmo throws an error if you try to query the dual of a link constraint that was added after
optimize!
was called once. A MWE is included below. If I calloptimize!
on a graph and then add a link constraint to the graph, then calloptimize!
again and try to query the dual of the link constraint I added, I get an error. This is on Plasmo v0.5.4.This is a pretty minor error (I ran into this trying to implement a decomposition scheme). The stacktrace points to this line, so I don't think the
EdgePointer
object is being properly updated afteroptimize!
has been called once.The text was updated successfully, but these errors were encountered: