Mosek does not give the optimal value derived by simplex methods

I have a linear Polynomial Optimization problem (DSOS) programming, and I want to solve it with Mosek. Mosek first does the interior point method (IPM) and then switches to simplex method and reoptimizes it with simplex method. The acceptable answer comes from the last iteration of the simplex method. However, when I ask Julia to give me the value of the objective function, it shows me the value from the last iteration of the IPM.

Below is my script:

using SumOfSquares
using PermutationGroups
using DynamicPolynomials
using LinearAlgebra
using MosekTools

G_Ω = PermGroup([perm"(1,3)(2,4)"])
pattern_Ω = Symmetry.Pattern(G_Ω, Symmetry.VariablePermutation())

# Prelimiraies
a=3; b=a; r=1
mu=1; D=[0;1]*[0,1]'
@polyvar x[1:2]
@polyvar y[1:5]
fx=[(b/a)*x[2];mu*(1-a^2*x[1]^2)*x[2]-(a/b)*x[1]]
phix=(a^2*x[1]^2 +b^2*x[2]^2);

vy=monomials(y,0:1:16)

m0 = Model(Mosek.Optimizer)
PolyJuMP.setdefault!(m0, PolyJuMP.NonNegPoly, DSOSCone)
@variable m0 V0 Poly(monomials(x,0:2:18))
gradV0=differentiate(V0, x)
@variable m0 ub0 
LHSUpper0= ub0- dot(gradV0, fx) - phix
@variable m0 sigma00 Poly(vy)
@variable m0 sigma10 Poly(vy)
@constraint m0 sigma00>=0 symmetry=pattern_Ω
@constraint m0 sigma10>=0 symmetry=pattern_Ω
sigmaa00=sigma00((y)=>(r-x[1],r-x[2],r+x[1],r+x[2],r^2-sum(x.^2)))
sigmaa10=sigma10((y)=>(r-x[1],r-x[2],r+x[1],r+x[2],r^2-sum(x.^2)))
@constraint m0 LHSUpper0-sigmaa00-sigmaa10*(r^2-sum(x.^2))==0
@objective m0 Min ub0
optimize!(m0)
@show value(ub0)

Can you show the log? I don’t have Mosek so I can’t test.

The following result is not for the preceding scripts because my program is too slow. However, the results are similar in the sense that Mosek only looks for the last iteration of IPM. Here the objective is “ub4”:

MOSEK warning 705: #1 (nearly) zero elements are specified in sparse row ''(61592) of matrix 'A'.
MOSEK warning 705: #1 (nearly) zero elements are specified in sparse row ''(61786) of matrix 'A'.
MOSEK warning 705: #1 (nearly) zero elements are specified in sparse row ''(63099) of matrix 'A'.
MOSEK warning 705: #1 (nearly) zero elements are specified in sparse row ''(63127) of matrix 'A'.
MOSEK warning 705: #1 (nearly) zero elements are specified in sparse row ''(63255) of matrix 'A'.
MOSEK warning 705: #1 (nearly) zero elements are specified in sparse row ''(63259) of matrix 'A'.
MOSEK warning 705: #1 (nearly) zero elements are specified in sparse row ''(63321) of matrix 'A'.
MOSEK warning 705: #1 (nearly) zero elements are specified in sparse row ''(64149) of matrix 'A'.
MOSEK warning 705: #2 (nearly) zero elements are specified in sparse row ''(64174) of matrix 'A'.
MOSEK warning 705: #3 (nearly) zero elements are specified in sparse row ''(64245) of matrix 'A'.
Warning number 705 is disabled.
Problem
  Name                   :
  Objective sense        : min
  Type                   : LO (linear optimization problem)
  Constraints            : 250499
  Cones                  : 0
  Scalar variables       : 250222
  Matrix variables       : 0
  Integer variables      : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 133606
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 6
Eliminator terminated.
Eliminator - tries                  : 2                 time                   : 0.00
Lin. dep.  - tries                  : 1                 time                   : 0.06
Lin. dep.  - number                 : 0
Presolve terminated. Time: 0.66
Problem
  Name                   :
  Objective sense        : min
  Type                   : LO (linear optimization problem)
  Constraints            : 250499
  Cones                  : 0
  Scalar variables       : 250222
  Matrix variables       : 0
  Integer variables      : 0

Optimizer  - threads                : 4
Optimizer  - solved problem         : the dual
Optimizer  - Constraints            : 14371
Optimizer  - Cones                  : 0
Optimizer  - Scalar variables       : 14597             conic                  : 0
Optimizer  - Semi-definite variables: 0                 scalarized             : 0
Factor     - setup time             : 0.55              dense det. time        : 0.16
Factor     - ML order time          : 0.09              GP order time          : 0.00
Factor     - nonzeros before factor : 1.21e+06          after factor           : 1.74e+06
Factor     - dense dim.             : 327               flops                  : 9.07e+08
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME
0   1.0e+02  1.1e+01  9.4e+01  0.00e+00   0.000000000e+00   1.800000000e+01   3.0e+01  1.36
1   1.1e+03  1.1e+01  9.0e+01  1.71e+00   4.684526448e-01   1.753091726e+01   2.9e+01  1.58  
2   9.1e+02  8.9e+00  7.5e+01  3.16e+00   2.698346354e+00   1.246310732e+01   2.4e+01  1.78  
3   8.2e+02  7.5e+00  6.4e+01  2.64e+00   3.332819177e+00   1.018644502e+01   2.1e+01  1.94  
4   2.3e+02  2.1e+00  1.8e+01  2.33e+00   5.350360132e+00   6.271789764e+00   5.8e+00  2.19  
5   9.9e+01  9.0e-01  7.6e+00  1.68e+00   4.906117052e+00   5.204972972e+00   2.5e+00  2.48  
6   4.4e+01  4.1e-01  3.4e+00  1.45e+00   4.608106162e+00   4.723165956e+00   1.1e+00  2.67  
7   2.3e+01  2.1e-01  1.8e+00  1.28e+00   4.478708228e+00   4.534840670e+00   5.8e-01  2.86  
8   1.3e+01  1.1e-01  9.7e-01  1.14e+00   4.428036482e+00   4.457422304e+00   3.1e-01  3.09  
9   2.9e+00  2.7e-02  2.3e-01  1.08e+00   4.357429102e+00   4.364107497e+00   7.4e-02  3.28  
10  2.8e+00  2.6e-02  2.2e-01  1.06e+00   4.349376905e+00   4.355653202e+00   7.1e-02  3.45  
11  7.9e-01  7.3e-03  6.2e-02  1.07e+00   4.301093960e+00   4.302774090e+00   2.0e-02  3.64  
12  7.6e-01  6.9e-03  5.9e-02  9.99e-01   4.298856951e+00   4.300457652e+00   1.9e-02  3.78  
13  8.8e-02  8.1e-04  6.8e-03  9.91e-01   4.270870235e+00   4.271050257e+00   2.6e-03  4.00  
14  8.1e-02  7.4e-04  6.3e-03  9.30e-01   4.270115379e+00   4.270280702e+00   2.4e-03  4.17  
15  3.5e-02  3.2e-04  2.7e-03  9.37e-01   4.265623399e+00   4.265695527e+00   1.0e-03  4.34  
16  3.4e-02  3.1e-04  2.7e-03  9.18e-01   4.265568835e+00   4.265640624e+00   1.0e-03  4.49  
17  3.3e-02  3.0e-04  2.5e-03  9.22e-01   4.265281584e+00   4.265350328e+00   9.8e-04  4.61  
18  2.8e-02  2.5e-04  2.2e-03  9.24e-01   4.264471157e+00   4.264529880e+00   8.4e-04  4.77  
19  1.1e-02  1.0e-04  8.9e-04  9.32e-01   4.261960082e+00   4.261984526e+00   3.7e-04  4.95  
20  7.4e-03  6.8e-05  5.8e-04  9.61e-01   4.261083559e+00   4.261099577e+00   2.4e-04  5.11  
21  5.9e-03  7.5e-05  4.6e-04  9.63e-01   4.260686528e+00   4.260699312e+00   1.9e-04  5.27  
22  4.8e-03  1.3e-04  3.7e-04  9.67e-01   4.260335195e+00   4.260345514e+00   1.5e-04  5.44  
23  4.4e-03  1.7e-04  3.4e-04  9.67e-01   4.260182951e+00   4.260192585e+00   1.5e-04  5.58  
24  2.5e-03  2.5e-04  1.9e-04  9.68e-01   4.259408588e+00   4.259414000e+00   8.5e-05  5.77  
25  2.0e-03  3.2e-04  1.6e-04  9.69e-01   4.259144826e+00   4.259149244e+00   6.8e-05  5.94  
26  1.7e-03  3.6e-04  1.3e-04  9.71e-01   4.258922145e+00   4.258925858e+00   5.7e-05  6.11  
27  1.6e-03  4.0e-04  1.2e-04  9.73e-01   4.258811658e+00   4.258815046e+00   5.2e-05  6.25  
28  1.1e-03  5.3e-04  8.9e-05  9.73e-01   4.258493537e+00   4.258496054e+00   3.8e-05  6.44  
29  1.0e-03  5.2e-04  7.9e-05  9.74e-01   4.258382536e+00   4.258384768e+00   3.4e-05  6.61  
30  9.2e-04  5.3e-04  7.1e-05  9.75e-01   4.258290855e+00   4.258292879e+00   3.1e-05  6.77  
31  8.2e-04  6.1e-04  6.3e-05  9.76e-01   4.258181173e+00   4.258182966e+00   2.7e-05  6.95  
32  5.4e-04  8.6e-04  4.2e-05  9.76e-01   4.257862908e+00   4.257864098e+00   1.7e-05  7.14  
33  4.6e-04  9.9e-04  3.5e-05  9.80e-01   4.257748355e+00   4.257749361e+00   1.4e-05  7.31  
34  3.6e-04  1.2e-03  2.8e-05  9.81e-01   4.257597105e+00   4.257597905e+00   1.1e-05  7.53  
35  2.8e-04  1.4e-03  2.1e-05  9.82e-01   4.257438207e+00   4.257438822e+00   8.7e-06  7.69  
36  2.3e-04  1.6e-03  1.8e-05  9.84e-01   4.257333568e+00   4.257334076e+00   7.1e-06  7.83  
37  1.8e-04  1.8e-03  1.4e-05  9.85e-01   4.257222149e+00   4.257222559e+00   5.6e-06  7.99  
38  1.7e-04  1.9e-03  1.3e-05  9.87e-01   4.257175825e+00   4.257176195e+00   5.1e-06  8.14  
39  1.3e-04  2.0e-03  1.0e-05  9.87e-01   4.257068245e+00   4.257068536e+00   3.9e-06  8.30  
40  1.2e-04  2.1e-03  9.6e-06  9.89e-01   4.257046151e+00   4.257046427e+00   3.7e-06  8.45  
41  1.2e-04  2.1e-03  9.6e-06  9.87e-01   4.257046151e+00   4.257046427e+00   3.7e-06  8.61  
42  1.2e-04  2.1e-03  9.6e-06  9.57e-01   4.257046151e+00   4.257046427e+00   3.7e-06  8.81  
43  1.2e-04  2.1e-03  9.6e-06  -1.19e+00  4.257046151e+00   4.257046427e+00   3.7e-06  8.92  
44  1.2e-04  2.1e-03  9.6e-06  7.49e-01   4.257046151e+00   4.257046427e+00   3.7e-06  9.05  
45  1.2e-04  2.1e-03  9.6e-06  9.74e-01   4.257046151e+00   4.257046427e+00   3.7e-06  9.17  
46  1.2e-04  2.0e-03  9.4e-06  9.98e-01   4.257049752e+00   4.257050022e+00   3.7e-06  9.36  
Basis identification started.
Primal basis identification phase started.
Primal basis identification phase terminated. Time: 0.16
Dual basis identification phase started.
Dual basis identification phase terminated. Time: 1.66
Simplex reoptimization started.
Dual simplex reoptimization started.
ITER      DEGITER(%)  PFEAS       DFEAS       POBJ                  DOBJ                  TIME
0         0.00        2.92e+03    NA          4.250812464735e+00    NA                    0.02
1121      49.38       0.00e+00    NA          4.246736222887e+00    NA                    4.58    
Dual simplex reoptimization terminated. Time: 4.58    
Primal simplex reoptimization started.
ITER      DEGITER(%)  PFEAS       DFEAS       POBJ                  DOBJ                  TIME
0         0.00        NA          0.00e+00    NA                    4.246736331660e+00    0.02
1         0.00        NA          0.00e+00    NA                    4.246736331659e+00    0.03    
Primal simplex reoptimization terminated. Time: 0.03    
Simplex reoptimization terminated. Time: 4.73
Basis identification terminated. Time: 8.89
Optimizer terminated. Time: 18.50   

value(ub4) = 4.257049761318281
4.257049761318281

I also added the result of my program in the following:

Problem 
  Name                   :
  Objective sense        : min
  Type                   : LO (linear optimization problem)
  Constraints            : 1700705
  Cones                  : 0
  Scalar variables       : 1700193
  Matrix variables       : 0
  Integer variables      : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 1657109
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 24
Eliminator terminated.
Eliminator - tries                  : 2                 time                   : 0.00
Lin. dep.  - tries                  : 1                 time                   : 2.94
Lin. dep.  - number                 : 426
Presolve terminated. Time: 16.66
Problem
  Name                   :
  Objective sense        : min
  Type                   : LO (linear optimization problem)
  Constraints            : 1700705
  Cones                  : 0
  Scalar variables       : 1700193
  Matrix variables       : 0
  Integer variables      : 0

Optimizer  - threads                : 4
Optimizer  - solved problem         : the primal
Optimizer  - Constraints            : 42940
Optimizer  - Cones                  : 0
Optimizer  - Scalar variables       : 1701413           conic                  : 0
Optimizer  - Semi-definite variables: 0                 scalarized             : 0
Factor     - setup time             : 7.19              dense det. time        : 0.00
Factor     - ML order time          : 0.25              GP order time          : 0.00
Factor     - nonzeros before factor : 8.90e+06          after factor           : 1.70e+07
Factor     - dense dim.             : 2                 flops                  : 1.28e+10
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME
0   3.2e+03  1.6e+01  4.6e+04  0.00e+00   1.634937241e+04   0.000000000e+00   7.9e+00  25.86
1   3.1e+03  1.6e+01  4.5e+04  -7.24e-01  1.630379476e+04   1.448877208e-04   7.7e+00  28.34 
2   3.1e+03  1.6e+01  4.4e+04  -7.78e-01  1.630130260e+04   2.384915934e-04   7.7e+00  29.75 
3   3.1e+03  1.6e+01  4.4e+04  -6.91e-01  1.629771559e+04   3.607703543e-04   7.6e+00  31.14 
4   3.1e+03  1.6e+01  4.4e+04  -6.75e-01  1.629319223e+04   5.140900368e-04   7.6e+00  32.73 
5   3.1e+03  1.6e+01  4.4e+04  -6.85e-01  1.629262791e+04   5.333462833e-04   7.6e+00  34.06 
6   3.1e+03  1.6e+01  4.4e+04  -7.28e-01  1.629250634e+04   5.377366205e-04   7.6e+00  36.69 
7   3.1e+03  1.6e+01  4.4e+04  -7.93e-01  1.629250634e+04   5.377366205e-04   7.6e+00  38.94 
8   3.1e+03  1.6e+01  4.4e+04  -7.93e-01  1.629250634e+04   5.377366205e-04   7.6e+00  41.41 
9   3.1e+03  1.6e+01  4.4e+04  -7.93e-01  1.629250634e+04   5.377366205e-04   7.6e+00  43.47 
10  3.1e+03  1.6e+01  4.4e+04  -7.95e-01  1.629250634e+04   5.377366205e-04   7.6e+00  45.56 
11  3.1e+03  1.6e+01  4.4e+04  -8.10e-01  1.629250634e+04   5.377366205e-04   7.6e+00  47.69 
12  3.1e+03  1.6e+01  4.4e+04  -8.85e-01  1.629240445e+04   5.438955443e-04   7.6e+00  49.83 
Basis identification started.
Primal basis identification phase started.
Primal basis identification phase terminated. Time: 0.48
Dual basis identification phase started.
Dual basis identification phase terminated. Time: 0.06
Simplex reoptimization started.
Primal simplex reoptimization started.
ITER      DEGITER(%)  PFEAS       DFEAS       POBJ                  DOBJ                  TIME
0         0.00        7.62e-01    NA          2.930520743326e-02    NA                    0.19    
2500      24.55       0.00e+00    NA          4.532192773164e+00    NA                    24.27   
5000      12.92       0.00e+00    NA          4.271522491917e+00    NA                    35.39   
5725      11.44       0.00e+00    NA          4.254961577998e+00    NA                    43.66   
Primal simplex reoptimization terminated. Time: 43.66   
Simplex reoptimization terminated. Time: 43.98   
Basis identification terminated. Time: 66.33
Optimizer terminated. Time: 118.42  

value(ub0) = 16292.404453101784
16292.404453101784

What is solution_summary(model)? Does it say anything about a warning? What version of Mosek are you using?

What is ub4? Please provide a fully reproducible example.

Let’s forget about “ub4”. Because my program is slow, I decided to show you the result of another program with the same problem. However, now, I write the scripts and the result of my program in this comment. Sorry for the inconvenience.

Below is my code:

using SumOfSquares
using PermutationGroups
using DynamicPolynomials
using LinearAlgebra
using MosekTools

G_Ω = PermGroup([perm"(1,3)(2,4)"])
pattern_Ω = Symmetry.Pattern(G_Ω, Symmetry.VariablePermutation())

# Prelimiraies
a=3; b=a; r=1
mu=1; D=[0;1]*[0,1]'
@polyvar x[1:2]
@polyvar y[1:5]
fx=[(b/a)*x[2];mu*(1-a^2*x[1]^2)*x[2]-(a/b)*x[1]]
phix=(a^2*x[1]^2 +b^2*x[2]^2);
vy=monomials(y,0:1:16)

m0 = Model(Mosek.Optimizer)
PolyJuMP.setdefault!(m0, PolyJuMP.NonNegPoly, DSOSCone)
@variable m0 V0 Poly(monomials(x,0:2:18))
gradV0=differentiate(V0, x)
@variable m0 ub0 
LHSUpper0= ub0- dot(gradV0, fx) - phix
@variable m0 sigma00 Poly(vy)
@variable m0 sigma10 Poly(vy)
con_ref1=@constraint m0 sigma00>=0 symmetry=pattern_Ω
con_ref2=@constraint m0 sigma10>=0 symmetry=pattern_Ω
sigmaa00=sigma00((y)=>(r-x[1],r-x[2],r+x[1],r+x[2],r^2-sum(x.^2)))
sigmaa10=sigma10((y)=>(r-x[1],r-x[2],r+x[1],r+x[2],r^2-sum(x.^2)))
@constraint m0 LHSUpper0-sigmaa00-sigmaa10*(r^2-sum(x.^2))==0
@objective m0 Min ub0
optimize!(m0)
@show value(ub0)
solution_summary(m0)

And this is the result which includes solution_summary(m0):

Problem
  Name                   :
  Objective sense        : min
  Type                   : LO (linear optimization problem)
  Constraints            : 1700705
  Cones                  : 0
  Scalar variables       : 1700193
  Matrix variables       : 0
  Integer variables      : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 1657109
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 24
Eliminator terminated.
Eliminator - tries                  : 2                 time                   : 0.00
Lin. dep.  - tries                  : 1                 time                   : 2.20
Lin. dep.  - number                 : 426
Presolve terminated. Time: 12.73
Problem
  Name                   :
  Objective sense        : min
  Type                   : LO (linear optimization problem)
  Constraints            : 1700705
  Cones                  : 0
  Scalar variables       : 1700193
  Matrix variables       : 0
  Integer variables      : 0

