-
Notifications
You must be signed in to change notification settings - Fork 94
Closed
Description
This is more of a convention/documentation question than a bug.
I am little confused (as a user and as a solver developer) as to how primal/dual objective values should be interpreted when problems are infeasible / unbounded.
Question: if a primal/dual solution is a ray, is there a JuMP-level convention on the meaning of objective_value
and dual_objective_value
?
The table below presents the output of a few solvers for the (unbounded) problem
solver | termination status | primal status | dual status | objective_value |
dual_objective_value |
---|---|---|---|---|---|
Gurobi | DUAL_INFEASIBLE | INFEASIBILITY_CERTIFICATE | NO_SOLUTION | -1.000e+00 | -1.000e+100 |
HiGHS | DUAL_INFEASIBLE | FEASIBLE_POINT | INFEASIBLE_POINT | +0.000e+00 | +0.000e+00 |
Mosek | DUAL_INFEASIBLE | INFEASIBILITY_CERTIFICATE | NO_SOLUTION | -1.000e+00 | +0.000e+00 |
Ipopt | NORM_LIMIT | FEASIBLE_POINT | UNKNOWN_RESULT_STATUS | -1.834e+20 | +0.000e+00 |
Clarabel | DUAL_INFEASIBLE | INFEASIBILITY_CERTIFICATE | INFEASIBLE_POINT | -1.000e+10 | +0.000e+00 |
Tulip | DUAL_INFEASIBLE | INFEASIBILITY_CERTIFICATE | UNKNOWN_RESULT_STATUS | -Inf | -Inf |
using Printf
using JuMP
using Clarabel, Gurobi, HiGHS, Ipopt, Mosek, MosekTools, Tulip
model = Model()
@variable(model, x)
@objective(model, Min, x)
# Disable presolve to avoid early termination with unclear status
grb = MOI.OptimizerWithAttributes(Gurobi.Optimizer, "Presolve" => 0)
# Grab statuses and objective values
for opt in [grb, HiGHS.Optimizer, Mosek.Optimizer, Ipopt.Optimizer, Clarabel.Optimizer, Tulip.Optimizer]
set_optimizer(model, opt)
set_silent(model)
optimize!(model)
tst = termination_status(model)
pst = primal_status(model)
dst = dual_status(model)
zp = try objective_value(model) catch err NaN end
zd = try dual_objective_value(model) catch err NaN end
s = solver_name(model)
@printf "| %16s | %20s | %28s | %28s | %+8.3e | %+8.3e \n" s tst pst dst zp zd
end
Metadata
Metadata
Assignees
Labels
No labels