The Optimization problem is convex. But sometimes CVX failed to find the optimal solution

I suggest you look at the input data. I don;t know whether you will see a value 2.2e+011, because perhaps there have been transformations by CVX which might change the numbers before the problem is provided to Mosek.

Dear Sir:

We have rescaled the data and no warnings on the scale currently. But, unfortunately the following problem appears:

=====================================
Using Pade approximation for exponential
cone with parameters m=3, k=3
=====================================

Calling Mosek ![](file:///C:\Users\31297\AppData\Roaming\Tencent\QQ\Temp\%W@GJ$ACOF(TYDYECOKVDYB.png)8.0.0.60: 279 variables, 107 equality constraints
For improved efficiency, Mosek is solving the dual problem.
------------------------------------------------------------

MOSEK Version ![](file:///C:\Users\31297\AppData\Roaming\Tencent\QQ\Temp\%W@GJ$ACOF(TYDYECOKVDYB.png)8.0.0.60 (Build date: 2017-3-1 13:09:33)
Copyright (c) MOSEK ApS, Denmark. WWW: ![](file:///C:\Users\31297\AppData\Roaming\Tencent\QQ\Temp\%W@GJ$ACOF(TYDYECOKVDYB.png)mosek.com
Platform: Windows/64-X86

MOSEK warning 62: The A matrix contains a large value of -2.5e+014 in constraint '' (35) at variable '' (74).
Mosek error: MSK_RES_ERR_HUGE_C (A large value of 3.3e+021 has been specified in cx for variable '' (74).)
------------------------------------------------------------
Status: Error
Optimal value (cvx_optval): NaN

Reference to non-existent field 'sol'.

Error in cvx_mosek

Error in cvxprob/solve (line 423)
[ x, status, tprec, iters, y ] = shim.solve( At, b, c, cones, quiet, prec, solv.settings, eargs{:} );

Error in cvx_end (line 88)
solve( prob );

Error in ObjFun_FindMin_FlyDist_MultiUser (line 83)
cvx_end

Error in main (line 79)
[re_S_ue, re_S_u1 ,re_S_u2 ,re_S_u3 ,re_S_uu0 ,re_Xu, re_Yu] = ObjFun_FindMin_FlyDist_MultiUser(Delta_UAV,...

We also checked the cvx_version below:

cvx_version

---------------------------------------------------------------------------
CVX: Software for Disciplined Convex Programming       (c)2014 CVX Research
Version 2.1, Build 1127 (95903bf)                  Sat Dec 15 18:52:07 2018
---------------------------------------------------------------------------
Installation info:
    Path: D:\software\Matlab2018\bin\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:
        D:\software\Matlab2018\bin\cvx\mosek\mosek.lic
        D:\software\Matlab2018\bin\cvx\mosek\w64\mosek.lic
        D:\software\Matlab2018\bin\cvx\sets\exponential_backup0703.m
    These files may alter the behavior of CVX in unsupported ways.
Preferences: 
    Path: C:\Users\naq\AppData\Roaming\MathWorks\MATLAB\cvx_prefs.mat
License host:
    Username: naq
    Host ID: 38baf875d2f7 (eth1)
    Host ID: c8d3ff430480 (eth3)
Installed license:
    No license installed.
---------------------------------------------------------------------------

However, if we delete two constraints (blue highlighted in the following picture), the problem can be solved with Mosek now.

It is kind of weird. I think it is not the licence problem, otherwise the optimization problem can not be solved if we delete the blue highlighted two constraints.

Thanks again!!!

Did you see this?

MOSEK warning 62: The A matrix contains a large value of -2.5e+014 in constraint ‘’ (35) at variable ‘’ (74).
Mosek error: MSK_RES_ERR_HUGE_C (A large value of 3.3e+021 has been specified in cx for variable ‘’ (74).)

That is very bad scaling.

Also, regardless of which version of Mosek, for 9.0.xx you have installed, CVX is calling Mosek 8.0.0.60, which is the version bundled with CVX. If you issue the command cvx_version, you should see a list of all the versions of Mosek installed under CVX. Specify the version you want, such as Mosek4, or whatever is Mosek 9.0.97 (latest version). Or you can rename the mosek directory under the CVX directory, and reinstall CVX, in which case CVX will not find Mosek 8.0.0.60.

1 Like