Optimizer  - threads                : 4
Optimizer  - solved problem         : the primal
Optimizer  - Constraints            : 42940
Optimizer  - Cones                  : 0
Optimizer  - Scalar variables       : 1701413           conic                  : 0
Optimizer  - Semi-definite variables: 0                 scalarized             : 0
Factor     - setup time             : 5.64              dense det. time        : 0.00
Factor     - ML order time          : 0.16              GP order time          : 0.00
Factor     - nonzeros before factor : 8.90e+06          after factor           : 1.70e+07
Factor     - dense dim.             : 2                 flops                  : 1.28e+10
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME
0   3.2e+03  1.6e+01  4.6e+04  0.00e+00   1.634937241e+04   0.000000000e+00   7.9e+00  19.94
1   3.1e+03  1.6e+01  4.5e+04  -7.24e-01  1.630379476e+04   1.448877208e-04   7.7e+00  21.91 
2   3.1e+03  1.6e+01  4.4e+04  -7.78e-01  1.630130260e+04   2.384915934e-04   7.7e+00  22.95 
3   3.1e+03  1.6e+01  4.4e+04  -6.91e-01  1.629771559e+04   3.607703543e-04   7.6e+00  24.03 
4   3.1e+03  1.6e+01  4.4e+04  -6.75e-01  1.629319223e+04   5.140900368e-04   7.6e+00  25.25 
5   3.1e+03  1.6e+01  4.4e+04  -6.85e-01  1.629262791e+04   5.333462833e-04   7.6e+00  26.23 
6   3.1e+03  1.6e+01  4.4e+04  -7.28e-01  1.629250634e+04   5.377366205e-04   7.6e+00  28.45 
7   3.1e+03  1.6e+01  4.4e+04  -7.93e-01  1.629250634e+04   5.377366205e-04   7.6e+00  30.33 
8   3.1e+03  1.6e+01  4.4e+04  -7.93e-01  1.629250634e+04   5.377366205e-04   7.6e+00  32.48 
9   3.1e+03  1.6e+01  4.4e+04  -7.93e-01  1.629250634e+04   5.377366205e-04   7.6e+00  34.25 
10  3.1e+03  1.6e+01  4.4e+04  -7.95e-01  1.629250634e+04   5.377366205e-04   7.6e+00  35.98 
11  3.1e+03  1.6e+01  4.4e+04  -8.10e-01  1.629250634e+04   5.377366205e-04   7.6e+00  37.70 
12  3.1e+03  1.6e+01  4.4e+04  -8.85e-01  1.629240445e+04   5.438955443e-04   7.6e+00  39.48 
Basis identification started.
Primal basis identification phase started.
Primal basis identification phase terminated. Time: 0.47
Dual basis identification phase started.
Dual basis identification phase terminated. Time: 0.06
Simplex reoptimization started.
Primal simplex reoptimization started.
ITER      DEGITER(%)  PFEAS       DFEAS       POBJ                  DOBJ                  TIME
0         0.00        7.62e-01    NA          2.930520743326e-02    NA                    0.19    
2500      24.55       0.00e+00    NA          4.532192773164e+00    NA                    21.13   
5000      12.92       0.00e+00    NA          4.271522491917e+00    NA                    29.16   
5725      11.44       0.00e+00    NA          4.254961577998e+00    NA                    35.23   
Primal simplex reoptimization terminated. Time: 35.23   
Simplex reoptimization terminated. Time: 35.53   
Basis identification terminated. Time: 54.75
Optimizer terminated. Time: 95.77   

value(ub0) = 16292.404453101784
* Solver : Mosek

* Status
  Termination status : OPTIMAL
  Primal status      : UNKNOWN_RESULT_STATUS
  Dual status        : UNKNOWN_RESULT_STATUS
  Message from the solver:
  "Mosek.MSK_SOL_STA_UNKNOWN, Mosek.MSK_SOL_STA_OPTIMAL"

* Candidate solution
  Objective value      : 1.62924e+04
  Objective bound      : 1.62924e+04
  Relative gap         : 0.00000e+00
  Dual objective value : 5.43896e-04

* Work counters
  Solve time (sec)   : 9.57660e+01
  Simplex iterations : 0
  Barrier iterations : 13
  Node count         : 0

As it can be seen, the solution is based on the last iteration of IPM but not simplex method.

Primal status : UNKNOWN_RESULT_STATUS

This suggests the Mosek knows something went wrong. You should always be cautious about accepting the results of a solver. For tricky problems, they can often fail.

I think you need to re-think your modeling approach. What are you trying to do/show? Do you need 18th order monomials?(!) Is Mosek the right choice of solver?

@blegat might have some suggestions.

Here’s the log I get with Gurobi. It says the optimal solution is 0, so even your simplex solutions are wrong.

julia> optimize!(model)
Gurobi Optimizer version 9.5.1 build v9.5.1rc2 (mac64[x86])
Thread count: 4 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 1700705 rows, 1700193 columns and 12769533 nonzeros
Model fingerprint: 0x0515845a
Coefficient statistics:
  Matrix range     [5e-01, 6e+06]
  Objective range  [1e+00, 1e+00]
  Bounds range     [0e+00, 0e+00]
  RHS range        [9e+00, 9e+00]

Concurrent LP optimizer: dual simplex and barrier
Showing barrier log only...

Presolve removed 830256 rows and 890 columns (presolve time = 6s) ...
Presolve removed 830264 rows and 890 columns (presolve time = 10s) ...
Presolve removed 830382 rows and 1399 columns
Presolve time: 16.86s
Presolved: 870323 rows, 1698794 columns, 12175670 nonzeros

Ordering time: 0.75s

Barrier statistics:
 Free vars  : 869992
 AA' NZ     : 1.594e+07
 Factor NZ  : 2.616e+07 (roughly 1.3 GB of memory)
 Factor Ops : 1.582e+10 (less than 1 second per iteration)
 Threads    : 3

                  Objective                Residual
