Yalmip Error with IPOPT

963 views
Skip to first unread message

S

unread,
Dec 21, 2012, 5:12:40 PM12/21/12
to yal...@googlegroups.com
I'm getting an error when I try to use the IPOPT solver.

I'm using Matlab 2012b, Yalmip R20121126, and Opti Toolbox v1.71.

options = sdpsettings('verbose',2,'warning',1,'showprogress',1,'savesolverinput',1,'savesolveroutput',1,'debug',1,'solver','ipopt');
sol = solvesdp(constraints,objective,options);

+ Solver chosen : ipopt-standard
+ Processing objective h(x)
+ Processing F(x)
+ Calling IPOPT

******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
 Ipopt is released as open source code under the Eclipse Public License (EPL).
         For more information visit http://projects.coin-or.org/Ipopt
******************************************************************************

Total number of variables............................:     4107
                     variables with only lower bounds:        0
                variables with lower and upper bounds:     1236
                     variables with only upper bounds:      432
Total number of equality constraints.................:     2043
Total number of inequality constraints...............:     2376
        inequality constraints with only lower bounds:        0
   inequality constraints with lower and upper bounds:        0
        inequality constraints with only upper bounds:     2376


Number of Iterations....: 41

                                   (scaled)                 (unscaled)
Objective...............:  5.9309766063880303e+001   5.9309766063880303e+001
Dual infeasibility......:  2.0014544674265570e-008   2.0014544674265570e-008
Constraint violation....:  1.0390126259363086e-014   1.0929625260391873e-014
Complementarity.........:  2.1507000281992849e-011   2.1507000281992849e-011
Overall NLP error.......:  5.6947115315881025e-009   2.0014544674265570e-008


Number of objective function evaluations             = 42
Number of objective gradient evaluations             = 42
Number of equality constraint evaluations            = 42
Number of inequality constraint evaluations          = 42
Number of equality constraint Jacobian evaluations   = 42
Number of inequality constraint Jacobian evaluations = 42
Number of Lagrangian Hessian evaluations             = 0
Total CPU secs in IPOPT (w/o function evaluations)   =      1.936
Total CPU secs in NLP function evaluations           =      9.407

EXIT: Optimal Solution Found.
Undefined function or variable 'iters'.

Error in callipopt (line 148)
    solveroutput.iters = iters;

Error in solvesdp (line 337)
    eval(['output = ' solver.call '(interfacedata);']);

Error in RunOptimizer (line 132)
sol = solvesdp(constraints,objective,options);

S

unread,
Dec 21, 2012, 5:14:19 PM12/21/12
to yal...@googlegroups.com
I should also add that after adding Opti Toolbox, the Yalmip tests now output this:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|                 Test|   Solution|                                                                                                                                                       Solver message|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|   sdpvar/set methods|        N/A|                                                                                                                                         Successfully solved (YALMIP)|
|                   LP|    Correct|                                                                                                                                            Successfully solved (CBC)|
|                   LP|    Correct|                                                                                                                                            Successfully solved (CBC)|
|                   QP|        N/A|   Unknown problem in solver (try using 'debug'-flag in sdpsettings) (Attempt to execute SCRIPT scip as a function:
C:\solvers\OptiToolbox_v1.71\Solvers\scip\scip.m)|
|                   QP|        N/A|   Unknown problem in solver (try using 'debug'-flag in sdpsettings) (Attempt to execute SCRIPT scip as a function:
C:\solvers\OptiToolbox_v1.71\Solvers\scip\scip.m)|
|                 SOCP|    Correct|                                                                                                                                         Successfully solved (LMILAB)|
|                 SOCP|        N/A|                                                                                                                                          Infeasible problem (LMILAB)|
|                 SOCP|        N/A|                                                                                                                                          Infeasible problem (LMILAB)|
|                  SDP|    Correct|                                                                                                                                         Successfully solved (LMILAB)|
|                  SDP|    Correct|                                                                                                                                         Successfully solved (LMILAB)|
|                  SDP|    Correct|                                                                                                                                         Successfully solved (LMILAB)|
|                  SDP|    Correct|                                                                                                                                         Successfully solved (LMILAB)|
|               MAXDET|    Correct|                                                                                                                                         Successfully solved (LMILAB)|
|               MAXDET|    Correct|                                                                                                                                         Successfully solved (LMILAB)|
|        Infeasible LP|        N/A|                                                                                                                                             Infeasible problem (CBC)|
|        Infeasible QP|        N/A|   Unknown problem in solver (try using 'debug'-flag in sdpsettings) (Attempt to execute SCRIPT scip as a function:
C:\solvers\OptiToolbox_v1.71\Solvers\scip\scip.m)|
|       Infeasible SDP|        N/A|                                                                                                                                          Infeasible problem (LMILAB)|
|    Moment relaxation|    Correct|                                                                                                                                         Successfully solved (LMILAB)|
|       Sum-of-squares|        N/A|                                                                                                                                          Infeasible problem (LMILAB)|
|         Bilinear SDP|        N/A|                                                                                                                                                   No suitable solver|
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

S

unread,
Dec 21, 2012, 5:35:04 PM12/21/12
to yal...@googlegroups.com
I disabled 'savesolverinput' and 'savesolveroutput', and I no longer get the errors:

Undefined function or variable 'iters'.

Error in callipopt (line 148)
    solveroutput.iters = iters;

Error in solvesdp (line 337)
    eval(['output = ' solver.call '(interfacedata);']);

Error in RunOptimizer (line 132)
sol = solvesdp(constraints,objective,options);

But I now get:

Matlab exception:
Unknown exception
*** Error using Ipopt Matlab interface: ***
There was an error when executing the Jacobian callback function.

Exception of type: IpoptException in file "Unknown File" at line -1:
 Exception message: Unknown Exception caught in Ipopt

Johan Löfberg

unread,
Dec 22, 2012, 8:52:45 AM12/22/12
to yal...@googlegroups.com
The fact that scip fails as shown in the yalmiptest indicates that you don't have a correctly compile version of the scip mex file (it runs the help-file scip.m instead). If you type
which scip -all
it should list a mex-file with file extension compatible with your system, but I suspect it doesn't.

Johan Löfberg

unread,
Dec 22, 2012, 8:57:58 AM12/22/12
to yal...@googlegroups.com
Remove these lines in callipopt.m

 solveroutput.lambda = lambda;
 solveroutput.iters = iters;

It looks like the interface has changed recently.

Concering the ipopt crash, you have to show me some reproducible code.

S

unread,
Dec 24, 2012, 12:52:05 PM12/24/12
to yal...@googlegroups.com
Thanks Johan.  I won't be able to get to this 'till the new year, so I'll post an update then.

Cheers!

S

unread,
Dec 31, 2012, 5:58:37 AM12/31/12
to yal...@googlegroups.com
Alright I haven't gotten around to putting together a clean, simple example to reproduce the issue, but I have found that it only happens when I use the 2-norm in my objective.
ie:  objective = objective + norm(error(i,:),2);

However, if I simply use:
objective = objective + error(i,:)*error(i,:)';

then I have no issues.

Johan Löfberg

unread,
Dec 31, 2012, 7:27:02 AM12/31/12
to yal...@googlegroups.com
OK. It is probably related to a known and fixed bug. If you need a fix before official release, contact me per email.
Reply all
Reply to author
Forward
0 new messages