Hi Michal and Mark, I still meet the problem (with Mosek 8.1.0.56) that the status is
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
But PRSTATUS is not 1. As Mark mentioned, this does not render a confidence about the returned solution, even though I guess it is near the optimal.
Here is a report example I get:
Calling Mosek unknown: 112205 variables, 72609 equality constraints
For improved efficiency, Mosek is solving the dual problem.
------------------------------------------------------------
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 72609
Cones : 13200
Scalar variables : 112205
Matrix variables : 0
Integer variables : 0
Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 13201
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 2 time : 0.00
Lin. dep. - tries : 1 time : 0.03
Lin. dep. - number : 0
Presolve terminated. Time: 0.34
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 72609
Cones : 13200
Scalar variables : 112205
Matrix variables : 0
Integer variables : 0
Optimizer - threads : 2
Optimizer - solved problem : the dual
Optimizer - Constraints : 46201
Optimizer - Cones : 13201
Optimizer - Scalar variables : 125409 conic : 59405
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.23 dense det. time : 0.00
Factor - ML order time : 0.01 GP order time : 0.00
Factor - nonzeros before factor : 2.90e+05 after factor : 3.30e+05
Factor - dense dim. : 6 flops : 3.93e+06
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.4e+02 1.1e+00 1.0e+00 0.00e+00 0.000000000e+00 0.000000000e+00 1.0e+00 0.67
1 1.2e+02 9.4e-01 6.5e-01 7.92e+00 -9.927142669e+02 -9.133600954e+02 8.9e-01 0.77
2 2.1e+01 1.6e-01 9.0e-02 5.20e+00 -1.555053136e+03 -1.378294531e+03 1.5e-01 0.84
3 5.1e+00 3.9e-02 5.9e-02 1.90e+00 -3.291451224e+02 -3.045916528e+02 3.7e-02 0.92
4 1.1e-01 8.6e-04 1.1e-02 1.29e+00 -9.098593145e+00 -8.776774409e+00 8.1e-04 1.00
5 4.2e-02 3.2e-04 2.8e-02 2.40e+00 -2.633052460e+00 -2.626366272e+00 3.1e-04 1.08
6 2.1e-02 1.6e-04 1.9e-02 2.37e+00 -1.151147696e+00 -1.147720872e+00 1.5e-04 1.17
7 6.5e-03 5.0e-05 1.1e-02 1.40e+00 -6.221630009e-01 -6.211291941e-01 4.7e-05 1.25
8 3.4e-03 2.6e-05 7.3e-03 8.71e-01 -4.384715079e-01 -4.378053711e-01 2.5e-05 1.33
9 5.9e-04 4.5e-06 7.8e-03 1.08e+00 -2.827603553e-01 -2.827533756e-01 4.3e-06 1.41
10 9.1e-05 7.0e-07 3.2e-03 1.04e+00 -2.549724974e-01 -2.549716705e-01 6.6e-07 1.48
Optimizer terminated. Time: 1.58
Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: -2.5497249745e-01 nrm: 1e+03 Viol. con: 3e-05 var: 0e+00 cones: 2e-07
Dual. obj: -2.5497167052e-01 nrm: 8e+00 Viol. con: 0e+00 var: 2e-07 cones: 0e+00
Optimizer summary
Optimizer - time: 1.58
Interior-point - iterations : 10 time: 1.55
Basis identification - time: 0.00
Primal - iterations : 0 time: 0.00
Dual - iterations : 0 time: 0.00
Clean primal - iterations : 0 time: 0.00
Clean dual - iterations : 0 time: 0.00
Simplex - time: 0.00
Primal simplex - iterations : 0 time: 0.00
Dual simplex - iterations : 0 time: 0.00
Mixed integer - relaxations: 0 time: 0.00
------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +0.254972
I’m quite sure the optimal value should be no larger than 0.25. So I was wondering, can I set a termination criteria for Mosek to enforce it to terminate when PRSTATUS is closed to 1 (say, a gap within 1e-6) to guarantee optimality? I searched online but didn’t find such criteria . I was wondering do we have this termination criteria or other similar termination criteria I can use? Thanks so much!
ps: the example I use for the report is
num_sub = 1100;
m = 6600;
VADP = zeros(m+1,2);
Pb1 = [1/2; 1/2];
Pb2 = [1/(2*num_sub); 1/(2*num_sub); 1 - 1/num_sub];
cvx_begin
variables VADPMatrix1(m+1,2) VADPMatrix2(m+1,3)
variables vhub vsub
variable Lambda(2)
variable tmp1(m,2) nonnegative
variable tmp2(m,2) nonnegative
variable Z(m,2)
minimize ( vhub + vsub * num_sub )
subject to
vhub + VADPMatrix1(:,1) >= VADPMatrix1 * Pb1;
vhub + VADPMatrix1(2:m+1,1) >= VADPMatrix1(1:m,:) * Pb1 + Lambda(1);
vhub + VADPMatrix1(:,2) >= VADPMatrix1 * Pb1;
vhub + VADPMatrix1(1:m,2) >= VADPMatrix1(2:m+1,:) * Pb1 - Lambda(2);
Z(:,1) == VADPMatrix2(1:m,:) * Pb2 - VADPMatrix2(2:m+1,:) * Pb2 + Lambda(2);
vsub + VADPMatrix2(2:m+1,1) >= (1 + tmp1(:,1) - tmp2(:,1) + Z(:,1)).^2/4 + tmp2(:,1) + VADPMatrix2(2:m+1,:) * Pb2;
vsub + VADPMatrix2(1,1) >= VADPMatrix2(1,:) * Pb2;
Z(:,2) == VADPMatrix2(2:m+1,:) * Pb2 - VADPMatrix2(1:m,:) * Pb2 - Lambda(1);
vsub + VADPMatrix2(1:m,2) >= (1 + tmp1(:,2) - tmp2(:,2) + Z(:,2)).^2/4 + tmp2(:,2) + VADPMatrix2(1:m,:) * Pb2;
vsub + VADPMatrix2(m+1,2) >= VADPMatrix2(m+1,:) * Pb2;
vsub + VADPMatrix2(:,3) >= VADPMatrix2 * Pb2;
cvx_end