Iter       Primal          Dual         Primal    Dual     Compl     Time
   0   2.37857482e+03  0.00000000e+00  3.41e+01 6.42e+01  5.49e+00    26s
   1   7.38338527e+04  0.00000000e+00  2.03e+01 4.88e+01  4.01e+00    28s
   2   9.54191765e+04  0.00000000e+00  1.49e+01 4.40e+01  3.43e+00    30s
   3   1.17568616e+05  0.00000000e+00  7.78e+00 2.84e+01  2.22e+00    33s
   4   1.18549729e+05  0.00000000e+00  4.27e+00 2.81e+01  1.81e+00    35s
   5   1.13666606e+05  0.00000000e+00  2.16e+00 2.09e+01  1.23e+00    38s
   6   1.12604767e+05  0.00000000e+00  2.08e+00 1.94e+01  1.15e+00    40s
   7   9.58691844e+04  0.00000000e+00  1.22e+00 1.60e+01  8.65e-01    43s
   8   9.39254354e+04  0.00000000e+00  1.19e+00 1.45e+01  7.97e-01    46s
   9   9.08899938e+04  0.00000000e+00  1.33e+00 1.33e+01  7.32e-01    48s
  10   9.04889063e+04  0.00000000e+00  1.32e+00 1.13e+01  6.54e-01    51s
  11   8.00288398e+04  0.00000000e+00  1.67e+00 9.95e+00  5.48e-01    53s
  12   7.37266972e+04  0.00000000e+00  1.46e+00 9.40e+00  4.98e-01    56s
  13   6.83744345e+04  0.00000000e+00  1.27e+00 8.20e+00  4.30e-01    58s
  14   6.00324451e+04  0.00000000e+00  1.02e+00 6.61e+00  3.40e-01    61s
  15   5.53070429e+04  0.00000000e+00  8.72e-01 5.71e+00  2.93e-01    63s
  16   4.99682135e+04  0.00000000e+00  7.08e-01 4.75e+00  2.43e-01    66s
  17   4.35301155e+04  0.00000000e+00  5.24e-01 4.19e+00  2.00e-01    68s
  18   3.69217578e+04  0.00000000e+00  3.88e-01 3.23e+00  1.50e-01    71s
  19   3.46653907e+04  0.00000000e+00  3.47e-01 2.96e+00  1.35e-01    74s
  20   3.45484550e+04  0.00000000e+00  3.45e-01 2.63e+00  1.27e-01    76s
  21   3.43111005e+04  0.00000000e+00  3.41e-01 2.36e+00  1.21e-01    78s
  22   3.25430328e+04  0.00000000e+00  3.30e-01 2.23e+00  1.12e-01    81s
  23   2.72834558e+04  0.00000000e+00  2.97e-01 1.92e+00  8.83e-02    83s
  24   1.79239301e+04  0.00000000e+00  3.22e-01 1.26e+00  4.95e-02    86s
  25   1.17902031e+04  0.00000000e+00  1.58e-01 6.78e-01  2.70e-02    89s
  26   8.39816773e+03  0.00000000e+00  1.00e-01 5.81e-01  1.88e-02    91s
  27   6.80323246e+03  0.00000000e+00  6.50e-02 3.26e-01  1.33e-02    93s
  28   5.40413980e+03  0.00000000e+00  6.03e-02 2.51e-01  1.01e-02    96s
  29   3.96412186e+03  0.00000000e+00  6.91e-02 1.92e-01  7.17e-03    97s
  30   3.45779202e+03  0.00000000e+00  5.09e-02 1.72e-01  6.17e-03    99s
  31   1.67786365e+03  0.00000000e+00  3.44e-02 6.28e-02  2.70e-03   102s
  32   5.98203532e+02  0.00000000e+00  1.25e-02 3.72e-02  9.27e-04   105s
  33   2.53097058e+02  0.00000000e+00  5.60e-03 2.15e-02  3.82e-04   107s
  34   9.36380633e+01  0.00000000e+00  5.14e-03 1.33e-02  1.37e-04   109s
  35   8.84725028e+01  0.00000000e+00  5.02e-03 1.19e-02  1.29e-04   111s
  36   6.16330031e+01  0.00000000e+00  3.45e-03 5.28e-03  8.74e-05   113s
  37   3.46520295e+01  0.00000000e+00  2.84e-03 3.92e-03  4.88e-05   115s
  38   1.74739664e+01  0.00000000e+00  6.32e-03 1.40e-03  2.41e-05   116s
  39   3.08990715e+00  0.00000000e+00  3.07e-03 8.74e-04  4.23e-06   118s
  40   2.33885816e+00  0.00000000e+00  2.29e-03 2.56e-04  3.18e-06   120s
  41   5.34586930e-01  0.00000000e+00  5.09e-04 9.18e-05  7.09e-07   122s
  42   1.10750180e-01  0.00000000e+00  9.73e-05 1.62e-06  1.46e-07   124s
  43   3.61789846e-03  0.00000000e+00  2.41e-06 1.04e-07  4.70e-09   126s
  44   6.61614602e-04  0.00000000e+00  3.66e-07 8.81e-08  8.59e-10   128s
  45   2.79156018e-05  0.00000000e+00  5.80e-08 7.33e-09  3.64e-11   130s
  46   1.03120419e-06  0.00000000e+00  1.94e-09 1.73e-09  1.34e-12   132s
  47  -1.63774210e-09  0.00000000e+00  1.67e-10 1.06e-09  1.34e-15   134s

Barrier solved model in 47 iterations and 134.08 seconds (93.50 work units)
Optimal objective -1.63774210e-09

Crossover log...

    8076 DPushes remaining with DInf 0.0000000e+00               137s
     356 DPushes remaining with DInf 0.0000000e+00               156s
     298 DPushes remaining with DInf 0.0000000e+00               172s
     292 DPushes remaining with DInf 2.1785331e+08               176s

Restart crossover...

  860648 variables added to crossover basis                      181s

    8082 DPushes remaining with DInf 0.0000000e+00               182s
     343 DPushes remaining with DInf 0.0000000e+00               203s
     321 DPushes remaining with DInf 0.0000000e+00               212s
Warning: 1 variables dropped from basis
     317 DPushes remaining with DInf 3.0288211e+07               215s
Warning: 1 variables dropped from basis
Warning: 1 variables dropped from basis
     292 DPushes remaining with DInf 6.4779675e+06               227s
Warning: 1 variables dropped from basis
     287 DPushes remaining with DInf 2.3606628e+07               231s
     257 DPushes remaining with DInf 2.3604398e+07               250s
     253 DPushes remaining with DInf 2.3603731e+07               252s

     106 PPushes remaining with PInf 1.7460168e+01               280s
      39 PPushes remaining with PInf 1.0212502e+01               280s
       0 PPushes remaining with PInf 0.0000000e+00               281s

  Push phase complete: Pinf 0.0000000e+00, Dinf 7.3766851e+07    281s

Iteration    Objective       Primal Inf.    Dual Inf.      Time
    7931    0.0000000e+00   0.000000e+00   7.376693e+07    281s
    8007    0.0000000e+00   0.000000e+00   0.000000e+00    305s

Solved with barrier
Solved in 8007 iterations and 305.49 seconds (330.07 work units)
Optimal objective  0.000000000e+00

User-callback calls 39316, time in user-callback 0.07 sec

I suppose 4.2549 from the last iteration of simplex method in Mosek is the correct answer for this optimization because Gurobi gives the same answer and also I know it from my research. I do not know why your Gurobi solved this problem that way, this is the result when I solve it by Gurobi:

