Mixed-integer Programming for Control

125 downloads 30321 Views 701KB Size Report
Mixed-integer Programming for Control. 2/63. Motivation. • What is Mixed-integer Programming? – MIP is an optimization method that combines continuous and ...
Mixed-integer Programming for Control Arthur Richards and Jonathan How

Motivation • What is Mixed-integer Programming? – MIP is an optimization method that combines continuous and discrete variables

• Why is it useful? – MIP can model complex planning and control problems involving both continuous and discrete decisions

• Why now? Is MIP new? – MIP is not a new concept, BUT online use has only arrived with fast computers and software Mixed-integer Programming for Control

2/63

Problem Classes Nonlinear Convex

Non-convex

Logical

T

F

T F

Mixed-integer Programming for Control

3/63

Problem Classes Nonlinear Convex

Non-convex

Logical

T

F

T F

Nonlinear opt. No MIP Mixed-integer Programming for Control

4/63

Problem Classes Nonlinear Convex

Non-convex

Logical

T

F

T F

Nonlinear opt. No MIP

MIP Mixed-integer Programming for Control

5/63

Problem Classes Nonlinear Convex

Non-convex

Logical

T

F

T F

Nonlinear opt. No MIP

Approximate by MIP Mixed-integer Programming for Control

MIP 6/63

Problem Classes Nonlinear Convex

Non-convex

Logical

T F Two main goals of MIP approach: capture non-convexity and logic T F

Nonlinear opt. No MIP

Approximate by MIP Mixed-integer Programming for Control

MIP 7/63

Problem Classes Nonlinear Convex

Non-convex

Logical

T F Two main goals of MIP approach: capture non-convexity and logic T

• Encode non-convexity using F integers

Nonlinear opt. No MIP

• Then apply powerful integer Approximate MIP optimization tools to non-convex by MIP problems Mixed-integer Programming for Control

8/63

Session Outline (1/2) 1. Introduction to MIP – MIP definition – Modeling • • •

– – – –

Assignment Non-convex constraints Piecewise affine systems

Solving MIP Using optimization for feedback control Techniques for online solution of MIP Examples Mixed-integer Programming for Control

9/63

Session Outline (2/2) 2. Projected Variable Metric Algorithm 3. MILP Assignment for Multi-Vehicle Systems 4. Real-time Path-Planning for Tactical UAV 5. Receding Horizon Implementation of MILP for Vehicle Guidance Mixed-integer Programming for Control

10/63

Web Resources • Slides and sample codes available online • Web resources

acl.mit.edu/MILP seis.bris.ac.uk/~aeagr • Email

[email protected] [email protected]

Mixed-integer Programming for Control

11/63

Formal Definition • Mixed-integer Linear Program (MILP)

• Inherently non-convex

• NP-complete BUT with good software, can find globaloptimum in many useful instances Mixed-integer Programming for Control

12/63

Modelling using MIP

MIP Modelling 1: PWA [Example from Bersimas and Tsitsiklis]

• Constrain a = f(b) where f(.) is PWA a (B5,A5) (B2,A2)

(B1,A1)

(B3,A3) (B4,A4)

b

Binary zi = 1 if b ∈ [Ai, A(i+1)]

Mixed-integer Programming for Control

14/63

MIP Modelling 1: PWA [Example from Bersimas and Tsitsiklis]

• Constrain a = f(b) where f(.) is PWA e.g. choose z3 = 1 all other zi = 0

Binary zi = 1 if b ∈ [Ai, A(i+1)] Mixed-integer Programming for Control

15/63

MIP Modelling 1: PWA [Example from Bersimas and Tsitsiklis]

• Constrain a = f(b) where f(.) is PWA e.g. choose z3 = 1 all other zi = 0

Binary zi = 1 if b ∈ [Ai, A(i+1)] Mixed-integer Programming for Control

16/63

MIP Modelling 1: PWA [Example from Bersimas and Tsitsiklis]

• Constrain a = f(b) where f(.) is PWA e.g. choose z3 = 1 all other zi = 0

Binary zi = 1 if b ∈ [Ai, A(i+1)]

Interpolation over [A3, A4]

Mixed-integer Programming for Control

17/63

MIP Modelling 2: Disjunction [Bersimas and Tsitsiklis, Morari, Brailsford and Williams]

• Require either a1x ≤ b1

or a2x ≤ b2

• MILP form

• M > 0, M >> a1x - b1, M >> a2x - b2 • Known as “big-M” method Mixed-integer Programming for Control

18/63

MIP Modelling 2: Disjunction [Bersimas and Tsitsiklis, Morari, Brailsford and Williams]

• Require either a1x ≤ b1

or a2x ≤ b2 e.g. choose z1 = 1

• MILP form

requires z2 = 0

• M > 0, M >> a1x - b1, M >> a2x - b2 • Known as “big-M” method Mixed-integer Programming for Control

19/63

MIP Modelling 2: Disjunction [Bersimas and Tsitsiklis, Morari, Brailsford and Williams]

• Require either a1x ≤ b1

or a2x ≤ b2 e.g. choose z1 = 1

• MILP form

requires z2 = 0

• M > 0, M >> a1x - b1, M >> a2x - b2 • Known as “big-M” method Mixed-integer Programming for Control

