Hi
I found an issue when trying out this package. It seems an error occurs when trying to add a constant to a parameter in the objective.
Here is an example:
using JuMP, ParametricOptInterface, Gurobi
const POI = ParametricOptInterface
optimizer = () -> POI.Optimizer(Gurobi.Optimizer())
mdl = Model(optimizer)
@variable(mdl, p in POI.Parameter(1.0))
@variable(mdl, 0 <= x <= 1)
@objective(mdl, Max, (p + 0.5) * x)
optimize!(mdl)
@show objective_value(mdl)
@show value(objective_function(mdl))
objective_value(mdl) = 0.5
value(objective_function(mdl)) = 1.5
The optimal solution should be 1.5, but it becomes 0.5. It is as if the parameter goes to zero when added to a constant. This seems to only happen in the objective, not for constraints.
Using JuMP v1.3.0, ParametricOptInterface v0.4.3 and Gurobi v0.11.3
Hi
I found an issue when trying out this package. It seems an error occurs when trying to add a constant to a parameter in the objective.
Here is an example:
The optimal solution should be 1.5, but it becomes 0.5. It is as if the parameter goes to zero when added to a constant. This seems to only happen in the objective, not for constraints.
Using JuMP v1.3.0, ParametricOptInterface v0.4.3 and Gurobi v0.11.3