Set parameter Username
Academic license - for non-commercial use only - expires 2023-10-23
Gurobi Optimizer version 9.5.2 build v9.5.2rc0 (win64)
Thread count: 4 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 1700705 rows, 1700193 columns and 12769533 nonzeros
Model fingerprint: 0xe058b444
Coefficient statistics:
  Matrix range     [5e-01, 6e+06]
  Objective range  [1e+00, 1e+00]
  Bounds range     [0e+00, 0e+00]
  RHS range        [9e+00, 9e+00]

Concurrent LP optimizer: dual simplex and barrier
Showing barrier log only...

Presolve removed 830264 rows and 890 columns (presolve time = 5s) ...
Presolve removed 830264 rows and 890 columns (presolve time = 10s) ...
Presolve removed 830382 rows and 1399 columns
Presolve time: 20.30s
Presolved: 870323 rows, 1698794 columns, 12175670 nonzeros

Ordering time: 1.03s

Barrier statistics:
 Free vars  : 869992
 AA' NZ     : 1.594e+07
 Factor NZ  : 2.616e+07 (roughly 1.3 GB of memory)
 Factor Ops : 1.582e+10 (roughly 1 second per iteration)
 Threads    : 3

                  Objective                Residual
Iter       Primal          Dual         Primal    Dual     Compl     Time
   0   2.37840779e+03 -1.67028920e-01  3.41e+01 6.42e+01  5.49e+00    34s
   1   7.38341303e+04  1.98890081e-01  2.03e+01 4.88e+01  4.01e+00    37s
   2   9.54239982e+04  3.28984795e-01  1.49e+01 4.40e+01  3.43e+00    40s
   3   1.17624128e+05  1.36177972e+00  7.75e+00 2.77e+01  2.19e+00    43s
   4   1.23506920e+05  1.77109501e+00  2.33e+00 2.21e+01  1.33e+00    46s
   5   1.15771970e+05  1.84698504e+00  1.75e+00 1.99e+01  1.14e+00    49s
   6   1.05774896e+05  1.88853545e+00  4.34e+00 1.85e+01  1.02e+00    52s
   7   9.86804788e+04  2.00024679e+00  3.59e+00 1.51e+01  8.36e-01    54s
   8   9.41548294e+04  2.13989546e+00  3.12e+00 1.25e+01  7.10e-01    57s
   9   8.39982765e+04  2.19206369e+00  2.37e+00 1.12e+01  6.05e-01    60s
  10   7.45878361e+04  2.23539708e+00  1.84e+00 1.03e+01  5.26e-01    64s
  11   7.30593550e+04  2.26758379e+00  1.77e+00 9.27e+00  4.83e-01    67s
  12   7.21991815e+04  2.31004131e+00  1.73e+00 8.60e+00  4.57e-01    70s
  13   6.55169488e+04  2.35842593e+00  1.39e+00 8.01e+00  4.06e-01    74s
  14   6.46646887e+04  2.41592242e+00  1.35e+00 7.25e+00  3.78e-01    77s
  15   5.83248880e+04  2.48470072e+00  1.09e+00 6.67e+00  3.31e-01    80s
  16   5.69214930e+04  2.67273038e+00  1.03e+00 5.43e+00  2.89e-01    83s
  17   5.38392937e+04  2.80488664e+00  8.98e-01 4.58e+00  2.51e-01    86s
  18   4.38024217e+04  2.91192505e+00  5.94e-01 3.95e+00  1.90e-01    89s
  19   4.32598480e+04  2.93876632e+00  5.79e-01 3.76e+00  1.83e-01    92s
  20   4.26594709e+04  3.08473809e+00  5.71e-01 2.81e+00  1.58e-01    96s
  21   3.09171761e+04  3.21264260e+00  3.45e-01 1.92e+00  9.65e-02    99s
  22   1.92370532e+04  3.28476559e+00  2.44e-01 1.58e+00  5.51e-02   102s
  23   1.45459529e+04  3.53474423e+00  1.86e-01 6.29e-01  3.10e-02   106s
  24   9.14875843e+03  3.54027129e+00  2.04e-01 5.62e-01  1.94e-02   109s
  25   4.04299391e+03  3.61159825e+00  1.33e-01 2.85e-01  7.56e-03   112s
  26   3.17945782e+03  3.62522330e+00  9.83e-02 2.33e-01  5.75e-03   115s
  27   2.51347380e+03  3.65888202e+00  6.87e-02 1.31e-01  4.14e-03   118s
  28   1.87127323e+03  3.67704081e+00  4.99e-02 8.74e-02  2.94e-03   121s
  29   1.63413497e+03  3.67834759e+00  4.60e-02 8.06e-02  2.55e-03   124s
  30   7.73328521e+02  3.68980516e+00  6.73e-02 3.47e-02  1.13e-03   127s
  31   3.77426828e+02  3.69651752e+00  3.06e-02 1.76e-02  5.30e-04   130s
  32   2.24220411e+02  3.70036016e+00  1.72e-02 1.28e-02  3.09e-04   134s
  33   2.20725633e+02  3.70049056e+00  1.69e-02 1.24e-02  3.04e-04   136s
  34   2.09472892e+02  3.70699094e+00  1.60e-02 9.73e-03  2.86e-04   139s
  35   1.23925798e+02  3.72035047e+00  9.75e-03 5.15e-03  1.65e-04   142s
  36   1.00694026e+02  3.72749677e+00  8.41e-03 3.85e-03  1.33e-04   145s
  37   3.89385087e+01  3.75562852e+00  3.11e-03 2.14e-03  4.77e-05   149s
  38   1.60680495e+01  3.78818828e+00  1.41e-03 1.27e-03  1.64e-05   153s
  39   1.25879149e+01  3.90231510e+00  9.40e-04 6.72e-04  1.16e-05   156s
  40   1.19884346e+01  3.92748853e+00  9.14e-04 5.87e-04  1.07e-05   159s
  41   9.37174437e+00  3.99674366e+00  1.01e-03 3.50e-04  7.12e-06   161s
  42   8.99707869e+00  4.04018916e+00  1.01e-03 2.59e-04  6.56e-06   164s
  43   8.50186110e+00  4.05423017e+00  9.90e-04 2.41e-04  5.88e-06   167s
  44   8.11760089e+00  4.08923231e+00  8.83e-04 2.09e-04  5.32e-06   170s
  45   7.33940493e+00  4.12192976e+00  9.45e-04 1.80e-04  4.23e-06   174s
  46   6.90052360e+00  4.14123119e+00  6.91e-04 1.65e-04  3.60e-06   179s
  47   6.44042820e+00  4.17193813e+00  7.09e-04 1.50e-04  2.95e-06   183s
  48   6.16558737e+00  4.17902643e+00  6.06e-04 1.43e-04  2.57e-06   187s
  49   6.14942350e+00  4.20598525e+00  6.01e-04 1.29e-04  2.52e-06   191s
  50   6.04599276e+00  4.20901941e+00  5.81e-04 1.24e-04  2.37e-06   194s
  51   6.00952901e+00  4.20993247e+00  5.67e-04 1.23e-04  2.32e-06   198s
  52   5.98722709e+00  4.22193663e+00  5.80e-04 1.12e-04  2.28e-06   203s
  53   5.84675223e+00  4.23509427e+00  8.09e-04 1.04e-04  2.08e-06   208s
  54   5.77722563e+00  4.24524982e+00  7.79e-04 9.73e-05  1.98e-06   213s
  55   5.65890286e+00  4.25058980e+00  7.03e-04 8.97e-05  1.81e-06   217s
  56   5.54753487e+00  4.24944578e+00  7.52e-04 8.48e-05  1.67e-06   221s
  57   5.41268884e+00  4.25148349e+00  6.60e-04 7.01e-05  1.50e-06   225s
  58   5.15873879e+00  4.25260301e+00  6.93e-04 5.91e-05  1.17e-06   229s
  59   4.96478769e+00  4.25403026e+00  5.82e-04 4.01e-05  9.15e-07   234s
  60   4.70888682e+00  4.25495293e+00  4.01e-04 2.69e-05  5.85e-07   238s
  61   4.46821463e+00  4.25529162e+00  2.04e-04 1.79e-05  2.73e-07   242s
  62   4.44261298e+00  4.25527802e+00  5.05e-04 1.38e-05  2.42e-07   247s
  63   4.44174896e+00  4.25527838e+00  5.97e-04 1.37e-05  2.40e-07   251s
  64   4.42075312e+00  4.25526979e+00  5.84e-04 1.23e-05  2.15e-07   255s
  65   4.41689806e+00  4.25523911e+00  1.07e-03 1.23e-05  2.14e-07   259s
  66   4.36442996e+00  4.25506559e+00  1.10e-03 8.67e-06  1.50e-07   263s
  67   4.34919840e+00  4.25504084e+00  1.39e-03 7.94e-06  1.34e-07   269s
  68   4.34305306e+00  4.25498214e+00  1.42e-03 7.16e-06  1.27e-07   273s
  69   4.34381705e+00  4.25500046e+00  1.14e-03 7.12e-06  1.26e-07   277s
  70   4.34395408e+00  4.25501301e+00  1.14e-03 7.11e-06  1.26e-07   281s
  71   4.33810575e+00  4.25498950e+00  1.36e-03 7.03e-06  1.21e-07   286s
  72   4.33867273e+00  4.25499677e+00  1.30e-03 7.03e-06  1.21e-07   291s
  73   4.33924790e+00  4.25499991e+00  1.20e-03 7.03e-06  1.21e-07   295s
  74   4.33698105e+00  4.25497971e+00  1.38e-03 6.89e-06  1.19e-07   299s
  75   4.33713233e+00  4.25500191e+00  1.30e-03 6.83e-06  1.19e-07   304s
  76   4.32367745e+00  4.25492090e+00  1.34e-03 6.12e-06  1.06e-07   309s
  77   4.31926081e+00  4.25488383e+00  1.19e-03 3.06e-06  9.81e-08   313s
  78   4.28363807e+00  4.25484688e+00  1.18e-03 2.48e-06  5.36e-08   319s
  79   4.28358423e+00  4.25485065e+00  1.14e-03 3.19e-06  5.29e-08   323s
  80   4.27094012e+00  4.25482285e+00  1.61e-03 2.83e-06  3.91e-08   327s
  81   4.26651371e+00  4.25477304e+00  1.47e-03 1.92e-06  3.36e-08   332s
  82   4.26390681e+00  4.25477090e+00  1.59e-03 1.85e-06  3.26e-08   336s
  83   4.26386031e+00  4.25478345e+00  1.45e-03 1.75e-06  3.07e-08   339s
  84   4.26386084e+00  4.25480563e+00  1.44e-03 2.34e-06  3.06e-08   342s
  85   4.25973270e+00  4.25477727e+00  1.42e-03 2.02e-06  2.57e-08   347s
  86   4.25782844e+00  4.25477559e+00  1.59e-03 2.01e-06  2.43e-08   351s
  87   4.25324506e+00  4.25474647e+00  2.08e-03 9.87e-07  2.32e-08   355s
  88   4.25164700e+00  4.25472656e+00  2.26e-03 9.23e-07  2.14e-08   358s
  89   4.25244667e+00  4.25472981e+00  2.15e-03 5.93e-07  1.56e-08   363s
  90   4.25321144e+00  4.25475443e+00  2.14e-03 6.23e-07  1.52e-08   367s
  91   4.24814043e+00  4.25472332e+00  1.55e-03 4.63e-07  9.07e-09   372s
  92   4.24585166e+00  4.25470240e+00  1.71e-03 4.75e-07  7.78e-09   375s
  93   4.24171212e+00  4.25468670e+00  2.40e-03 4.74e-07  7.32e-09   380s
  94   4.24098425e+00  4.25468684e+00  3.03e-03 4.72e-07  7.42e-09   384s
  95   4.24336777e+00  4.25466015e+00  2.60e-03 4.44e-07  6.69e-09   388s
  96   4.24400981e+00  4.25469275e+00  2.47e-03 4.50e-07  6.60e-09   392s
  97   4.24262430e+00  4.25468964e+00  2.66e-03 4.24e-07  6.21e-09   395s
  98   4.24459887e+00  4.25469368e+00  2.41e-03 4.50e-07  6.20e-09   399s
  99   4.24389750e+00  4.25468451e+00  2.45e-03 4.17e-07  6.09e-09   403s
 100   4.24554924e+00  4.25471269e+00  2.15e-03 3.68e-07  4.91e-09   410s
 101   4.24349931e+00  4.25468436e+00  2.33e-03 3.71e-07  3.16e-09   414s
 102   4.24182254e+00  4.25466078e+00  2.16e-03 6.56e-07  2.93e-09   417s
 103   4.24064153e+00  4.25466188e+00  2.02e-03 6.46e-07  2.55e-09   422s
 104   4.23939885e+00  4.25466385e+00  3.90e-03 1.94e-06  2.52e-09   426s
 105   4.23934349e+00  4.25465444e+00  3.90e-03 1.96e-06  2.52e-09   429s
 106   4.23951384e+00  4.25464289e+00  3.65e-03 1.97e-06  2.35e-09   433s
 107   4.24093185e+00  4.25465460e+00  3.52e-03 1.77e-06  2.29e-09   437s
 108   4.24062077e+00  4.25465183e+00  3.49e-03 1.76e-06  2.27e-09   440s
 109   4.24039556e+00  4.25464771e+00  3.50e-03 1.78e-06  2.26e-09   443s
 110   4.24036057e+00  4.25464051e+00  3.45e-03 1.69e-06  1.96e-09   448s
 111   4.24047616e+00  4.25465294e+00  3.45e-03 1.54e-06  1.96e-09   452s
 112   4.24046828e+00  4.25464954e+00  3.45e-03 1.55e-06  1.96e-09   455s
 113   4.23946634e+00  4.25464597e+00  3.46e-03 1.56e-06  1.95e-09   459s
 114   4.23927292e+00  4.25464484e+00  3.46e-03 1.57e-06  1.95e-09   463s
 115   4.24034459e+00  4.25465880e+00  3.44e-03 1.50e-06  1.95e-09   467s
 116   4.23970018e+00  4.25465720e+00  3.42e-03 1.51e-06  1.93e-09   471s
 117   4.23863977e+00  4.25463453e+00  3.43e-03 1.56e-06  1.90e-09   476s
 118   4.23869569e+00  4.25467512e+00  3.57e-03 1.07e-06  1.52e-09   488s
 119   4.23705728e+00  4.25463625e+00  3.22e-03 1.16e-06  1.28e-09   493s
 120   4.23469187e+00  4.25462746e+00  3.31e-03 1.15e-06  1.27e-09   497s
 121   4.23439270e+00  4.25462742e+00  3.33e-03 1.09e-06  1.26e-09   500s
 122   4.23547315e+00  4.25465316e+00  3.20e-03 9.60e-07  1.22e-09   507s
 123   4.23676306e+00  4.25465585e+00  3.07e-03 9.60e-07  1.20e-09   511s
 124   4.23475707e+00  4.25465661e+00  3.13e-03 9.40e-07  1.18e-09   515s
 125   4.23586300e+00  4.25467690e+00  3.01e-03 8.90e-07  1.14e-09   522s
 126   4.23694065e+00  4.25467022e+00  2.94e-03 8.89e-07  1.14e-09   527s
 127   4.23472026e+00  4.25464817e+00  2.98e-03 9.17e-07  1.10e-09   531s
 128   4.23574765e+00  4.25465968e+00  2.98e-03 8.54e-07  1.09e-09   536s
 129   4.23432358e+00  4.25464940e+00  3.03e-03 8.73e-07  1.07e-09   540s
 130   4.23438978e+00  4.25467185e+00  3.02e-03 7.90e-07  1.08e-09   544s
 131   4.23355314e+00  4.25465341e+00  3.11e-03 8.08e-07  1.06e-09   548s
 132   4.23504948e+00  4.25465809e+00  3.01e-03 7.96e-07  1.05e-09   552s
 133   4.23485103e+00  4.25465484e+00  3.01e-03 7.99e-07  1.04e-09   556s
 134   4.23465336e+00  4.25465303e+00  3.03e-03 8.04e-07  1.04e-09   560s
 135   4.23490343e+00  4.25465505e+00  3.01e-03 7.97e-07  1.04e-09   564s

