Solver does not return solution with ALMOST_OPTIMAL status

Hi,

I am running a large LP model using COPT solver (COPT.jl)
where the termination status is IMPRECISE, below is the log snippet

Using Cardinal Optimizer v7.2.4 on Windows
Hardware has 32 cores and 64 threads. Using instruction set X86_NATIVE (1)
Minimizing an LP problem

The original problem has:
    110698176 rows, 60517201 columns and 358904946 non-zero elements
The presolved problem has:
    26450603 rows, 65175827 columns and 179126383 non-zero elements

Starting barrier solver using 32 threads

Problem info:
Dualized in presolve:            Yes
Range of matrix coefficients:    [9e-03,2e+02]
Range of rhs coefficients:       [1e-02,8e+05]
Range of bound coefficients:     [3e+00,1e+02]
Range of cost coefficients:      [1e-03,2e+06]

Factor info:
Number of free columns:          4905282
Number of dense columns:         7
Number of matrix entries:        1.999e+08
Number of factor entries:        7.165e+09
Number of factor flops:          2.660e+13

Iter       Primal.Obj         Dual.Obj      Compl  Primal.Inf  Dual.Inf    Time
   0  +1.78101669e+12  -2.29757821e+09   4.06e+13    9.03e+07  5.99e+02   1093s
.
.
.
 557  -4.00115605e+09  -4.00115804e+09   2.79e+03    2.17e-03  3.24e-05  77954s

Barrier status:                  IMPRECISE
Primal objective:                -4.00115605e+09
Dual objective:                  -4.00115804e+09
Duality gap (abs/rel):           2.00e+03 / 4.99e-07
Primal infeasibility (abs/rel):  2.17e-03 / 2.61e-09
Dual infeasibility (abs/rel):    3.24e-05 / 1.62e-11

Solving finished
Status: Imprecise  Objective: 0.0000000000e+00  Iterations: 0  Time: 77975.05s

when I tried querying the objective or any variable, it returns out of bounds error

julia> objective_value(m.model)
ERROR: Result index of attribute MathOptInterface.ObjectiveValue(1) out of bounds. There are currently 0 solution(s) in the model.

julia> value(m.model[:total_cost])
ERROR: Result index of attribute MathOptInterface.VariablePrimal(1) out of bounds. There are currently 0 solution(s) in the model.

as for the solution status and summary

julia> termination_status(m.model)
ALMOST_OPTIMAL::TerminationStatusCode = 7

julia> solution_summary(m.model; verbose=true)
* Solver : COPT

* Status
  Result count       : 0
  Termination status : ALMOST_OPTIMAL
  Message from the solver:
  "The LP problem is solved to optimality with relaxed tolerances."

* Candidate solution (result #1)
  Primal status      : NO_SOLUTION
  Dual status        : NO_SOLUTION
  Objective bound    : 0.00000e+00
  Relative gap       : 0.00000e+00

* Work counters
  Solve time (sec)   : 7.79827e+04
  Simplex iterations : 0
  Barrier iterations : 557
  Node count         : 0

Is this solver or solution-status related?
I would expect that since the solver found a “close enough” solution, the solver could produce a solution candidate, but that is not case

Perhaps any other way to force JuMP/solver to use the “close enough” solution?

Thanks!

1 Like

The Result count in JuMP is zero. It does not see a solution and therefore you cannot query one. You could try adjusting the feasiblity tolerance of the solver.

3 Likes

Based on the code in COPT.jl, it looks like this is a property of the solver:

They will return a solution only if HasLpSol is true. Since the solution is imprecise, I assume they have decided not to return a solution to the user.

2 Likes

Aha okay!
Thanks very much!

Since the solver terminated while the gap is 2e3 (lower than the feasibility tolerance), the solver returns nothing