Querying objective_value
errors when quadratic objective has no quadratic term (conic solvers only)
#2239
Labels
objective_value
errors when quadratic objective has no quadratic term (conic solvers only)
#2239
I encountered an error when querying the objective value of an optimization problem in the following circumstances:
--> the example below use ECOS, and I got the same error with Mosek
(FYI, Hypatia also errored, but for a different reason; I'll open an issue there)
For more context: I was solving SOC relaxations of Optimal Power Flow problems.
The objective function, in general, is quadratic, it just happens that certain tests cases have no quadratic objective.
The example below is a much reduced test case.
__
Minimal reproducible example:
Note that
objective_function(model)
has the typeQuadExpr
.All termination/primal/dual statuses are green, and I am able to query the value of primal and dual variables.
So far so good. However, querying
objective_value(model)
leads to this error:The text was updated successfully, but these errors were encountered: