Transcript Document
Automatic dualization
Johan Löfberg Automatic Control Laboratory, ETH Zürich www.control.ethz.ch
Outline
• • • • • YALMIP?
Recent developments – – – Automatic dualization Primal-dual conic problems What is the problem?
Implementation Applications of automatic dualization Conclusions
What is YALMIP?
Free MATLAB toolbox for rapid definition, manipulation and solution of optimization problems.
Originally aimed towards linear semidefinite programming.
Supports linear, quadratic, second-order cone, semidefinite, bilinear, geometric, parametric and mixed integer programming.
Interfaces most state-of-the-art solvers.
Supported solvers
SeDuMi CSDP SDPT3 PENSDP Solvers SDPA DSDP LMILAB SDPLR YALMIP KYPD External MPT Modules MIP SOS LOGIC Internal GLOBAL MOMENT MAXDET NAG LINPROG MOSEK PENBMI LMIRANK CDD OOQP QUADPROG QSOPT CPLEX GLPK
Recent developments
1.
Strengthened modelling framework for non-convex problems Automatic derivation of LP Automatic derivation of MILP 2.
Improved integration with MPT for multi-parametric optimization 3.
Performance improvements in automatic dualization
Automatic dualization
Primal-dual conic pairs
Everything revolves around the primal-dual conic pair We work with mixed linear, quadratic and semidefinite cones
Primal-dual conic pairs
Much more convenient in practice to allow free variables (equality constraints) But this is where the problems arise...
Primal or dual?
Example: Silly LP Primal: Dimension of the problem?
Dual:
Primal or dual?
Example: MAXCUT Primal: Dual: Ouch! variables Dimension of the problem?
YALMIP always interprets in dual form
Primal or dual?
Problem : Data ( C , A , b , F , f ) not unique (including dimensions) Problem : YALMIP always interprets in dual form Wanted : Automatic conversion from default dual form interpretation to a symbolic primal form interpretation Solution : Detect and extract primal form numerical model and return symbolic dual of this model.
Implementation
Where are we?
Features SOS, Moment,Block-diagonalization, Dualization ,...
Internal solvers (MIP, BMIBNB, CUTSDP, MPMIQP) Symbolic modeling level User experience in MATLAB Symbolic model YALMIP core Parsing, classification, conversion, solution treatment etc Internal numerical format Solver interface YALMIP to solver format conversion Solver specific format External solver (SeDuMi, SDPA, CPLEX...)
Implementation
Input : Symbolic YALMIP model (with constraints ) Output : Symbolic YALMIP model Notation : Primal cone : Variable X & a constraint of the type Translated primal cone : Constraint of the type Dual cone: Anything else (except equality constraints)
Implementation
Initialize: Detected cones and offsets X ={}, H = {} First step: Find simple primal cones
Implementation
Second step : Find translated primal cones
Implementation
Third step: Introduce slacks for dual cones Status: All primal cone variables are detected, remaining variables are free and remaining constraints are equality constraints.
Implementation
Fourth step: Extract numerical data from remaining constraints Intermediate result: Uniquely defined model Return: Symbolic dual form model of detected primal problem Original variables are duals to constraints in the resulting symbolic model. YALMIP automatically tracks this information and updates numerical data accordingly when the new model is solved.
Applications
MAXCUT
(Computations using SDPT3 3.1)
Sum-of-squares
Find s such that a polynomial p ( x , s ) is non-negative in x Can be addressed using sum-of-squares which leads to YALMIP formulates all SOS problems in this primal form, but solving them like this would be inefficient (since it interprets the model in dual form) Hence, dualization needed Stupid! Why not derive the dual form directly?
Sum-of-squares
Generality!
1.
Additional constraints on s does not complicate dualization 2.
For non-convex (non-linear/integer/rank constrained) SOS problems, we can solve the problem as stated...
3.
...or derive an image model (QR or sparse basis, one line of code)
Sum-of-squares
Stability analysis
Piecewise affine system (simplified) SDP for piecewise quadratic Lyapunov certificate Dualize if some H is very tall compared to state dimension
Outlook & conclusion
• • • Automatic decision to dualize?
Dualize quadratic objective functions?
Partial dualization?
• Performance for large-scale problems...
• • Very simple but very useful Commands:
Download
http://control.ee.ethz.ch/~joloef/yalmip.php