-
Notifications
You must be signed in to change notification settings - Fork 193
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
kHighsModelStatusOptimal reported for non-convex QP #1727
Comments
This might be a side effect I didn't anticipate of a recent improvement I made for unconstrained QPs. I'll check |
I can to report this again: odow/SDDP.jl#782 (comment) This time, we find an julia> using JuMP, HiGHS
julia> model = JuMP.read_from_file("subproblem_9.mof.json")
A JuMP Model
├ solver: none
├ objective_sense: MAX_SENSE
│ └ objective_function_type: QuadExpr
├ num_variables: 6
├ num_constraints: 9
│ ├ AffExpr in MOI.EqualTo{Float64}: 2
│ ├ AffExpr in MOI.LessThan{Float64}: 1
│ ├ VariableRef in MOI.EqualTo{Float64}: 2
│ ├ VariableRef in MOI.GreaterThan{Float64}: 3
│ └ VariableRef in MOI.LessThan{Float64}: 1
└ Names registered in the model: none
julia> set_optimizer(model, HiGHS.Optimizer)
julia> optimize!(model)
Running HiGHS 1.7.2 (git hash: 5ce7a2753): Copyright (c) 2024 HiGHS under MIT licence terms
Coefficient ranges:
Matrix [6e-05, 3e+02]
Cost [1e+00, 1e+00]
Bound [3e+02, 1e+03]
RHS [2e-02, 2e-02]
Iteration Objective NullspaceDim
0 0.0091790712 0 0.00s
4 0.0091790712 0 0.00s
ERROR: getKktFailures: Row 2 status-value error: [-inf; 0.0183407; 0.0182876] has residual 5.3111e-05
ERROR: QP solver claims optimality, but with num/max/sum primal(1/5.3111e-05/5.3111e-05)and dual(1/1/1) infeasibilities
Model status : Optimal
QP ASM iterations: 4
Objective value : -5.3111048675e-05
HiGHS run time : 0.00
julia> solution_summary(model)
* Solver : HiGHS
* Status
Result count : 1
Termination status : OPTIMAL
Message from the solver:
"kHighsModelStatusOptimal"
* Candidate solution (result #1)
Primal status : INFEASIBLE_POINT
Dual status : INFEASIBLE_POINT
Objective value : -5.31110e-05
Objective bound : -0.00000e+00
Relative gap : Inf
Dual objective value : -1.84113e-02
* Work counters
Solve time (sec) : 7.04541e-04
Simplex iterations : 0
Barrier iterations : 0
Node count : -1
julia> HiGHS.Highs_writeModel(unsafe_backend(model), "bug_sddp.mps")
Writing the model to bug_sddp.mps
WARNING: There are empty or excessively-long column names: using constructed names with prefix "c"
WARNING: There are empty or excessively-long row names: using constructed names with prefix "r"
1
shell> cat bug_sddp.mps
NAME
OBJSENSE
MAX
ROWS
N Obj
E r0
E r1
L r2
COLUMNS
c0 r1 1
c1 r1 -1
c1 r2 -302.4250644
c2 r0 -1.001701446
c3 r0 1
c3 r2 6.048507839e-05
c4 r1 -1
c5 Obj 1
c5 r2 1
RHS
RHS_V r2 0.01828761203
BOUNDS
FX BOUND c0 0
FX BOUND c2 302.7121865
MI BOUND c5
UP BOUND c5 1000
QUADOBJ
c3 c4 1
ENDATA |
@feldmeier can no longer work on HiGHS, but I think I have enough understanding of the QP solver to return an appropriate error code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solving
Max x * y
returns "Optimal" instead of declaring the QP to be non-convex. See the JuMP example:As well as the C calls:
Originally reported in https://discourse.julialang.org/t/highs-jl-gives-strange-results/112995
x-ref jump-dev/HiGHS.jl#210
The text was updated successfully, but these errors were encountered: