Frequently asked question


 

Installation

Solvers

YALMIP

Other


 

Q:

I have been using a previous version of YALMIP, but after installing the new version nothing works.

A:

Restart MATLAB.

 

Q:

..still doesn't work!

A:

Remove any old version of YALMIP before you install the new version. Do not just copy the new version into the old YALMIP directory.

 

Q:

..still doesn't work!

A:

Added all the paths? (/yalmip, /yalmip/extras, /yalmip/demos, /yalmip/solvers)

 

Q:

..still doesn't work!

A:

Are you sure you added all the paths! (/yalmip, /yalmip/extras, /yalmip/demos, /yalmip/solvers)

 

Q:

..still doesn't work!

A:

Removed your old YALMIP version from the MATLAB path?

 

Q:

..still doesn't work!

A:

Added all the paths to your solver?

 

Q:

...still doesn't work!

A:

Do you have any solver installed?

 

Q:

...still doesn't work!

A:

Compiled the solver (if needed)? Compiled it for the correct MATLAB version?

 

Q:

...still doesn't work!

A:

Using MATLAB 5.3.1 or later?

 

Q:

...still doesn't work!

A:

Probably a PICNIC problem ;-P


 

Q:

YALMIP cannot find any solver.

A:

Do you have any solver? You typically need to install a (or several) solver and update you path. See interfaced solver.

 

Q:

PENBMI does not work with YALMIP anymore.

A:

Version 1.1 and earlier will not work directly anymore. However, this is easily fixed. Edit the file callpenbmim.m (if you use the PENOPT version) or callpenbmi.m (if you use the TOMLAB version). Uncomment the code below the comment "UNCOMMENT THIS".

 

Q:

SDPT3-3.02 does not work with YALMIP anymore.

A:

Download SDPT3-3.02 and compile (code updated without version increment)

 

Q:

My version of SDPT3-3.02 does not work and complains about the file svec.

A:

Do you have the solver SDPPACK installed? Remove the path to this solver.

 

Q:

SDPT3 (or SeDuMi) does not work.

A:

Make sure not to have both SDPT3 (version 3.02) and SeDuMi on the MATLAB path. This problem is resoloved in SDPT3 3.1

 

Q:

CSDP does not work.

A:

Do you have CSDP in your system path?

 

Q:

CSDP runs but crashes.

A:

Running MATLAB 6.1 and CSDP 4.6? In that case, edit readsol.m in the CSDP directory and replace all occurrences of && with &. Even better, download the latest version of CSDP.

 

Q:

I already have LMILAB and LINPROG installed, do I need any other solver?

A:

Yes, at-least if you intend to solve anything but a few small problems.  See next issue.

 

Q:

LMILAB is slower when I use it with YALMIP

A:

Yes. YALMIP, and all other supported solvers, works with a completely general SDP formulation in contrast to LMILAB that requires the problem structure to be explicitely described by the user for speed (in particular for control related problems). Rule of thumb : Do not use LMILAB with YALMIP. If you have made the effort to download YALMIP, take 5 more minutes and install a more efficient and general solver.

 

Q:

CDD hangs

A:

Try sdpsettings('cdd.method','dual-simplex')

 

Q:

XPRESS performs badly, claims infeasibility etc.

A:

Adding bounds on the involved variables solves this issue in many cases.

 

Q:

There are so many solvers, which one should I use?

A:

SeDuMi and SDPT3 are good general purpose SDP solvers (not necessarily the best solvers though), efficient also on LP and SOCP problems and reasonably efficient on small QP problems. Hans D. Mittelmanns benchmark might be helpful. If you mainly solve LPs, make sure to try the free solvers GLPK, QSOPT and CDD

 

Q:

The solution I get in an SDP is not feasible but has eigenvalues around, say, -1e-6.

A:

Most solvers actually use infeasible/exterior algorithms, so slightly infeasible solutions are common.

 

Q:

Can I solve BMIs without PENBMI?

A:

The BMI-examples in yalmipdemo show some alternative ways to code your one solver rather easily, but for performance and robustness, PENBMI is highly recommended.

 


 

Q:

Typing help set gives me no information on the YALMIP function set.

A:

Yep, a bit tricky since set also is a built-in function. Type help sdpvar/set and you will find what you are looking for.

 

Q:

Is there really a set class?

A:

No...set is only a wrapper to call the old class lmi. To much work to re-write all code just for a name change.

 

Q:

Is set related to the "normal" set command in MATLAB

A:

No... The name set was selected since it is short. An alternative would be to define constraints, or feasible sets, using a command named, e.g., constraint. However, my keyboard typing speed is too slow to allow for such a long command name. In my opinion, the name set is at-least better than the old name lmi.

 

Q:

I define a semidefinite constraint, but YALMIP declares it "element-wise".

A:

YALMIP detects semidefinite constraints by checking symmetry. In some cases (working with very ill-conditioned data), numerical problems may lead to a small violation of symmetry in MATLAB, and YALMIP will declare the constraint as element-wise. To solve this problem, just symmetrize your variable first.

 

Q:

It is so slow!

A:

As a rule of thumb, the time reported as 'yalmiptime' in the output diagnostic should be around fractions of a second for small problems, and typically a fraction of the actual solution time for larger oproblems. If this is not the case, you probably have a problem with your installation.

 

Do you have FEMLAB on your MATLAB path? Removing FEMLAB from the path can improve performance significantly. Another way to make YALMIP faster is to set the field cachesolvers in sdpsettings to 1. (The reason for the extremely poor performance of YALMIP in these cases is typically due to slow network functionalities, making the command exist , which is used in solvesdp, very slow.)

 

Do you have MOSEK installed? This solver overloads the function optimset in Mathworks optimization toolbox, but is much slower. optimset is called in sdpsettings to initialize the option fields for LINPROG and QUADPROG. Note that sdpsettings is called in solvesdp if no options structure is passed in the call. Hence, for optimal speed, define the options structure once, and always use three arguments when calling solvesdp.

 

Are you working with nonlinear expressions? In that case, clear the internals of YALMIP regularly using yalmip('clear').

 

Q:

Are inequalities really strict?

A:

By default, strict (<,>) and non-strict (<=,>=) inequalities are treated in the same way in YALMIP, and the result depends on the solver. However, by using the field shift in sdpsetttings, inequalities defined using < and > will be treated slightly different. YALMIP will add a small perturbation to these inequalities to increase the likelihood of a strictly feasible solution.

 

Q:

Why can I not write X = eye(2); X(1,1)=sdpvar(1,1)?

A:

Work in progress...

 

Q:

How do I solve generalized eigenvalue problems (like gevp in LMILAB)?

A:

Two options. The first one is to code your own script based on a simple bisection. This is illustrated in the example decayex.m. An alternative is to install the BMI solver PENBMI. This solver solves GEVP problems globally.


 

Q:

I have found a bug. What to do?

A:

Send a mail to loefberg@control.ee.ethz.ch. Type ver in MATLAB and include the result in the mail. If possible, include the code (as simple as possible) that generated the fault, otherwise, include at-least the error message etc. The more information the better.

 

Q:

I have an idea for a new feature. What to do?

A:

Send a mail to loefberg@control.ee.ethz.ch. However, I only add new features when I need them my self, but if your idea is good enough, I might realize that I need it!

 

Q:

What does YALMIP mean?

A:

Used to be short for Yet Another LMI Parser. However, since YALMIP is much more than a LMI parser now, it does not mean anything.