Introduction to Mosek

Introduction to Mosek

Introduction to Mosek Modern Optimization in Energy, 28 June 2018 Micha l Adamaszek www.mosek.com MOSEK package overview • Started in 1999 by Erling Andersen • Convex conic optimization package + MIP • LP, QP, SOCP, SDP, other nonlinear cones • Low-level optimization API • C, Python, Java, .NET, Matlab, R, Julia • Object-oriented API Fusion • C++, Python, Java, .NET • 3rd party • GAMS, AMPL, CVXOPT, CVXPY, YALMIP, PICOS, GPkit • Conda package, .NET Core package • Upcoming v9 1 / 10 Example: 2D Total Variation Someone sends you the left signal but you receive noisy f (right): How to denoise/smoothen out/approximate u? P 2 P 2 minimize ij(ui;j − ui+1;j) + ij(ui;j − ui;j+1) P 2 subject to ij(ui;j − fi;j) ≤ σ: 2 / 10 Conic problems A conic problem in canonical form: min cT x s:t: Ax + b 2 K where K is a product of cones: • linear: K = R≥0 • quadratic: q n 2 2 K = fx 2 R : x1 ≥ x2 + ··· + xng • semidefinite: n×n T K = fX 2 R : X = FF g 3 / 10 Conic problems, cont. • exponential cone: 3 K = fx 2 R : x1 ≥ x2 exp(x3=x2); x2 > 0g • power cone: 3 p−1 p K = fx 2 R : x1 x2 ≥ jx3j ; x1; x2 ≥ 0g; p > 1 q 2 2 2 x1 ≥ x2 + x3; 2x1x2 ≥ x3 x1 ≥ x2 exp(x3=x2) 4 / 10 Conic representability Lots of functions and constraints are representable using these cones. T jxj; kxk1; kxk2; kxk1; kAx + bk2 ≤ c x + d !1=p 1 X xy ≥ z2; x ≥ ; x ≥ yp; t ≥ jx jp = kxk y i p i p 1=n t ≤ xy; t ≤ (x1 ··· xn) ; geometric programming (GP) X 1 t ≤ log x; t ≥ ex; t ≤ −x log x; t ≥ log exi ; t ≥ log 1 + x i 1=n det(X) ; t ≤ λmin(X); t ≥ λmax(X) T T convex (1=2)x Qx + c x + q 5 / 10 Challenge Find a • natural, • practical, • important, • convex optimization problem, which cannot be expressed in conic form. 6 / 10 Optimizers in MOSEK • primal simplex and dual simplex for linear problems • primal-dual interior point method optimizer for all conic problems • automatic dualization • QPs transformed to conic quadratic form • branch and bound and cut integer optimizer • exploits sparsity 7 / 10 Example (DC-OPF) X min ciPGi min max s:t:PGi ≤ PGi ≤ PGi B · θ = PG − PD jθi − θjj=xij ≤ Pij;max def dcopf(ng, nb, PGmin, PGmax, Pmax, B, x, PD, c): M= Model() PG=M.variable(ng, Domain.inRange(PGmin, PGmax)) theta=M.variable(nb) M.constraint(Expr.sub(Expr.mul(B, theta), Expr.sub(PG, PD)), Domain.equalsTo(0.0)) M.constraint(Expr.sub(Var.hrepeat(theta,nb), Var.vrepeat(theta.transpose(),nb)), Domain.lessThan(Pmax*x)) M.objective(ObjectiveSense.Minimize, Expr.dot(c, PG)) 8 / 10 Example (UCP) A basic version of the Unit Commitment Problem with: • quadratic generation costs, • ramp constraints, • minimal uptime and downtime, • startup costs, as an example of MISOCP. See: ! https://mosek.com/documentation ! The MOSEK notebook collection ! Unit commitment 9 / 10 Contact us Licensing: • Trial 30-day license • Personal academic license • Group academic license • Commercial licenses More: • www.mosek.com • https://github.com/MOSEK/Tutorials • https://themosekblog.blogspot.com/ • [email protected] • Modeling Cookbook www.mosek.com/documentation Thank you! 10 / 10.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us