MPT 2.6.2 Changelog
Included latest version of YALMIP
The latest release of
YALMIP is now
included in the distribution of MPT 2.6.2. Highlights of the new version:
- Added the function binmodel which converts polynomial expressions
with binary variables to linear expressions by introducing additional
variables and constraints.
- Added max-plus control example.
- Improved performance on most nonconvex quadratic programs in bmibnb.
- Fixed various bugs in the robust optimization framework.
Included latest version of the Ellipsoidal Toolbox
The
Ellipsoidal Toolbox version 1.1 is
now included in the distribution of MPT. Highlights of the new version:
- Additional operations with ellipsoids
- Maxmin and minmax reach sets for discrete-time systems with disturbances
- Fixed numerous bugs
- Updated manual
Massive speedup of the mpQP algorithm
The mpQP algorithm provided by MPT has been significantly improved
and now it runs up to 2-10 times faster compared to the version
contained in MPT 2.6.1. As shown in the table below, the speedup
grows with an increasing dimension of the parametric dimension.
Parameter dimension |
Runtime MPT 2.6.1 |
Runtime MPT 2.6.2 |
Improvement |
4D (1700 regions) |
242 secs | 71 secs | 3.4x |
8D (1000 regions) |
124 secs | 63 secs | 2x |
18D (10 regions) |
44 secs | 4 secs |
11x |
Notice that the numbers have been obtained for concrete examples,
by no means they should be interpreted such that, in general, it is
easier to solve an 18D example than an 8D setup.
Mex version of polytope/isinside
MPT 2.6.2 now includes a C-coded version of the polytope/isinside
method, which significantly faster compared to its MATLAB-coded counterpart.
We remind the users that the function isinside(Pn, x0)
searches a given
polytope array and returns true if the array Pn
contains the given point x0
.
Therefore if you are interested in increasing the speed of evaluation of
explicit control laws in the MATLAB environment, searching through polytopes,
or decreasing runtimes of parametric solvers (mpLP, mpQP), we strongly recommend
that you compile the provided C-code by running the following code on
your MATLAB prompt:
>> cd mpt/@polytope
>> mex isinside.c
>> cd ..
The table below illustrates the efficiency of the new implementation.
Task |
Runtime Matlab version |
Runtime Mex version |
Improvement |
isinside(Pn,x0) where Pn has 20000 regions |
0.45 secs | 0.01 secs | 45x |
sim(ctrl,x0,100) where ctrl has 1700 regions |
3.2 secs | 0.4 secs | 8x |
mpQP algorithm, nx=4, nu=20 |
173 secs | 160 secs |
8% |
New function mpt_mpsol2ctrl
YALMIP users are now able to convert parametric solutions obtained by the
solvemp()
function into MPT's controller objects for further
post-processing. The conversion is achieved by calling the function
mpt_mpsol2ctrl
. There are two options:
>> sol = solvemp(F, obj, options, x, u)
>> ctrl = mpt_mpsol2ctrl(sol, nu)
where nu
is the number of system inputs, or
>> sol = solvemp(F, obj, options, x, u)
>> ctrl = mpt_mpsol2ctrl(sol, sysStruct, probStruct)
where sysStruct
and probStruct
are
MPT's system and problem structures, respectively.
Consult the output of help mpt_mpsol2ctrl
for more details.
New function polytope/grid
With the help of a new function grid(P, npoints)
you will
be able to place several equidistantly placed points into a given polytope/
polytope array P
. The points are distributed in a way such
that each axis is first divided into a total of npoints
points, and only the points which are contained in P
are
returned. For instance:
>> P = unitbox(2);
>> X = grid(P, 3)
X =
-1 -1
-1 0
-1 1
0 -1
0 0
0 1
1 -1
1 0
1 1
Improved referencing of polytope arrays
Polytope arrays can now be indexed using logicals, e.g.
>> P = [unitbox(1) 2*unitbox(1)]
>> Q = P(logical([0 1]))
>> Q == P(2)
ans =
1
You are now able to obtain multiple copies of the same polytope
by repeating the same index several times, e.g.
>> P = unitbox(2);
>> Q = P([1 1 1])
Q=
Polytope array: 3 polytopes in 2D
Needless to say, MPT 2.6.2 significantly improved
the speed of any polytope indexing, on average by a factor of 2.
Faster solver for mixed-integer problems
The
latest version of the MIQP solver in
YALMIP (which is used as
a fall-back solver if you don't have CPLEX or XPRESS installed) uses a
new heuristic to find feasible solutions during the branching process.
On average, solutions are obtained 2x faster when applied to typical MPC
problems. It should however be noted that the performance of the solver
depends on a concrete example. If you see a significant slowdown, you
can always switch to the original version. To do that, first open the
file |mpt_init.m| and go to line 438 which reads:
bnb_upper_solver = 'fixer';
and change it to
bnb_upper_solver = 'rounder';
Then run mpt_init
from the MATLAB command line to
re-initialize the settings.
Notable improvements and bug fixes
- MATLAB R2006b compatibility fixes
- Improve qhull numerical robustness in matlab R14 and newer
- Speed improvements of the mpMILP/mpMIQP algorithms
- mpt_mplp: properly handle the F*x term in the cost
- mpt_mplp: improved detection of infeasible cases
- mpt_mpqp: improved search for an initial feasible point
- mpt_mpqp: automatically symmetrize the Hessian
- mpt_ownmpc: Open-loop solution had wrong number of elements
- mpt_simplify: properly reject/accept controllers with overlaps
- mpt_simplify: greedy merging failed for 1D polytopes
- mpt_simplify: make optimal merging more numerically robust
- mpt_sys: fixed an undefined variable
- mpt_verify: speed improvements
- isinvariant/isstabilizable was broken in MPT 2.6.1
- polytope/isinside: auto-switch to fastbreak=1
- polytope/subsref: speedup
- polytope/uminus didn't update bounding box
- tracking=1 failed for on-line MPC for MLD systems
- Simulink interface: improved detection of tracking controllers
- Suppress annoying warnings when using quadprog