automatic control laboratory, eth zürich automatic dualization johan löfberg
TRANSCRIPT
![Page 1: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/1.jpg)
Automatic Control Laboratory, ETH Zürich www.control.ethz.ch
Automatic dualization
Johan Löfberg
![Page 2: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/2.jpg)
Outline
• YALMIP?• Recent developments• Automatic dualization
– Primal-dual conic problems– What is the problem?– Implementation
• Applications of automatic dualization• Conclusions
![Page 3: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/3.jpg)
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.
![Page 4: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/4.jpg)
Supported solversYALMIP
Solvers
SeDuMi SDPA
CSDP DSDP
SDPT3 LMILAB
PENSDP
MAXDET CDD
NAG OOQP
LINPROG
MOSEK
QUADPROG
QSOPT
SDPLR
PENBMI CPLEX
LMIRANK GLPK
Modules
External Internal
KYPD MPT MIP GLOBAL
SOS MOMENT
LOGIC
![Page 5: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/5.jpg)
Recent developments1. 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
![Page 6: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/6.jpg)
Automatic dualization
![Page 7: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/7.jpg)
Primal-dual conic pairs
Everything revolves around the primal-dual conic pair
We work with mixed linear, quadratic and semidefinite cones
![Page 8: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/8.jpg)
Primal-dual conic pairs
Much more convenient in practice to allow free variables (equality constraints)
But this is where the problems arise...
![Page 9: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/9.jpg)
Primal or dual?
Example: Silly LP
Dimension of the problem?
Primal:
Dual:
![Page 10: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/10.jpg)
Primal or dual?
Example: MAXCUT
Dimension of the problem?
Primal:
Dual: Ouch! variables
YALMIP always interprets in dual form
![Page 11: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/11.jpg)
Problem: Data (C,A,b,F,f) not unique (including dimensions)
Primal or dual?
Problem: YALMIP always interprets in dual form
Wanted:
Solution:
Automatic conversion from default dual form interpretation to a symbolic primal form interpretation
Detect and extract primal form numerical model and return symbolic dual of this model.
![Page 12: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/12.jpg)
Implementation
![Page 13: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/13.jpg)
Where are we?
External solver(SeDuMi, SDPA, CPLEX...)
Solver interfaceYALMIP to solver format conversion
YALMIP coreParsing, classification, conversion,
solution treatment etc
Symbolic modeling level User experience in MATLAB
Solver specific format
Internal numerical format
Symbolic model
Internal solvers(MIP, BMIBNB, CUTSDP, MPMIQP)
FeaturesSOS, Moment,Block-diagonalization,
Dualization,...
![Page 14: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/14.jpg)
Input: Symbolic YALMIP model (with constraints )
Implementation
Output: Symbolic YALMIP model
Notation:
Primal cone: Variable X & a constraint of the typeTranslated primal cone: Constraint of the typeDual cone: Anything else (except equality constraints)
![Page 15: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/15.jpg)
Implementation
First step: Find simple primal cones
Initialize: Detected cones and offsets X={}, H = {}
![Page 16: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/16.jpg)
ImplementationSecond step : Find translated primal cones
![Page 17: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/17.jpg)
ImplementationThird step: Introduce slacks for dual cones
Status:All primal cone variables are detected, remaining variables are free and remaining constraints are equality constraints.
![Page 18: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/18.jpg)
ImplementationFourth 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.
![Page 19: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/19.jpg)
Applications
![Page 20: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/20.jpg)
MAXCUT
(Computations using SDPT3 3.1)
![Page 21: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/21.jpg)
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?
![Page 22: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/22.jpg)
Sum-of-squares
Generality!
1. Additional constraints on s does not complicate dualization
2.
3. ...or derive an image model (QR or sparse basis, one line of code)
For non-convex (non-linear/integer/rank constrained) SOS problems, we can solve the problem as stated...
![Page 23: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/23.jpg)
Sum-of-squares
![Page 24: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/24.jpg)
Stability analysis
Piecewise affine system (simplified)
SDP for piecewise quadratic Lyapunov certificate
Dualize if some H is very tall compared to state dimension
![Page 25: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/25.jpg)
Outlook & conclusion
• Automatic decision to dualize?• Dualize quadratic objective functions?• Partial dualization?
• Performance for large-scale problems...
• Very simple but very useful• Commands:
![Page 26: Automatic Control Laboratory, ETH Zürich Automatic dualization Johan Löfberg](https://reader038.vdocument.in/reader038/viewer/2022102911/56649ccb5503460f94994c3c/html5/thumbnails/26.jpg)
Download
http://control.ee.ethz.ch/~joloef/yalmip.php