Jekyll2026-03-03T07:46:36+00:00https://yalmip.github.io/feed.xmlYALMIPYALMIP A toolbox for modelling and optimizationJohan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/New release R202506262025-06-25T00:00:00+00:002025-06-25T00:00:00+00:00https://yalmip.github.io/R20250626Download latest release

Release with many small fixes as two years have passed since the last official update.

Main fixes and additions

  • Added support for global nonlinear optimization framework in GUROBI
  • Full LP warm-starts in optimizer when using Gurobi now supported thanks to contributions from Tom Holden
  • Updates for recent versions of LINPROG
]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
New release R202306222023-06-22T00:00:00+00:002023-06-22T00:00:00+00:00https://yalmip.github.io/R20230622Download latest release

Release with new and improved solver support, and some minor fixes.

Main fixes and additions

  • Added support for COPT, thanks to the LEAVES group, RIIS at Shanghai University of Finance and Economics
  • Updated support for KNITRO 13.2
  • Updated support for XPRESS 9.0
  • KKT now supports nonlinearly parameterized models
  • Massive performance improvement on large sparse polynomial objectives in nonlinear solvers due to faster gradient computation
  • Fixed bug which caused gradient information to be incorrect when EXPCONE models are solved with general nonlinear solvers
  • The options bnb.plot and bmibnb.plot now mean the same thing (graphical view of lower/upper bound and stack information)
  • Some minor issues which caused issues when upgrading from 2021-verion
]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
COPT2023-06-22T00:00:00+00:002023-06-22T00:00:00+00:00https://yalmip.github.io/solver/coptThe solver is interfaced via COPT-MATLAB developed by the Research Institute for Interdisciplinary Sciences at Shanghai University of Finance and Economics.

Note that you have to install both the solver, and the MATLAB interface to the solver.

]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
Infeasible or unbounded2023-06-16T00:00:00+00:002023-06-16T00:00:00+00:00https://yalmip.github.io/infeasibleorunboundedSome solvers use intricate primal-dual presolve routines and reformulations which can cause them to lose track of what a detected inconsistency in the model is caused by, infeasibility or unboundedness. As a result, they simply return the diagnostic Infeasible or unbounded.

Untangling this from YALMIP is simple. Unboundedness can only come from the objective, hence remove the objective from the model and try again. If the message changes to Infeasible you know the model is infeasible and should start addressing that. If the solver instead solves the problem when the objective was removed, you know the model is unbounded, and should address that problem.

How to analyze a model for infeasibility is explained in the post debugging infeasible models. In short, remove constraints systematically until it becomes infeasible and you know where the peroblem lies, or add slacks to model and see which are activated.

How to analyze a model for unboundedness is explained in the post debugging unbounded models. In short, add large bounds on all variables (or small penalties) to make the model bounded, and see which variables become large when that problem is solved.

]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
New release R202306092023-06-09T00:00:00+00:002023-06-09T00:00:00+00:00https://yalmip.github.io/R20230609Download latest release

Release with possibly breaking core changes, new features, and 2 years of bug fixes.

Main fixes and additions

  • Strict inequalities now trigger errors (no more kittens).
  • Square symmetric inequalities now trigger warnings (detects extremely common user mistake).
  • A bunch of old obsolete solvers removed and are no longer supported.
  • @araujoms improved support for complex cones via sedumi in automatic dualization.
  • BMIBNB improvements both algoritmically and performance.
  • BNB cleaned up bug fixes (memory hogging) and improved performance for some models (more on that later in separate post).
  • GUROBI options structure now up to date.
  • DAQP added as supported solver.
  • yalmiptest cleaned up and improved.
  • Added some geometric operators such as vertex, isoutside, starpolygon.
  • Experimental (pre-alpha) support of nonlinear semidefinite programming (more on that later in separate post).
  • Option ‘usex0’ should be updated to ‘warmstart’ (both supported for now)
  • Code fixed to support Octave 8.
]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
DAQP2022-08-12T00:00:00+00:002022-08-12T00:00:00+00:00https://yalmip.github.io/solver/daqpDAQP can be installed directly in MATLAB by running the commands

websave('install_daqp','https://raw.githubusercontent.com/darnstrom/daqp/master/interfaces/daqp-matlab/install_daqp.m')
install_daqp
]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
isoutside2022-06-21T00:00:00+00:002022-06-21T00:00:00+00:00https://yalmip.github.io/command/isoutsideisoutside creates a big-M model to avoid a region specified by linear inequalities.

Syntax

Model = isoutside(P)

Example

The following code finds the vertex/point on facet closest to the origin in a polytope by solving a non-convex problem involving an avoidance constraint. Note the required explicit bounds, as the model is constructed using big-M strategies.

x = sdpvar(2,1);
A = randn(10,2);
b = 10*rand(10,1);

Model = isoutside(A*x <= b)

optimize([Model, -100 <= x <= 100],x'*x)
clf
plot(A*x <= b,[],[],[],sdpsettings('plot.shade',0.1));
hold on;grid on
plot(value(x(1)),value(x(2)),'*')
r = sqrt(value(x'*x));
t = 0:0.01:2*pi;
plot(r*cos(t),r*sin(t),'--')

Point closest to origin

Comments

Note that isoutside will introduce binary variables.

]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
Twitter channel2022-06-17T00:00:00+00:002022-06-17T00:00:00+00:00https://yalmip.github.io/twitterTo handle the massive communication load (ha!) a twitter channel is now available. Joking aside, on popular request after rejecting myspace, snapchat, tiktok and instagram, a twitter account intended to be used to broadcast releases so you don not have to F5 this site, and communicate related material, is now available. Maybe about to be used soon…

]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
invpos2022-05-26T00:00:00+00:002022-05-26T00:00:00+00:00https://yalmip.github.io/command/invposinvpos implements the elementwise inverse on positive orthant.

Syntax

y = invpos(x)

Comments

The operator is implemented using a graph representation based on SOCP and can thus only be used in scenarios where YALMIP can propagate convexity and use a conic model.

]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/
polytope2021-05-19T00:00:00+00:002021-05-19T00:00:00+00:00https://yalmip.github.io/command/polytopepolytope either converts a set of vertices to a set defining a polytope (in a lifted space), or converts a polytopic set to an MPT polytope

Syntax

P = polytope(v,x)
P = polytope(M)

Example

The native YALMIP use is for defing a polytope \(x = \sum_{i=1}^N \lambda_i v_i, \lambda \geq 0, \sum_{i=1}^N \lambda_i = 1\) from a set of vertices \( v_i\).

v = randn(2,10);
x = sdpvar(2,1);
P = polytope(v,x)

The opeprator does not perform any convex hull computation to reduce the numer of vertices. Note also that the polytope is defined in the \(x,\lambda\)-space. Hence, if you want plot it, you are most likely interested in the projection to \(x\)

plot(P,x)

The command also serves as the interface between YALMIP objects and MPT objects, allow us to convert objects. To generate a polytopic MPT object, simply apply the operator on a purely linear object.

x = sdpvar(2,1);
P = polytope([-1 <= x <= 1]);
]]>
Johan Löfberg[email protected]https://isy.gitlab-pages.liu.se/staff/johlo46/en/