Using SDPT3 is not feasible, the result can be obtained using the sedumi parser, but the optimization result does not correspond to the value of the optimization variable

Successive approximation method to be employed.
For improved efficiency, SeDuMi is solving the dual problem.
SeDuMi will be called several times to refine the solution.
Original size: 10691 variables, 4780 equality constraints
196 exponentials add 1568 variables, 980 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
196/196 | 8.000e+00 6.067e+00 0.000e+00 | Unbounded
196/196 | 4.785e+00 1.307e+00 0.000e+00 | Unbounded
0/ 0 | 3.421e-01 0.000e+00 0.000e+00 | Inaccurate/Solved
0/ 0 | 2.923e-01 0.000e+00 0.000e+00 | Inaccurate/Solved
0/ 0 | 1.430e-01 0.000e+00 0.000e+00 | Inaccurate/Solved

Status: Inaccurate/Solved
Optimal value (cvx_optval): +1.08722e+07

You should install CVXQUAD and its exponential.m replacement, per The status failed but still got the result .

You haven’t shown your program, so I don’t know what modifications, if any, will need to be made to your program in order that CVXQUAD’s Pade approximant is used instead of CVX’s successive approximation method. If your program uses gp mode, or uses entr or rel_entr, but not directly log or exp, then no modifications should be required. If it uses log, then replace log(x) with -rel_entr(1,x). Otherwise, something else may be needed.

Your problem was inaccurately solved, so maybe not very reliable. cvx_optval of 1.08722e+07 suggests poor scaling, which may contribute to solution difficulty.

I don’t understand what exactly you mean by “optimization result does not correspond to the value of the optimization variable”

1 Like
  for j = 1:98
  sumbits = sumbits + G*(pow_abs(sum(Lu(j,:)),3))/(slot^2);  
 sumbits <= 4*10^4;   
 for j=1:2
  for i =1:100
  norm(v0(i,:,j),2)^2+ 2*v0(i,:,j)'*(v(i,:,j)-v0(i,:,j)) >= tao(i,j)^2;
  for j=1:2
  for i=1:100
  tao(i,j) >= 0; 

  for j=1:2
  for i=1:98
    norm(q0(i,:,j)-w,2)^2 + 2*(q0(i,:,j)-w)'*(q(i,:,j)-w) <= y(i,j);

   for i=1:2
   sum(Lo(:,i)) == (1-rou(i))*L1(i);
   for i=1:2
   sum(Lu(:,i)) == (1-rou(i))*L1(i);
   for i=1:2
   sum(Lu(:,i)) <= sum(Lo(:,i))
  for j=1:2
  for i=1:100
      q(i+1,:,j)== q(i,:,j) + v(i,:,j)*slot + 0.5*a(i,:,j)*slot^2;
      v(i+1,:,j)== v(i,:,j) + a(i,:,j)*slot; 
 for j=1:2
 for i=1:101
  50 >= norm(v(i,:,j),2) ; 

 for j=1:2
  for i=1:100
  for i=1:2
  1 >= rou(i) >= 0 ; 

  for i=1:2
      for j=1:98
      Lo(j,i) >= 0;
  for i=1:2
      for j=1:98
      Lu(j,i) >= 0;
  for i=1:2
      for j=1:98
        0<= p(j,i)<=2;

Hello, this is my code, please take a look, Thank you very much!
I mean the objective function is a combination of optimization variables, but they are not consistent after optimization (the value of UAV_energy does not correspond to the values of the optimized variables v and a)

UAV_energy is a CVX expression. CVX does not guarantee that CVX expressions will have the final “optimal” value after CVX finishes. You need to compute it after CVX finishes, using the optimal values returned of the CVX variables.

When CVXQUAD and its exponential.m replacement are installed, no further modifications are needed of your program in order for the Pade approximation to be used. However, your problem is still numerically very difficult, and you should try to improve scaling. Using sedumi, I obtained cvx_optval = 4.36937e+06, but that was inaccurate/solved, and sedumir ran into numerical problems . With SDPT3, it was reported as (suspected) infeasible. You should try using MOSEK (after installing CVXQUAD), because it may best deal with the numerical challenges. You should still look at improving scaling.

Ok, I will try again, thank you very much for your answer.

Hello,I have installed CVXQUAD and its exponential.m,and I used MOSEK, its status is failed,and optimal value is NAN,but the optimized variable can be obtained correctly,can you tell me why this phenomenon occurs

Using Pade approximation for exponential

cone with parameters m=3, k=3


Calling Mosek 14025 variables, 6152 equality constraints

For improved efficiency, Mosek is solving the dual problem.

MOSEK Version (Build date: 2017-3-1 13:09:33)

Copyright © MOSEK ApS, Denmark. WWW:

Platform: Windows/64-X86


Name :

Objective sense : min

Type : CONIC (conic optimization problem)

Constraints : 6152

Cones : 3278

Scalar variables : 14025

Matrix variables : 0

Integer variables : 0

Optimizer started.

Conic interior-point optimizer started.

Presolve started.

Linear dependency checker started.

Linear dependency checker terminated.

Eliminator started.

Freed constraints in eliminator : 1578

Eliminator terminated.

Eliminator started.

Freed constraints in eliminator : 0

Eliminator terminated.

Eliminator - tries : 2 time : 0.00

Lin. dep. - tries : 1 time : 0.01

Lin. dep. - number : 0

Presolve terminated. Time: 0.08

Optimizer - threads : 4

Optimizer - solved problem : the primal

Optimizer - Constraints : 4183

Optimizer - Cones : 3279

Optimizer - Scalar variables : 12055 conic : 9659

Optimizer - Semi-definite variables: 0 scalarized : 0

Factor - setup time : 0.05 dense det. time : 0.00

Factor - ML order time : 0.01 GP order time : 0.00

Factor - nonzeros before factor : 6.01e+004 after factor : 7.80e+004

Factor - dense dim. : 9 flops : 7.44e+006


0 1.0e+000 1.3e+011 9.2e+010 0.00e+000 6.144000000e+018 0.000000000e+000 1.0e+000 0.19

1 4.2e-001 5.4e+010 2.5e+010 -1.00e+000 6.144005700e+018 1.411947656e+004 4.2e-001 0.31

2 1.4e-001 1.8e+010 4.9e+009 -1.00e+000 6.144005496e+018 2.420857526e+003 1.4e-001 0.33

3 1.1e-001 1.4e+010 3.3e+009 -1.00e+000 6.144005213e+018 -4.975828808e+003 1.1e-001 0.36

4 1.0e-001 1.4e+010 3.1e+009 -1.00e+000 6.144005190e+018 -6.443131667e+003 1.0e-001 0.38

5 6.7e-002 8.7e+009 1.6e+009 -1.00e+000 6.144005130e+018 -2.516829627e+004 6.7e-002 0.39

6 2.0e-002 2.6e+009 2.6e+008 -1.00e+000 6.144006399e+018 -1.476053363e+005 2.0e-002 0.41

7 6.1e-003 7.9e+008 4.4e+007 -1.00e+000 6.144005407e+018 -1.458756450e+005 6.1e-003 0.41

8 3.2e-003 4.1e+008 1.6e+007 -1.00e+000 6.144004144e+018 -1.457794956e+005 3.2e-003 0.42

9 6.7e-004 8.7e+007 1.6e+006 -1.00e+000 6.143994059e+018 -1.662173238e+005 6.7e-004 0.44

10 1.4e-004 1.8e+007 1.5e+005 -1.00e+000 6.143944328e+018 -2.455717578e+005 1.4e-004 0.44

11 1.8e-005 2.3e+006 6.8e+003 -1.00e+000 6.143514834e+018 -3.390536241e+005 1.8e-005 0.45

12 3.8e-006 4.9e+005 6.7e+002 -1.00e+000 6.141887462e+018 -3.001514178e+005 3.8e-006 0.47

13 7.2e-007 9.3e+004 5.6e+001 -9.99e-001 6.131005856e+018 -2.955668660e+005 7.2e-007 0.48

14 1.9e-007 2.5e+004 7.9e+000 -9.96e-001 6.097550448e+018 -2.939671249e+005 1.9e-007 0.50

15 4.2e-008 5.5e+003 8.3e-001 -9.84e-001 5.921447577e+018 -2.855706892e+005 4.2e-008 0.50

16 1.1e-008 1.4e+003 1.3e-001 -9.13e-001 5.075491438e+018 -2.439540814e+005 1.1e-008 0.52

17 5.3e-009 6.9e+002 8.1e-002 -2.67e-001 2.857759989e+018 -1.342604837e+005 5.3e-009 0.53

18 1.4e-009 1.9e+002 1.1e-001 1.04e+000 6.208524638e+017 -2.357539610e+004 1.4e-009 0.55

19 5.8e-010 7.6e+001 7.8e-002 1.45e+000 1.966163690e+017 -2.607450346e+003 5.8e-010 0.58

20 2.8e-010 3.7e+001 4.2e-002 1.33e+000 9.048608459e+016 2.592760102e+003 2.8e-010 0.59

21 8.5e-011 1.1e+001 2.4e-002 1.48e+000 2.079357896e+016 5.920053814e+003 8.5e-011 0.61

22 2.7e-011 3.5e+000 1.6e-002 1.38e+000 5.235145245e+015 6.360194783e+003 2.7e-011 0.64

23 9.9e-012 1.3e+000 1.1e-002 1.37e+000 1.599760746e+015 6.438123758e+003 9.9e-012 0.66

24 3.1e-012 4.0e-001 6.9e-003 1.29e+000 4.323774438e+014 6.496806454e+003 3.1e-012 0.67

25 2.5e-012 3.2e-001 6.2e-003 1.16e+000 3.403376642e+014 6.505189052e+003 2.5e-012 0.70

26 5.6e-013 6.5e-002 2.9e-003 1.13e+000 6.587684480e+013 6.530443918e+003 5.0e-013 0.72

27 5.2e-013 6.5e-002 2.9e-003 9.44e-001 6.580498400e+013 6.530485140e+003 5.0e-013 0.77

28 5.2e-013 6.5e-002 2.9e-003 9.46e-001 6.580498400e+013 6.530485140e+003 5.0e-013 0.80

Interior-point optimizer terminated. Time: 0.84.

Optimizer terminated. Time: 0.95

Interior-point solution summary

Problem status : UNKNOWN

Solution status : UNKNOWN

Primal. obj: 6.5804984001e+013 nrm: 3e+012 Viol. con: 4e+000 var: 0e+000 cones: 5e-002

Dual. obj: 6.5304851395e+003 nrm: 1e+013 Viol. con: 0e+000 var: 1e+010 cones: 0e+000

Optimizer summary

Optimizer - time: 0.95

Interior-point          - iterations : 29        time: 0.84    

  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: Failed

Optimal value (cvx_optval): NaN

It appears hat you have successfully installed CVXQUAD and its exponential.m replacement.

Your problem is numerically difficult You need to try to improve the scaling so that variables and objective function are closer to 1 in magnitude. I will leave it to others to provide more specific assessment and suggestions.

I don’t know whether it matters, but to be on the safe side, I suggest you put everything after minimize in that line in parentheses.

Ok,Thank you very much!

Your problem is extremely nasty judging from the MOSEK log. Or at least the approximation is.

The upcoming MOSEK version 9 will be able to deal with exponential cone directly and that is almost surely a better way for your problem if it is not inherently nasty.

If you talk to MOSEK support we can let you try it out for instance via. cvxpy.

1 Like

OK, thank you very much

Regarding MOSEK 9, please note that there has been no announcement that a CVX version will be produced which can utilize MOSEk 9’s native exponential cone capability.

If such support is available under cvxpy, great, but note that cvxpy is a different tool (runs under Python) than CVX.

What should I do to improve the scaling so that variables and objective function are closer to 1 in magnitude,Can I improve if I write code in Python and use

Thanks for clarifying Mark.