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
Is it possible to get the dual solution from a JuMP model constructed from a polyhedron?
using Polyhedra
using JuMP
using Clp
using LinearAlgebra
hrep =HalfSpace([-1, 0], 0) ∩HalfSpace([0, -1], 0) ∩HalfSpace([1, 1], 1)
model =Model(with_optimizer(Clp.Optimizer, LogLevel=0))
@variable(model, x[1:2])
con =@constraint(model, x in hrep)
@objective(model, Max, dot([1, 0], x))
optimize!(model)
value.(x)
2-element Array{Float64,1}:
1.0
-0.0
But dual and shadow_price do not work:
dual(con)
ArgumentError: Constraint bridge of type `Polyhedra.PolyhedraToLPBridge{Float64,MathOptInterface.ScalarAffineFunction{Float64}}` does not support accessing the attribute `MathOptInterface.ConstraintDual(1)`.
...
shadow_price(con)
The shadow price is not defined or not implemented for this type of constraint.
...
The text was updated successfully, but these errors were encountered:
Not yet. We need to figure out what it would be.
It could be a struct providing a mapping between H-Rep indices and the dual of the corresponding constraint
oyamad
changed the title
JuMP: accessing the attribute MathOptInterface.ConstraintDual(1)
[feature] JuMP: Support accessing the attribute MathOptInterface.ConstraintDual(1)May 14, 2019
Is it possible to get the dual solution from a
JuMP
model constructed from a polyhedron?But
dual
andshadow_price
do not work:dual(con)
shadow_price(con)
The text was updated successfully, but these errors were encountered: