yalmiptest('mosek') returns ' Reference to non-existent field 'sol' '

724 views
Skip to first unread message

SK

unread,
Feb 15, 2015, 6:03:35 PM2/15/15
to yal...@googlegroups.com
Hello,

I am trying to make yalmip work with MOSEK.

First, I added yalmip to the path in Matlab as follows:
addpath(genpath('/home/<user_id>/Optimisation/yalmip'))

Then, similarly for MOSEK:
addpath(genpath('/home/<user_id>/Optimisation/mosek'))

When I run the test:

yalmiptest('mosek')

it finds the solver:

+++++++++++++++++++++++++++++++++++++++++++++++
|       Searching for installed solvers       |
+++++++++++++++++++++++++++++++++++++++++++++++
|        Solver|   Version/module|      Status|
+++++++++++++++++++++++++++++++++++++++++++++++
|         MOSEK|            LP/QP|       found|
|         MOSEK|             SOCP|       found|
|         MOSEK|              SDP|       found|
|         MOSEK|        GEOMETRIC|       found|
|       LINPROG|                 |       found|
...............................................

but it cannot deal with any of the tests, i.e. for all the tests (except 'Core functionalities' and 'Bilinear SDP'), I get the following:

Solution: N/A
Solver message: Unknown problem in solver (try using 'debug'-flag in sdpsettings) (Reference to non-existent field 'sol'.)

What is causing this it and how could I make yalmip work with MOSEK?

My set up is as follows:

OS: ubuntu 14.04 LTS
Matlab: R2014b (8.4.0.150421)
Yalmip: R20150204
MOSEK: 7.1.0.20

Johan Löfberg

unread,
Feb 16, 2015, 1:57:25 AM2/16/15
to yal...@googlegroups.com
Try

sdpvar x

optimize
(x>=0,x,sdpsettings('solver','mosek','debug',1))

and let me know where it crashes, i.e., the crash report

SK

unread,
Feb 16, 2015, 6:50:59 AM2/16/15
to yal...@googlegroups.com
Apparently, the problem was caused by the MOSEK license file which was put in a wrong place.

After fixing this, everything runs as expected:

 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|                   Test|   Solution|                         Solver message|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|   Core functionalities|        N/A|           Successfully solved (YALMIP)|
|                     LP|    Correct|            Successfully solved (MOSEK)|
|                     LP|    Correct|            Successfully solved (MOSEK)|
|                     QP|    Correct|            Successfully solved (MOSEK)|
|                     QP|    Correct|            Successfully solved (MOSEK)|
|                   SOCP|    Correct|            Successfully solved (MOSEK)|
|                   SOCP|    Correct|            Successfully solved (MOSEK)|
|                   SOCP|    Correct|            Successfully solved (MOSEK)|
|                    SDP|    Correct|            Successfully solved (MOSEK)|
|                    SDP|    Correct|            Successfully solved (MOSEK)|
|                    SDP|    Correct|            Successfully solved (MOSEK)|
|                    SDP|    Correct|            Successfully solved (MOSEK)|
|                 MAXDET|    Correct|            Successfully solved (MOSEK)|
|                 MAXDET|    Correct|            Successfully solved (MOSEK)|
|          Infeasible LP|        N/A|             Infeasible problem (MOSEK)|
|          Infeasible QP|        N/A|             Infeasible problem (MOSEK)|
|         Infeasible SDP|        N/A|   Unbounded objective function (MOSEK)|
|      Moment relaxation|    Correct|            Successfully solved (MOSEK)|
|         Sum-of-squares|    Correct|            Successfully solved (MOSEK)|
|           Bilinear SDP|        N/A|          Solver not applicable (mosek)|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Thank you for help.

Alexey Bodrov

unread,
May 26, 2018, 10:47:38 AM5/26/18
to YALMIP
Dear Johan,

I have faced the similar problem with yalmip, but MPT solver:

Reference to non-existent field 'requested_variables'.
Error in yalmip2mpt (line 19)
if isempty(interfacedata.requested_variables)
Error in callmpt3 (line 10)
Matrices = yalmip2mpt(interfacedata);
Error in optimizer/subsref (line 326)
                eval(['output = ' self.model.solver.call '(self.model);']);

The solver is installed and test examples from the MPT website are working correctly:
+++++++++++++++++++++++++++++++++++++++++++++++
|       Searching for installed solvers       |
+++++++++++++++++++++++++++++++++++++++++++++++
|        Solver|   Version/module|      Status|
+++++++++++++++++++++++++++++++++++++++++++++++
|           MPT|                          3|       found|


What could be a problem? Other solvers ('quadprog' and 'ipopt') are working correctly.

Thank you!

Johan Löfberg

unread,
May 26, 2018, 10:53:55 AM5/26/18
to YALMIP
impossible to answer without reproducible example

Alexey Bodrov

unread,
May 26, 2018, 11:03:28 AM5/26/18
to YALMIP
I have tried to use your example:

sdpvar x
optimize(x>=0,x,sdpsettings('solver','mpt','debug',1))

However, it doesn't work. Again, both "quadprog" and "ipopt" are working fine.

Error using solvesdp (line 278)
You must specify parametric variables.

Error in optimize (line 31)
[varargout{1:nargout}] = solvesdp(varargin{:});

Johan Löfberg

unread,
May 26, 2018, 11:34:35 AM5/26/18
to YALMIP
MPT is not an LP solver, it is a multiparametric solver, so that test-case makes no sense
Reply all
Reply to author
Forward
0 new messages