CVX Warning: The successive approximation method

Hi I am running an optimization code and having this error.
CVX Warning:
Models involving “log” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.

I am totally new to this thing. There is no log or exp function in my code and I have installed MOSEK as a solver as well but the problem remains the same.
Kindly help.
Thank you in advance.

Please show us the output from cvx_version as well as your code so that we can diagnose matters.

CVX 2.2 with Mosek 9.x uses Mosek’s native exponential cone capability, but CVX still prints the warning message when there are exponential cone functions, even if Mosek’s native exponential cone capability is used instead of the successive approximation method.

That you are getting the warning message suggests your program does have exponential cone functions, for instance not just log and exp, but also entr, rel_entr, among others.

I have no idea what error "infeasible channel " means without seeing the code and output from running it.

1 Like

Thankyou so much for the reply.

My cvx_version is showing the following message:

CVX: Software for Disciplined Convex Programming ©2014 CVX Research
Version 2.1, Build 1127 (95903bf) Sat Dec 15 18:52:07 2018

Installation info:
Path: R:\cvx-w64\cvx
MATLAB version: 9.4 (R2018a)
OS: Windows 10 amd64 version 10.0
Java version: 1.8.0_144
Verfying CVX directory contents:
WARNING: The following extra files/directories were found:
R:\cvx-w64\cvx\licenses\ + 1 files, 0 subdirectories
These files may alter the behavior of CVX in unsupported ways.
Preferences:
Path: C:\Users\Hp\AppData\Roaming\MathWorks\MATLAB\cvx_prefs.mat
License host:
Username: Hp
Host ID: f8633f97403b (eth2)
Installed license:
Organization: NUST
Contact: ------------------------------------------------------------------------
License type: academic
Named user: Hp
Host ID: f8633f97403b
Expiration: 2021-02-21 (366 days remaining)
Status: verified

Kindly solve this warning issue for me.
Thank-you

cvx_begin sdp quiet

variables u R1 R2 alpha1 alpha2 alpha3 alpha4 beta1 beta2 p1 p2
minimize u
subject to

                 R1<=Bw*log(1+((h(1)*p1+h(2)*p2)/(sigma)))-R2;
                 R2<=Bw*log(1+((h(2)*p2)/(sigma)));
                 [u alpha2; alpha2  alpha1]>=0;
                 2*alpha2_0*alpha2-alpha2_0^2>=d1*R1-d2*R2;
         
                 [R1  beta1; beta1  R2]>=0;
                 2*beta1_0*beta1-beta1_0^2>=alpha1;
         
                 [u alpha4; alpha4  alpha3]>=0;
                 2*alpha4_0*alpha4-alpha4_0^2>=d2*R1-d1*R2;
         
                 [R1  beta2; beta2  R2]>=0;
                 2*beta2_0*beta2-beta2_0^2>=alpha3;
         
                 p1<=P(1);
                 p2<=P(2);
                 p1>=P_min(1);
                 p2>=P_min(2);
         
                 u>=0;
                 cvx_end

This is the cvx part of code.

and the other error is coming from this part.

if isnan(cvx_optval)==1|| isfinite(cvx_optval)==0
fprintf(‘infeasible channel \n’);
u=0;
break;
end
u=cvx_optval;
if abs((u-u0))<=0.001 || count_ite>=100
break;
end

From where should I change the parameters to remove this infeasible error.
Thank-you

First of all, don’t use quiet until after you have the program running correctly and all checked out. That way, you’ll see the solver and CVX output.

Second, install CVX 2.2. Then with MOSEK 9.x as solver, it should use MOSEK’s native exponential cone capability. Please show us the output so that we can verify that in fact MOSEK’s native exponential cone capability was used instead of CVX’s successive approximation method.

Also, note that contrary to your earlier assertion, your code does contain log of a CvX expression.

1 Like

Thank-you for quick response and being this much helpful.
I saw one of your reply to some other post about the installation of version 2.2 and you are talking about some glitch in that version. Kindly clear that too. Also I am being redirected towards the website of cvx which only got a zip file with no version number mentioned on it. How can I upgrade my current version?

I ran the command by removing quiet. It was running and I paused in middle to have some idea. Here is one of the portion if you can have idea of the MOSEK through it.

Status: Solved
Optimal value (cvx_optval): +0.0154325

Successive approximation method to be employed.
For improved efficiency, Mosek is solving the dual problem.
Mosek will be called several times to refine the solution.
Original size: 27 variables, 11 equality constraints
2 exponentials add 16 variables, 10 equality constraints

Cones | Errors |
Mov/Act | Centering Exp cone Poly cone | Status
--------±--------------------------------±--------
0/ 0 | 0.000e+00 0.000e+00 0.000e+00 | Solved

Status: Solved
Optimal value (cvx_optval): +1.17246e-07

Calling Mosek 8.0.0.60: 20 variables, 9 equality constraints
For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 8.0.0.60 (Build date: 2017-3-1 13:09:33)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 9
Cones : 4
Scalar variables : 20
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 : 4
Eliminator terminated.
Eliminator - tries : 1 time : 0.00
Lin. dep. - tries : 1 time : 0.02
Lin. dep. - number : 0
Presolve terminated. Time: 0.03
Optimizer - threads : 4
Optimizer - solved problem : the primal
Optimizer - Constraints : 5
Optimizer - Cones : 4
Optimizer - Scalar variables : 16 conic : 12
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.00 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 14 after factor : 15
Factor - dense dim. : 0 flops : 2.19e+002
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+000 8.2e+004 9.7e-001 0.00e+000 -1.280000000e+002 0.000000000e+000 1.0e+000 0.05
1 2.4e-001 1.9e+004 1.1e-001 -1.00e+000 -1.357159655e+004 -1.175038123e+002 2.4e-001 0.11
2 3.6e-002 3.0e+003 6.7e-003 -1.00e+000 -1.095736130e+005 -1.035332055e+003 3.6e-002 0.11
3 7.8e-003 6.4e+002 6.7e-004 -9.98e-001 -5.207496978e+005 -4.741922778e+003 7.8e-003 0.11
4 1.9e-003 1.6e+002 8.1e-005 -9.92e-001 -2.126750067e+006 -2.401347452e+004 1.9e-003 0.11
5 5.7e-004 4.6e+001 1.4e-005 -9.67e-001 -6.675891639e+006 -6.420147261e+004 5.7e-004 0.13
6 1.3e-004 1.1e+001 1.7e-006 -8.90e-001 -2.217625135e+007 -3.107932533e+005 1.3e-004 0.13
7 3.0e-005 2.5e+000 3.3e-007 -5.48e-001 -3.407016953e+007 -5.701063117e+005 3.0e-005 0.13
8 5.3e-006 4.3e-001 1.6e-007 4.54e-001 -4.882423649e+006 -7.755048063e+005 5.3e-006 0.14
9 8.7e-007 7.1e-002 8.6e-008 1.40e+000 -9.505455699e+005 -5.584162080e+005 8.7e-007 0.14
10 1.9e-007 1.6e-002 5.0e-008 1.28e+000 -3.347609712e+005 -2.787997065e+005 1.9e-007 0.14
11 5.7e-008 4.7e-003 2.6e-008 1.30e+000 -5.975955157e+004 -4.188171794e+004 5.7e-008 0.16
12 1.4e-008 1.1e-003 1.3e-008 1.06e+000 -2.121046774e+004 -1.695124711e+004 1.4e-008 0.16
13 3.2e-009 2.6e-004 6.0e-009 1.03e+000 -3.971097134e+003 -2.903923866e+003 3.2e-009 0.16
14 8.8e-010 7.2e-005 3.2e-009 1.02e+000 -1.347111285e+003 -1.058590264e+003 8.8e-010 0.17
15 2.4e-010 2.0e-005 1.6e-009 9.81e-001 -2.847845949e+002 -1.983667564e+002 2.4e-010 0.17
16 6.5e-011 5.3e-006 8.6e-010 1.02e+000 -1.083587790e+002 -8.676254547e+001 6.5e-011 0.17
17 1.6e-011 1.3e-006 4.1e-010 9.79e-001 -1.939286029e+001 -1.358683278e+001 1.6e-011 0.17
18 4.0e-012 3.3e-007 2.1e-010 1.01e+000 -6.824451845e+000 -5.422558785e+000 4.0e-012 0.19
19 9.2e-013 7.6e-008 9.8e-011 9.86e-001 -1.349736513e+000 -1.010872024e+000 9.2e-013 0.19
20 2.5e-013 2.1e-008 5.2e-011 9.96e-001 -4.740496910e-001 -3.837736994e-001 2.5e-013 0.19
21 7.2e-014 5.9e-009 2.7e-011 9.60e-001 -1.382544929e-001 -1.102346335e-001 7.2e-014 0.19
22 2.4e-014 2.0e-009 1.5e-011 9.88e-001 -7.337204267e-002 -6.413274896e-002 2.4e-014 0.20
23 6.1e-015 5.0e-010 7.3e-012 9.22e-001 -2.899842551e-002 -2.634341186e-002 6.1e-015 0.20
24 1.9e-015 1.6e-010 4.1e-012 9.71e-001 -2.145562002e-002 -2.061323889e-002 1.9e-015 0.20
25 9.5e-017 7.8e-012 8.8e-013 9.66e-001 -1.623211784e-002 -1.618683263e-002 9.5e-017 0.20
Interior-point optimizer terminated. Time: 0.22.

Optimizer terminated. Time: 0.27

Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: -1.6232117836e-002 nrm: 1e+000 Viol. con: 3e-006 var: 6e-005 cones: 0e+000
Dual. obj: -1.6186832629e-002 nrm: 2e+001 Viol. con: 0e+000 var: 4e-010 cones: 0e+000
Optimizer summary
Optimizer - time: 0.27
Interior-point - iterations : 25 time: 0.22
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

http://cvxr.com/cvx/download currently shows Version 2.2, January 2020, Build 1148 . Download and install that. Make sure you have MOSEK 9.1 - I think that is included in the CVX distribution, but the CVX 2.1 you used included MOSEK 8.0.0.60, which by the way paths are set up, may have taken preccdence over another version of MOSEK, although that can be taken care of by removing or renaming that mosek directory under CVX, or specify the long version of the the right Mosek solver version which you can see if issue cvx_solver.

I advised against using CVX 3.0beta. I advise for using CVX 2.2, with Mosek 9.x if you can.

You are showing the output of 2 different runs, the first with CVX’s successive approximation method, and the 2nd not. Given that Mosek 8.0.0.60 is stated, it would appear this was either solving a different problem not having exponential cone functions,such as log, or that CVXQUAD was used and you didn’t show us that earlier part of the output.

When you run the problem with log in CVX 2.2 with Mosek 9.1 installed, CVX should utilize Mosek’s native exponential cone capability, which should be the best option utilization of that capability i(presuming you don’t have CVXQUAD with its exponential.m replacement installed, and even then it won’t be triggered on log without reformulation).

Finally, per the output, both of your problems were solved to claimed optimality. If you have evidence to the contrary, please inform us.

1 Like

I have upgraded the cvx version to 2.2 and it comes up with the MOSEK 9.1. I have run the code again and it is giving the same error still.
Secondly. I just took some part of output to show you when it was running in iteration.

You haven’t shown us an error yet. if you have an error, please show it to us, including explanation for why it is an error. If CVX and the solver report that the problem has been reported to optimality, but you think the answer has an “error”, perhaps your model is deficient.

The very 1st error which I was getting while running my code in the start for which I have upgraded the cvx and solver version is still present.

CVX Warning:
Models involving “log” or other functions in the log, exp, and entropy
family are solved using an experimental successive approximation method.
This method is slower and less reliable than the method CVX employs for
other models. Please see the section of the user’s guide entitled
The successive approximation method
for more details about the approach, and for instructions on how to
suppress this warning message in the future.

While I remove the “quiet” while running the code, it never stops and keep giving the output in iteration, I have shared earlier,until I force stop it . In-short I am unable to run this code to get the output on graph which I want.

Thank-you for your kind help. As I am new to this thing so I am unable to get what is the real problem.

The CVX Warning is not an error. Unfortunately, it is now provided even when it does not apply, such as when MOSEK 9.1 is used with CVX 2.2.

If you want help with an error, you need to show us the code and the solver and CVX output. It is preferable if you can provide a reproducible problem , complete with inout data. If it runs for a long time using MOSEK, perhaps one of the MOSEK staff members who read tthis forum can help diagnose the trouble.

Yes I can provide the whole code and the details regarding cvx and solver. I will prefer to share it in some inbox kindly if it is possible as I don’t have the real copyrights for this code to avoid any future inconvenience.

Also, kindly if you can refer to the MOSEK staff member who can help me out in diagnosing the issue related to it.

Thank-you

First could you show the log output from Mosek 9.1 as you showed the one from Mosek 8.0 previously. The previous one looked like it solved really well.

If some Mosek model does not solve you can write to support@mosek.com. Please send the task file that causes problems, you can find instructions how to generate it in cvx here: https://docs.mosek.com/9.1/faq/faq.html#how-do-i-dump-the-problem-to-a-file-to-attach-with-my-support-question

1 Like

When I run code by adding “quiet” in cvx _begin line, it directly give that CVX Warning that I have mentioned from the start.
When I remove it, my command window runs in iteration for so long that I have to force stop it to see what is happening. I have shared before the MOSEK 8.1 version output. Here is small portion of MOSEK 9.1 version output.

"MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 9
Cones : 4
Scalar variables : 20
Matrix variables : 0
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 4
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries : 2 time : 0.00
Lin. dep. - tries : 1 time : 0.02
Lin. dep. - number : 0
Presolve terminated. Time: 0.08
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 9
Cones : 4
Scalar variables : 20
Matrix variables : 0
Integer variables : 0

Optimizer - threads : 4
Optimizer - solved problem : the primal
Optimizer - Constraints : 5
Optimizer - Cones : 4
Optimizer - Scalar variables : 16 conic : 12
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.00 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 14 after factor : 15
Factor - dense dim. : 0 flops : 2.11e+02
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+00 5.2e+06 1.0e+00 0.00e+00 -2.000000000e+00 0.000000000e+00 1.0e+00 0.11
1 2.1e-01 1.1e+06 4.6e-01 -1.00e+00 -7.935826917e+00 -2.141125185e+00 2.1e-01 0.31
2 2.7e-02 1.4e+05 1.6e-01 -1.00e+00 -6.094328545e+01 -2.231796744e+01 2.7e-02 0.31
3 6.6e-03 3.5e+04 8.2e-02 -1.00e+00 -2.442077152e+02 -9.168801141e+01 6.6e-03 0.33
4 2.3e-03 1.2e+04 4.8e-02 -1.00e+00 -8.036282389e+02 -3.604666731e+02 2.3e-03 0.33
5 5.5e-04 2.9e+03 2.4e-02 -1.00e+00 -2.915253939e+03 -1.111588726e+03 5.5e-04 0.34
6 1.5e-04 7.8e+02 1.2e-02 -9.98e-01 -1.235488644e+04 -5.627425518e+03 1.5e-04 0.34
7 2.9e-05 1.5e+02 5.4e-03 -9.93e-01 -5.608633728e+04 -2.277710161e+04 2.9e-05 0.36
8 6.4e-06 3.4e+01 2.4e-03 -9.59e-01 -2.436638988e+05 -1.084210439e+05 6.4e-06 0.38
9 1.9e-06 1.0e+01 9.5e-04 -6.95e-01 -4.633841078e+05 -2.302849756e+05 1.9e-06 0.38
10 3.7e-07 2.0e+00 1.5e-04 -1.09e-01 -4.695976628e+05 -3.041275230e+05 3.7e-07 0.39
11 1.0e-07 5.4e-01 1.8e-05 8.81e-01 -9.004916531e+04 -6.028673025e+04 1.0e-07 0.39
12 2.4e-08 1.3e-01 2.0e-06 9.68e-01 -2.921659315e+04 -2.253022668e+04 2.4e-08 0.41
13 5.9e-09 3.1e-02 2.5e-07 1.01e+00 -6.848317653e+03 -5.161442161e+03 5.9e-09 0.41
14 1.6e-09 8.3e-03 3.4e-08 1.00e+00 -1.856060116e+03 -1.399968814e+03 1.6e-09 0.42
15 4.3e-10 2.2e-03 4.8e-09 9.98e-01 -5.114741424e+02 -3.883454872e+02 4.3e-10 0.44
16 1.1e-10 5.6e-04 6.1e-10 9.96e-01 -1.313598608e+02 -9.996571147e+01 1.1e-10 0.44
17 2.6e-11 1.4e-04 7.4e-11 9.96e-01 -3.318418831e+01 -2.543203940e+01 2.6e-11 0.45
18 6.9e-12 3.6e-05 1.0e-11 9.98e-01 -9.073073014e+00 -7.035740031e+00 6.9e-12 0.47
19 1.9e-12 1.0e-05 1.5e-12 9.93e-01 -2.606661350e+00 -2.032304190e+00 1.9e-12 0.47
20 5.7e-13 3.0e-06 2.4e-13 9.89e-01 -8.389016798e-01 -6.682574964e-01 5.7e-13 0.47
21 1.6e-13 8.6e-07 3.7e-14 9.79e-01 -2.766607517e-01 -2.260888533e-01 1.6e-13 0.48
22 4.6e-14 2.4e-07 5.6e-15 9.66e-01 -9.802832671e-02 -8.326048313e-02 4.6e-14 0.48
23 1.5e-14 7.8e-08 1.1e-15 9.60e-01 -4.841458493e-02 -4.335845009e-02 1.5e-14 0.50
24 4.7e-15 2.5e-08 2.0e-16 9.41e-01 -2.696633355e-02 -2.525498388e-02 4.7e-15 0.50
25 1.3e-15 6.6e-09 2.8e-17 9.56e-01 -1.859310328e-02 -1.812133911e-02 1.3e-15 0.52
26 2.3e-16 1.2e-09 2.1e-18 9.79e-01 -1.570294793e-02 -1.561750432e-02 2.2e-16 0.53
27 1.3e-17 5.2e-11 1.9e-20 9.94e-01 -1.504054487e-02 -1.503675629e-02 9.9e-18 0.53
28 1.6e-16 4.4e-13 1.0e-23 1.00e+00 -1.501013504e-02 -1.501010290e-02 8.4e-20 0.55
29 1.4e-15 1.8e-14 1.9e-25 1.00e+00 -1.500988185e-02 -1.500988124e-02 1.6e-21 0.55
Optimizer terminated. Time: 0.67

Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: -1.5009881851e-02 nrm: 1e+00 Viol. con: 3e-04 var: 9e-10 cones: 0e+00
Dual. obj: -1.5009881244e-02 nrm: 2e+01 Viol. con: 0e+00 var: 1e-08 cones: 0e+00
Optimizer summary
Optimizer - time: 0.67
Interior-point - iterations : 29 time: 0.56
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.0150099

Calling Mosek 9.1.9: 27 variables, 11 equality constraints
For improved efficiency, Mosek is solving the dual problem.

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:34:40)
Copyright © MOSEK ApS, Denmark. WWW: mosek.com
Platform: Windows/64-X86

Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 11
Cones : 6
Scalar variables : 27
Matrix variables : 0
Integer variables : 0

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 2
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.06
Problem
Name :
Objective sense : min
Type : CONIC (conic optimization problem)
Constraints : 11
Cones : 6
Scalar variables : 27
Matrix variables : 0
Integer variables : 0

Optimizer - threads : 4
Optimizer - solved problem : the primal
Optimizer - Constraints : 9
Optimizer - Cones : 6
Optimizer - Scalar variables : 25 conic : 18
Optimizer - Semi-definite variables: 0 scalarized : 0
Factor - setup time : 0.00 dense det. time : 0.00
Factor - ML order time : 0.00 GP order time : 0.00
Factor - nonzeros before factor : 28 after factor : 30
Factor - dense dim. : 0 flops : 3.14e+02
ITE PFEAS DFEAS GFEAS PRSTATUS POBJ DOBJ MU TIME
0 1.0e+00 4.1e+03 1.6e+00 0.00e+00 5.847573262e-01 0.000000000e+00 1.0e+00 0.11
1 8.9e-02 3.7e+02 4.7e-01 -9.99e-01 -1.460571529e+01 -5.065059138e+00 8.9e-02 0.31
2 1.0e-02 4.1e+01 1.5e-01 -9.88e-01 -1.389847976e+02 -4.679665321e+01 1.0e-02 0.31
3 2.6e-03 1.1e+01 6.2e-02 -8.36e-01 -3.647856290e+02 -1.324231028e+02 2.6e-03 0.33
4 7.9e-04 3.2e+00 1.7e-02 -1.23e-01 -3.513127678e+02 -1.703198722e+02 7.9e-04 0.33
5 4.3e-04 1.8e+00 7.1e-03 2.85e-01 -2.437657949e+02 -1.363762961e+02 4.3e-04 0.34
6 3.9e-05 1.6e-01 2.1e-04 6.59e-01 -5.896686697e+01 -4.710489065e+01 3.9e-05 0.36
7 1.1e-07 4.6e-04 2.3e-08 1.01e+00 -2.411547313e-01 -2.245716139e-01 1.1e-07 0.38
8 2.2e-10 9.0e-07 2.0e-12 1.00e+00 -4.746509638e-04 -4.420115780e-04 2.2e-10 0.38
9 4.3e-13 1.8e-09 1.7e-16 1.00e+00 -9.270525646e-07 -8.633037709e-07 4.3e-13 0.39
10 8.3e-15 3.4e-12 1.5e-20 1.00e+00 -1.810661782e-09 -1.686151444e-09 8.4e-16 0.39
Optimizer terminated. Time: 0.52

Interior-point solution summary
Problem status : PRIMAL_AND_DUAL_FEASIBLE
Solution status : OPTIMAL
Primal. obj: -1.8106617824e-09 nrm: 1e+00 Viol. con: 1e-11 var: 9e-10 cones: 0e+00
Dual. obj: -1.6861514442e-09 nrm: 6e+03 Viol. con: 0e+00 var: 2e-12 cones: 0e+00
Optimizer summary
Optimizer - time: 0.52
Interior-point - iterations : 10 time: 0.41
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): +1.68615e-09

Calling Mosek 9.1.9: 20 variables, 9 equality constraints
For improved efficiency, Mosek is solving the dual problem.
------------------------------------------------------------"

If MOSEK is solving fine than what could be the possible reason for getting that same CVX Warning till now. As I have to run the whole code to get some plotting.
You can ask if you need any other output to show you.

Thank-you so much for seeing my problem thoroughly.

Also now when I paused the compiler to run more, I got .m file popped up with the name “cvx_run_solver.m” and inside is:

function varargout = cvx_run_solver( sfunc, varargin )
global cvx___
settings_arg = varargin{end};
settings = varargin{end-1};
inputs = varargin(1:end-nargout-2);
dumpfile = ‘’;
custom_on = false;
if isstruct( settings ),
for f = fieldnames( settings )’,
sval = settings.(f{1});
if isequal( f{1}, ‘dumpfile’ ),
dumpfile = sval;
else
custom_on = true;
inputs{settings_arg}.(f{1}) = sval;
end
end
end
if custom_on,
fprintf( ‘NOTE: custom settings have been set for this solver.\n’ );
end
if ~isempty( dumpfile ),
if ~ischar( dumpfile ) || size( dumpfile, 1 ) > 1,
error( ‘CVX:Dumpfile’, ‘Invalid filename for the dumpfile.’ );
elseif length(dumpfile) < 4 || ~strcmpi(dumpfile(end-3:end),’.mat’),
dumpfile = [ dumpfile, ‘.mat’ ];
end
fprintf( ‘Saving output to: %s\n’, dumpfile );
fprintf( ‘------------------------------------------------------------\n’);
inp_names = cell(1,length(inputs));
for k = 1 : length(inp_names),
inp_names{1,k} = inputname(k+1);
end
dstruct = cell2struct( inputs, inp_names, 2 ); %#ok
save( dumpfile, ‘-struct’, ‘dstruct’ );
diaryfile = [ dumpfile, ‘.txt’ ];
fid = fopen( diaryfile, ‘w+’ );
if fid ~= 0,
fclose( fid );
diary( diaryfile );
end
elseif custom_on,
fprintf( ‘------------------------------------------------------------\n’);
end
errmsg = [];
if cvx___.isoctave,
fflush(1);
end
try
[ varargout{1:nargout} ] = sfunc( inputs{:} );
catch errmsg
[ varargout{1:nargout} ] = deal( [] );
end
if ~isempty( dumpfile ),
if fid ~= 0,
diary( ‘off’ );
fid = fopen( diaryfile, ‘r’ );
if fid ~= 0,
output = fread( fid, Inf, ‘*char’ )’;
fclose( fid );
delete( diaryfile );
end
end
if fid == 0,
output = ‘’;
end
otp_names = varargin(end-nargout-1:end-2);
dstruct = cell2struct( [ inputs, varargout, output ], [ inp_names, otp_names, ‘output’ ], 2 ); %#ok
save( dumpfile, ‘-struct’, ‘dstruct’ );
end
if ~isempty( errmsg ),
rethrow( errmsg );
end

% Copyright 2005-2016 CVX Research, Inc.
% See the file LICENSE.txt for full copyright information.
% The command ‘cvx_where’ will show where this file is located.

The Mosek log look fine. You can save one of the Mosek problem instances to a file using cvx_solver_settings('write', 'dump.opf') and then analyze by hand if it corresponds to the problem you wanted to model.

1 Like

I need to add this command inside the cvx code ? Cox it does’t work and I am unable to understand the error which is coming. The CVX warning remains the same.,

Here is what I wrote in a previous post in this thread

The CVX Warning is not an error. Unfortunately, it is now provided even when it does not apply, such as when MOSEK 9.1 is used with CVX 2.2.

This CVX warning nessage is not an error. It does not apply in your case. It is a “bug” or deficiency in the code for CVX 2.2 that the warning message is displayed even when it is not applicable, such as when solved with MOSEK 9.1. MOSEK solved the problem. There is no error.

1 Like

So it means my code is deficient to work with CVX 2.2 update. What do you suggest me in this case now kindly? I should change the version or something like that?

I am very much grateful to you for your help.