20/63

MIP Modelling 2: Disjunction [Bersimas and Tsitsiklis, Morari, Brailsford and Williams]

• Require either a1x ≤ b1

or a2x ≤ b2 e.g. choose z1 = 1

• MILP form

requires z2 = 0

• M > 0, M >> a1x - b1, M >> a2x - b2 • Known as “big-M” method Mixed-integer Programming for Control

21/63

MIP Modelling 2: Disjunction [Bersimas and Tsitsiklis, Morari, Brailsford and Williams]

• Require either a1x ≤ b1

or a2x ≤ b2 OR choose z2 = 1

• MILP form

requires z1 = 0

• M > 0, M >> a1x - b1, M >> a2x - b2 • Known as “big-M” method Mixed-integer Programming for Control

22/63

MIP Modelling 3: Avoidance [Schouwenaars et al, Richards et al]

• Similar to disjunction • Point (x, y) must be outside obstacle x − x max ≥ − Mc 1 and x min − x ≥ − Mc 2 c1=0 ⇒ and y − y max ≥ − Mc 3 c =0 ⇒ 2 and y min − y ≥ − Mc 4 and

4

∑c k =1

k

≤3

c3=0 ⇒

y

(xmax , ymax) (xmin , ymin)

x

c4=0 ⇒

Mixed-integer Programming for Control

23/63

MIP Modelling 4: Assignment • Assign N tasks to N agents. • Cost of assigning agent i to task j is cij Binary zij = 1 if agent i assigned to task j

• Special case – LP works – Constrain 0 ≤ zij ≤ 1 : all vertices are integer Mixed-integer Programming for Control

24/63

MIP Modelling 4: Assignment • Assign N tasks to N agents. • Cost of assigning agent i to task j is cij Binary zij = 1 if agent i assigned to task j

• Add resource constraint – MILP needed

Mixed-integer Programming for Control

25/63

MIP Modelling 5: Modes • System has two modes Mode 1 Mode 2

Mixed-integer Programming for Control

26/63

MIP Modelling 5: Modes • System has two modes Mode 1 Mode 2

• MIP representation

Mixed-integer Programming for Control

27/63

MIP Modelling 6 : Speed Limits •

2-norm approximation

||v|| ≤ vmax : convex, easily handled

||v|| ≥ vmax : non-convex, needs binaries

Mixed-integer Programming for Control

28/63

MIP Modelling: Remarks • Examples span many problem classes – Combinations and extensions possible • Joint assignment/path planning with avoidance • PWA systems with disjunction constraints • Logical constraints – “if A and B then C”

• There are often multiple ways of expressing a problem using MIP – Rule of thumb: big-M is nearly always an option, but look for something better – “Most existing MILP formulations that employ big-M constraints do suffer from the poor relaxation (relaxed MILP), which is a notorious feature of bigM.” • Improving Mixed Integer Linear Programming Formulations A. Khurana, A. Sundaramoorthy and I. Karimi, AIChE, 2005 Mixed-integer Programming for Control

29/63

Modelling References • C. Floudas Nonlinear and Mixed-Integer Programming Fundamentals and Applications Oxford University Press, 1995. • A. Bemporad and M. Morari “Control of systems integrating logic, dynamics, and constraints,” Automatica, 35:407-427, 1999 • H. Williams and S. Brailsford, ``Computational Logic and Integer Programming," in Advances in Linear and Integer Programming, Editor J. E. Beasley, Clarendon Press, 1996, pp.249-281. • D. Bertsimas and J. N. Tsitsiklis, Introduction to Linear Optimization, Athena Scientific, 1997. Mixed-integer Programming for Control

30/63

MIP Solution

MIP Solution: Branch & Bound • Finds global optimum by tree search 1. Relax binary constraints zi ∈ {0,1}→0 ≤ zi ≤ 1 2. Solve relaxed problem (bounding) 3. Choose an i and (branching) a) Fix zi = 0; go to 2; b) Fix zi = 1; go to 2;

• Recursive tree search of binary options • Can stop “early” by fathoming, if relaxation – is infeasible, or – gives binary result, or – has worse cost than best binary so far Mixed-integer Programming for Control

32/63

MIP Solution: Branch & Bound • Finds global optimum by tree search 1. Relax binary constraints zi ∈ {0,1}→0 ≤ zi ≤ 1 2. Solve relaxed problem (bounding) 3. Choose an i and (branching) a) Fix zi = 0; go to 2; b) Fix zi = 1; go to 2;

• Recursive tree search of binary options • Can stop “early” by fathoming, if relaxation – is infeasible, or – gives binary result, or – has worse cost than best binary so far. Mixed-integer Programming for Control

33/63

MIP Solution: AMPL • AMPL easily translates models – A Mathematical Programming Language – Helps sort out indexing – Interfaced to many solver codes PWA example

var x{i in 1..N}; var z{i in 1..(N-1)} binary; subject to acon: a = sum{i in 1..N} A[i]*x[i]; subject to bcon: b = sum{i in 1..N} B[i]*x[i]; subject to xsum: sum{i in 1..N} x[i] = 1; subject to xpos{i in 1..N}: x[i] >= 0; subject to x1: x[1]

Suggest Documents