Barrier performed 135 iterations in 564.26 seconds (257.34 work units)
Sub-optimal termination - objective 4.25973270e+00

Crossover log...

    8037 DPushes remaining with DInf 0.0000000e+00               569s
    2129 DPushes remaining with DInf 0.0000000e+00               570s
     722 DPushes remaining with DInf 0.0000000e+00               607s
     642 DPushes remaining with DInf 0.0000000e+00               636s
     544 DPushes remaining with DInf 0.0000000e+00               658s
     535 DPushes remaining with DInf 0.0000000e+00               662s
Warning: 1 variables dropped from basis

Restart crossover...

    7502 variables added to crossover basis                      667s

   60526 PPushes remaining with PInf 9.8997184e-02               668s
   58349 PPushes remaining with PInf 6.8845980e-02               671s
   56906 PPushes remaining with PInf 5.3039611e-02               676s
   51653 PPushes remaining with PInf 4.3479789e-01               680s
   43782 PPushes remaining with PInf 1.0356553e+02               685s
   23724 PPushes remaining with PInf 3.2789549e+01               693s
   21965 PPushes remaining with PInf 1.8968886e+00               695s
   17717 PPushes remaining with PInf 8.8570262e-01               700s
   13469 PPushes remaining with PInf 5.7290146e-01               706s
    9693 PPushes remaining with PInf 3.0275702e-01               711s
    6389 PPushes remaining with PInf 1.5611568e-01               715s
    2613 PPushes remaining with PInf 4.9072237e-02               721s
       0 PPushes remaining with PInf 0.0000000e+00               725s

     310 DPushes remaining with DInf 0.0000000e+00               726s
     262 DPushes remaining with DInf 0.0000000e+00               807s

  Push phase complete: Pinf 0.0000000e+00, Dinf 1.9591731e+02    891s

