linear program

36
Linear Program MAX C B X B + C NB X NB s.t. BX B + A NB X NB = b X B , X NB 0

Upload: wallace-carter

Post on 31-Dec-2015

41 views

Category:

Documents


1 download

DESCRIPTION

Linear Program. MAX C B X B + C NB X NB s.t. BX B + A NB X NB = b X B , X NB ≥ 0. Important LP Equations. Important LP Derivatives. Duality. Duality. Unbounded Solution. Infeasible Solution. Multiple Optima. Degeneracy. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Linear Program

Linear Program

MAX CBXB + CNBXNB

s.t. BXB + ANBXNB = b

XB , XNB ≥ 0

Page 2: Linear Program

Important LP Equations

NBj

jj-1-1

B xaB - bB X

-1 -1B B j j j

j NB

Z C B b - C B a - c x

Page 3: Linear Program

Important LP Derivatives

NBj )c - aB(C- x

Zjj

1-B

j

NBj aB- x

Xj

1-

j

B

Page 4: Linear Program

Duality

Pr imal Dual

Max CX Min U b

s.t. AX b s.t. U A C

X 0 U 0

Page 5: Linear Program

Duality

Primal Solution Item Primal Solution Information

Dual Solution Item Corresponding Dual Solution Information

Objective function Objective function Shadow prices Variable values

Slacks Reduced costs

Variable values Shadow prices

Reduced costs Slacks

Page 6: Linear Program

Unbounded Solution

Objective increases

x1

x2

Page 7: Linear Program

Infeasible Solution

x1

x2

A B

Page 8: Linear Program

Multiple Optima

x1

x2 P1

P2

Isocline with highest objective

Page 9: Linear Program

Degeneracy

x1

x2

P1

Page 10: Linear Program

Complementary Slackness

• derived from duality

*' *

*' *

0U b AX

0U A C X

Page 11: Linear Program

Reduced Cost

• Negative derivative of objective function with respect to a variable

• At optimality:– Zero for all basic variables– Non-negative for all non-basic variables (max)– Non-positive for all non-basic variables (max)

-1BC B a - c

Page 12: Linear Program

Multi-input, Multi-output

p p j j k kp j k

p pj jj

kj j kj

mj j mj

p j k

Max c X - d Y - e Z

s.t. X - q Y 0

r Y - Z 0

s Y b

X , Y , Z 0

Page 13: Linear Program

Mixing / Blending

j allfor 0F

1F

i allfor LLFa

i allfor ULFas.t.

FcMin

j

jj

ij

jij

ij

jij

jjj

Page 14: Linear Program

T Xr,k r,k r,r ,k r,r,k r, j,u r, j,u

r,k r,r ,k r, j,u

r, j,u,i r, j,u r,ij

r,r ,kr

r,k r, j,u,k r, j,uj,ur,r,k

r

r,k r,k

r,k r, j,u

Max p Y c T c X

s.t. a X b

TY y X 0

T

Y d

Y , T , X 0

Spatial Equilibrium (GAMS Ex.)

Page 15: Linear Program

Sequencing

1 2 3

1 2 3

1 2

1 2

2 3

2 3

2 2

j jt k kt s stj t k t s t

jt ktj t t k t t

kt stk t t s t t

j jt j kt s st mtj k s

jt kt , st

Max - c X - d Y e Z

s.t. X Y 0

Y Z 0

a X b Y f Z g

X , Y Z 0

Page 16: Linear Program

Sequencing

333

222

111

321321

2121

11

TfYcXWeek3

TeYbXWeek2

TdYaXWeek1

0YYY X-X -X-Week3

0YY X -X-Week2

0Y X-Week1

Page 17: Linear Program

Storage

t t t tt t

t T

1 1 0

t t-1 t

T T-1

t t

t t

t t

Max c X - cs H

s.t. X H s

X - H H 0

X - H 0

X U

X L

X , H 0

Page 18: Linear Program

Lexicographic preferences

i

r r r

r rj jj

mj j mj

r r

r

r

j

r

Min w

s.t. w gl T for all r

gl g X 0 for all r

a X b for all m

w w for all r i

w for all r i

w 0 for all r

X 0 for all j

gl unrestricted for all r

Page 19: Linear Program

Weighted Preferences

r rr

rj j rj

r r r

mj j mj

r

j

r

Max c q

s.t. g X gl 0 for all r

N q gl 0 for all r

a X b for all m

q 0 for all r

X 0 for all j

gl unrestricted for all r

Page 20: Linear Program

Well behaved, Separable Function

A1 A2 A3 A4

Cos

t

Input X

Page 21: Linear Program

Well behaved, Separable Function

A1 A2 A3 A4

Cos

t

Input X c1

c4

c3

c2

Page 22: Linear Program

Well behaved, Separable Function

i ii

ii

i i

i

Min c S

s.t. S X 0

S d for all i

S , X 0

Page 23: Linear Program

Disequilibrium – Known Life

j

j

t Tjt j,t je je

t j j ee K

ije j,t e itj e K

*j, e j, e

j,T e jej

j,t je

Max (1 r) C X (1 r) F I

s.t. A X b

X X

X I 0

X , I 0

Page 24: Linear Program

Disequilibrium – Unknown Life

j j

j

t Tje j,t,e je je

t j e K j e K

ije j,t,e itj e K

*j,0,e j,0,e

j,T,e je

j,t 1,e 1 j,t,e

j,t,e je

Max (1 r) C X (1 r) F I

s.t. A X b

X X

X I 0

X X 0

X , I 0

Page 25: Linear Program

Equilibrium ‑ Unknown Life

je jej e

ije je ij e

je j,e 1

je

Max C X

s.t. A X b

X X 0

X 0

Page 26: Linear Program

Fixed Costs

Max CX - FY

s.t. X - MY 0

X 0

Y 0 or 1

Page 27: Linear Program

Fixed Capacity

m m k km k

m km kk

m

k

Max C X - F Y

s.t. X Cap Y 0

X 0

Y 0 or 1

Page 28: Linear Program

Minimum Habitat Size

hmin 0

area

population

HAB0 HAB1

Page 29: Linear Program

Minimum Habitat Size

0 min

0 min

1 max min

1 min

0 1

HAB h

HAB h I 0

HAB h h I 0

POP d HAB d h I 0

POP, HAB , HAB 0

I 0,1

Page 30: Linear Program

Warehouse

k k ik ik kj kj ij ijk i k k j i j

ik ij ik j

kj ij jk i

ik kji j

k k kjj

mk k

mk

k ik kj ij

Min F V C X D Y E Z

s.t. X Z S

Y Z D

X Y 0

CAP V Y 0

A V

b

V 0 or 1, X , Y , Z 0

Page 31: Linear Program

Mutual exclusive products

1

2

1 2

1 2

X MY 0

Z MY 0

Y Y 1

X, Z 0

Y , Y 0 or 1

Page 32: Linear Program

Either-Or-Active constraints

1 1

2 2

A X - MY b

A X + MY b M

X 0

Y 0 or 1

Page 33: Linear Program

Distinct Variable Values

1 1 2 2 k k

1 2 k

1 2 k

X -V Y -V Y ... -V Y 0

Y Y ... Y 1

X ... 0

Y , Y , ... Y 0 or 1

Page 34: Linear Program

Badly behaved non-linear functions

A1 A2 A3 A4

Cos

t

Input X

Page 35: Linear Program

Badly behaved non-linear functions

1 2 3 4

1 1

2 2

3 3

4 4

1 2 3 4

1 3

1 4

2 4

1 2 3 4

1 2 3 4

1

- Z 0

- Z 0

- Z 0

- Z 0

Z Z Z Z 2

Z Z 1

Z Z 1

Z Z 1

, , , 0

Z , Z , Z , Z = 0 or 1

Page 36: Linear Program

Non-linear Programming

• Specification often straightforward

• Solving more difficult– scaling (manual vs. computer)– lower bounds to avoid division by zero and

other illegal operations– local versus global extremes