Hi!
I have noticed a weird behaviour of Mosek: when solving a linear program with the interior-point optimizer, the primal and dual feasibility tolerances do not seem to be taken into account when basis identification is turned on.
using JuMP
using Mosek
using MosekTools
model = Model(Mosek.Optimizer)
set_attribute(model, "MSK_IPAR_OPTIMIZER", Mosek.MSK_OPTIMIZER_INTPNT)
# set_attribute(model, "MSK_IPAR_INTPNT_BASIS", Mosek.MSK_BI_NEVER)
set_attribute(model, "MSK_DPAR_INTPNT_TOL_PFEAS", 1e-14)
set_attribute(model, "MSK_DPAR_INTPNT_TOL_DFEAS", 1e-14)
@variable(model, x >= 0.0)
@variable(model, y >= 0.0)
@objective(model, Min, -x)
@constraint(model, x + y <= 1)
@constraint(model, x + 2*y >= 1)
optimize!(model)
The code above produces the following output.
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 5.0e-01 2.0e-01 5.8e-02 0.00e+00 -1.000000000e+00 -9.000000000e-01 1.9e-01 0.00
1 2.2e-03 8.9e-04 2.6e-04 1.05e+00 -9.998086636e-01 -9.991418684e-01 8.4e-04 0.00
2 2.2e-07 8.9e-08 2.6e-08 1.00e+00 -9.999999809e-01 -9.999999141e-01 8.4e-08 0.00
3 2.2e-11 8.9e-12 2.6e-12 1.00e+00 -1.000000000e+00 -1.000000000e+00 8.4e-12 0.00
Basis identification started.
Primal basis identification phase started.
Primal basis identification phase terminated. Time: 0.00
Dual basis identification phase started.
Dual basis identification phase terminated. Time: 0.00
Basis identification terminated. Time: 0.00
Optimizer terminated. Time: 0.00
The solver says that the model is solved and feasible but the primal feasibility report shows that the first constraint is only satisfied up to a tolerance of approximately 10^{-11}.
Switching off basis indentification by uncommenting the proper line in the above code results in the following output.
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 5.0e-01 2.0e-01 5.8e-02 0.00e+00 -1.000000000e+00 -9.000000000e-01 1.9e-01 0.00
1 2.2e-03 8.9e-04 2.6e-04 1.05e+00 -9.998086636e-01 -9.991418684e-01 8.4e-04 0.00
2 2.2e-07 8.9e-08 2.6e-08 1.00e+00 -9.999999809e-01 -9.999999141e-01 8.4e-08 0.00
3 2.2e-11 8.9e-12 2.6e-12 1.00e+00 -1.000000000e+00 -1.000000000e+00 8.4e-12 0.00
4 2.7e-15 6.7e-16 5.4e-15 1.00e+00 -1.000000000e+00 -1.000000000e+00 8.4e-16 0.00
Optimizer terminated. Time: 0.00
The primal feasbility report now says that the second constraint is only satisfied up to a tolerance of 10^{-15}.
Does someone have an idea of what is happening there? Thanks in advance!