Iteration    Objective       Primal Inf.    Dual Inf.      Time
   60571    4.2598314e+00   0.000000e+00   1.959173e+02    892s
   60671    4.2531709e+00   0.000000e+00   4.084320e-03    928s
Extra simplex iterations after uncrush: 3
   60740    4.2549670e+00   0.000000e+00   0.000000e+00    960s

Solved with barrier
Solved in 60740 iterations and 960.58 seconds (554.21 work units)
Optimal objective  4.254967016e+00

User-callback calls 135838, time in user-callback 0.26 sec
value(ub0) = 4.254967016250345
* Solver : Gurobi

* Status
  Termination status : OPTIMAL
  Primal status      : FEASIBLE_POINT
  Dual status        : FEASIBLE_POINT
  Message from the solver:
  "Model was solved to optimality (subject to tolerances), and an optimal solution is available."

* Candidate solution
  Objective value      : 4.25497e+00
  Objective bound      : 4.25497e+00
  Dual objective value : 4.25497e+00

* Work counters
  Solve time (sec)   : 9.60960e+02
  Barrier iterations : 135
  Node count         : 0

As it can be seen, the answer of Mosek and Gurobi are similar up to 5 digits.
The problem is not specifically related to this optimization. I think whenever Mosek switches to Simplex method, it does not consider the answer of Simplex method and only considers the answer of IPM. I am also wondering why in the solution summary of Mosek the Simplex iterations is 0 and the Barrier iterations is 13, while there are 5725 iterations for Simplex.

I wonder if this is actually Optimal solution is third when there are starting values and conic constraints · Issue #66 · jump-dev/MosekTools.jl · GitHub.

It looks like the optimal solution might be the second result, and we’re asking for the first.

What is value(ub0; result = 2)?

1 Like

Can you try: Sort solutions so that an optimal solution is first by odow · Pull Request #116 · jump-dev/MosekTools.jl · GitHub?

To install, run ] add MosekTools#odow-patch-1, then restart Julia.

2 Likes

Thank you.
I added your patch it works perfectly. Now, I can access the desired information of optimal value.

1 Like

@Khashayar-Neshat Khyash love to see you using symmetry reduction :wink:

1 Like