Sie sind auf Seite 1von 58

INTEGER PROGRAMMING

Min/Max Z= c x

S.t.:

Ax ≤b

x≥0

x: integer

TBA airlines decided to expand its airplane fleet:

purchase some more small airplanes or large airplanes

Small Large

Net annual profit per airplane $1 million 5


Purchase cost / plane 5 50

Total budget $100 million

Maximum 2 small airplanes

IE252 – Integer Programming 1


S = number of small airplaes to purchase
L = number of large airplaes to purchase

Max Z = S + 5L
S.t.:
5S + 50L ≤ 100
S ≤2
S, L ≥ 0 and integers

S
ZLP= 11
S=2 L=1.8

0 1 2 L

LP optimal S=2 L=1.8 Profit= $11

Round up S=2 L=2 Infeasible

Round down S=2 L=1 Profit= $7

Optimal (IP) S=0 L=2 Profit= $10

IE252 – Integer Programming 2


- When are non-integer solutions are acceptable?

. Solution is naturally divisible: $, TL, kg, tons…

. Solution represents a rate: %, fraction of..

- When rounding is acceptable?

13546.34 units to 13546 or 13547 units

- When rounding is not acceptable?

. when numbers are small 2.6 to 2 or 3 may be a problem

. YES or NO decisions - binary variables

Application of BINARY variables (0/1):

- “YES or NO” type decisions:


. Build a plant?
. Manufacture a product?
. Do a project?
. Assign a person to a task?
. Take a course?

- Fixed costs:
. If a product is produced a fixed setup cost is incurred
. If a warehouse is operated a fixed cost is incurred.

- Either or constraints
. Production must either be 0 or ≥100

- Subset of constraints: meet 3 out of 4 constraints.

IE252 – Integer Programming 3


CAPITAL BUDGETING – INVESTMENT DECISIONS

5 PROJECTS:
Investment requirements $(x1000)
project NPV $ (1000) Year 1 Year 2 Year 3
A 180 30 40 40
B 20 12 8 0
C 72 30 20 20
D 25 15 10 24
E 80 20 40 40
available 70 90 100

1 if project is under taken

xi : {
0 Otherwise

Max Z = 180x1 +20x2 +72x3 +25x4 +80x5

S.t.:

30x1 +12x2 +30x3 +15x4 +20x5 ≤ 70 Year 1

40x1 + 8x2 +20x3 +10x4 +40x5 ≤ 90 Year 2

40x1 + 0x2 +20x3 +24x4 +40x5 ≤ 100 Year 3

xi = 0 or 1 for i=1,..,5

IE252 – Integer Programming 4


1) At most 3 projects:

x1 + x2 +x3 +x4 +x5 ≤ 3

2) Projects A and D can not be done simultaneously:

x1 + x4 ≤ 1

3) If project C is done then E must be done too.

x 5 ≥ x3

4) If B or E is done then A can not be done

x1 ≤ 1 –x2

x1 ≤ 1 –x5
___------- 0--------

x2 +x5 ≤ 2(1- x1)

5) If E is done then C and D must be done too.

x 3 ≥ x5

x4≥ x5

or

x3 +x4 ≥ 2 x5

IE252 – Integer Programming 5


FIXED-CHARGE PROBLEM

SINGLE PRODUCT  5 ASSEMBLY LINES

AT LEAST 350 UNITS MUST BE PRODUCED

LINE Start-up Production Production Available


cost $ cost $ time (hrs) man hrs
A 6000 80 5 510
B 10000 60 6 480
C 2000 110 10 600
D 7500 75 4 440
E 15000 40 3 480

xi : units of product produced on line i

1 if line i is used

yi : {
0 Otherwise

Min Z= 6000y1 +10000y2 +2000y3 +7500y4 +15000y5


+80x1 +60x2 +110x3 +75x4 +40x5

S.t.:
x1 + x2 +x3 +x4 +x5 ≥ 350
5x1 ≤ 510y1
6x2 ≤ 480y2
10x3 ≤ 600y3
4x4 ≤ 440y4
3x5 ≤ 480y5

xi ≥ 0 and yi = 0 or 1 for i=1,..,5

IE252 – Integer Programming 6


1) If A operate D and E cannot operate:

y4 ≤ 1 –y1

y5 ≤ 1 –y1
___------- 0--------

y4 +y5 ≤ 2(1- y1)

2) If C operate then no more than 150 units may be


produced on B and D (combined)

x2 + x4 ≤ M – (M-150) y3

3) If B operate at least 50 units must be produced on this


line:

x2 ≥ 50y2

4) If E oprerate line B must do:

y2 ≥ y5

IE252 – Integer Programming 7


INTEGER PROGRAMMING

max/ min z  c j x j
j 1

S.t.
N

a x  b
j 1
ij j i
i=1,..,M

x j
0 and integer j=1,..,N

LOGICAL CONDITIONS

0/1 VARIABLE

1 DO
yi : {
0 DON’T

y1 and y2 binary variables

1. at most one of them be done

y1 +y2 ≤ 1

2. exactly one must be done

y1 +y2 = 1

IE252 – Integer Programming 8


3. at least one of them must be done

y1 +y2 ≥ 1

4. both must be done

y1 +y2 ≥ 2 or y1 +y2 = 2

5. If 1 is done 2 must also be done

y 1 ≤ y2

6. Fixed charges:
If product is produced then a fixed charge F must be paid

x : quantity of product i produced

1 if x>0
y:{
0 if x=0

x≤ Cy

Z= ………… + Fy

IE252 – Integer Programming 9


7. Mutually exclusive alternatives (either / or ):

Case 1:

x= a1, a2, ………., an

1 if x= aj
yj : {
0 otherwise

x= a1 y1+a2 y2+ ……….+ an yn

Case 2: One of the two constraints hold

Either

5x1+2x2 ≤ 24 process a

or

3x1+4x2 ≤ 21 process b

1 if contraint i is not selected


yi : {
0 Otherwise

5x1+2x2 ≤ 24 + My1

3x1+4x2 ≤ 21 + My2

y1 + y2 =1

IE252 – Integer Programming 10


Case 3: Selecting k constraints out of N possible

a x  b
j 1
ij j i
i=1,..,N

1 if contraint i is not selected


yi : {
0 Otherwise
N

a x  b  M y
j 1
ij j i i
i=1,..,N

 y
j 1
i
 N k

IE252 – Integer Programming 11


FACILITY LOCATION

- Plants
- Warehouses, Distribution Centers
- Service Facilities: Hospitals, schools, …

N : number of customers (demand points)


M : alternative locations for the facilities (supply?)

j
Dj
cij

i Si Fi

Si : capacity of the facility at location i


Dj: demand of customer j
Fi: Fixed cost of building a facility at i
Cij: unit cost of shipment from i to j

xij: amount of material shipped from facility built at location i


to customer j

1 if a facility is built at location i


yi : {
0 Otherwise

IE252 – Integer Programming 12


M M N
Min z   Fi y   c x ij ij
i
i 1 i 1 j 1

S.t.
a) Supply:
N

 x  S yi
j 1
ij i
i=1,..,M

b)Demand:
M

 x D
i 1
ij j
j=1,..,N

yi = 0/1 and xij ≥0 i=1,..,M; j=1,..,N

or
N

 x S
j 1
ij i
i=1,..,M

xij≤ M yi for all i=1,..,M; j=1,..,N

IE252 – Integer Programming 13


FIXED CHARGE TRANSPORTATION PROBLEM:

Fij :fixed charge of building link or shipping on arc (i,j)

1 if arc (i,j) is used


yij : {
0 Otherwise
M N M N
Min z  F y ij
 c x ij ij
ij
i 1 j 1 i 1 j 1

S.t.
a) Supply:
N

 x S
j 1
ij i
i=1,..,M

b)Demand:
M

 x D
i 1
ij j
j=1,..,N

xij≤ M yij for all i=1,..,M; j=1,..,N

yij = 0/1 and xij ≥0 i=1,..,M; j=1,..,N

FIXED CHARGE NETWORK FLOW PROBLEMS

Fi Fij cij

IE252 – Integer Programming 14


MINIMUM SPANNING TREE PROBLEM

F12=1

1 2

2
2
3
6

4 5 2

3
4
5

Fij : cost of building arc (i,j)

1 if arc (i,j) is built (used)


yij : {
0 Otherwise

b1 = N-1 and bi = -1 for i=2,…N


N N
Min z  F y ij ij
i 1 j 1

s.t.:
N N

 x  x b
j 1
ij
k 1
ki i
for all i=,1..,N

xij≤ M yij for all i=1,..,N; j=1,..,N

yij = 0/1 and xij ≥0 i=1,..,N; j=1,..,N

IE252 – Integer Programming 15


SET COVERING PROBLEMS

There are 6 towns that need emergency ambulance service. The


ambulance stations may be located at in any of these six towns. There
must be a station within 15 minutes of driving time for each town.

TOWNS 1 2 3 4 5 6
1 0 23 14 18 10 32
2 23 0 24 13 22 11
3 14 24 0 60 19 20
4 18 13 60 0 55 17
5 10 22 19 55 0 12
6 32 11 20 17 12 0

Coverage matrix : ( aij )

TOWNS 1 2 3 4 5 6
1 1 0 1 0 1 0
2 0 1 0 1 0 1
3 1 0 1 0 0 0
4 0 1 0 1 0 0
5 1 0 0 0 1 1
6 0 1 0 0 1 1

1 if a station is built at town i


xi :{
0 otherwise

Min Z = x1 + x2 + x3 + x4+ x5 + x6

S.t.:

town 1: x1 + x3 + x5 ≥ 1
town 2: x2 + x4 + x6 ≥ 1
town 3: x1 + x3 ≥ 1
town 4: x2 + x4 ≥ 1
town 5: x1 + x5+ x6 ≥ 1
town 6: x2 + x5 + x6 ≥ 1

IE252 – Integer Programming 16


M= number of possible facilities
N= number of demand points

aij = 1 if facility at location i could cover demand point j


0 otherwise

M
Min z  x
i
i 1

S.t.
M

a x  1
i 1
ij i
j=1,..,N

xi = 0/1 i=1,..,M; j=1,..,N

SET PRATITIONING (only one serves)

a x 1
i 1
ij i
j=1,..,N

IE252 – Integer Programming 17


PIECEWISE LINEAR FUNCTIONS

Two types of GAS is produced from two types of OIL.

Profit/gallon
GAS1 at least 50% OIL1 12cents
GAS2 at least 60% OIL1 14cents

Available:

500 gallons OIL1


1000 gallons OIL2

Let.

xij : amount of oil type i put into gas j.

Max Z= 12x11 +12x21 +14x12 +14x22

S.t.:

x11 + x12 ≤ 500

x21 +x22 ≤ 1000

x11 /(x11 + x21) ≥0.50

x12 /(x21 + x22) ≥0.60

xij ≥0 for all i,j

IE252 – Integer Programming 18


x1000 cents

30

15

25

20

20

15

10

25

500 1000 1500 gallons


0
IE252 – Integer Programming 19
Additional OIL1 can be purchased upto 1500 gallons. Cost:

First 500gallons 25cents


Next 500gallons 20cents
Next 500gallons 15cents

O1: amount of OIL1 purchased

25O1 if O1≤500

C(O1) = 12500 + 20(O1-500) if 500≤O1≤1000

22500 + 15(O1-1000) if 1000≤O1≤1500

25O1 if O1≤500
C(O1) = 2500 + 20O1 if 500≤O1≤1000
7500 + 15O1 if 1000≤O1≤1500

Max Z= 12x11 +12x21 +14x12 +14x22 – C(O1)


S.t.:
x11 + x12 ≤ 500+O1

x21 +x22 ≤ 1000

x11 /(x11 + x21) ≥0.50

x12 /(x12 + x22) ≥0.60

O1≤1500

xij ≥0 for all i,j

IE252 – Integer Programming 20


Let :

zk = amount of OIL1 purchased at price level k (k=1,2,3)

1 OIL1 purchased at level k


yk : {
0 Otherwise

Add below constraints to the model:

z1 ≤500y1

z2 ≥500y2
z2 ≤1000y2

z3 ≥1000y3
z3 ≤1500y3

O1= z1 + z2 +z3

y1 + y2 +y3 =1

C(O1)= 25z1 +20z2+15z3+2500y2+7500y3

Max Z= 12x11 +12x21 +14x12 +14x22 – 25z1 -20z2-15z3


-2500y2-7500y3

PURE INTEGER (BINARY) PROBLEMS : IP OR BIN

MIXED INTEGER PROBLEMS : MIP

IE252 – Integer Programming 21


ASSEMBLY LINE BALANCING

RENAULT 1 min/vehicle (mixed model)


Assembly Line

Station1 Station2 Station3 StationK

Parts/tasks

ASSEMBLY CHART:
5
C

11 3
B F 7
7
D G
A 4
0 I

E H
12 11

Total work = 63 minutes Total working time/day = 480 min.

1 WORKER(station) 480/63= 7.62 products/day = 7

2 WORKERS 2*480/63 = 15.23 products/day = 15

3 WORKERS 3*480/63 = 22.85 products/day = 22

IE252 – Integer Programming 22


X= 30 units/day

Cycle time =C=480/30 = 16 minutes/unit

Minimum number of worker(stations) required = 63/16 = 3.93  4

Can we have a line with 4 stations?

5
C

11 3
B F 7
7
D G
A 4
0 I

E H
12 11

7 min. 15 12 16 13

A B,D E H,C F,G


,I

1 2 3 4 5

Efficiency = 63/ (5*16) = .7875 78.75%

21.25% idle time

IE252 – Integer Programming 23


OBJECTIVES:

1) Given CYCLE TIME Minimize the number of


STATIONS

2) Given the number of STATIONS minimize CYCLE


TIME

Assign tasks to stations:

1) workload at any station ≤ Cycle time

2) precedence relationship: predecessor tasks of any task


should be done on previous or same station.

N: number of tasks

1 if task i is assigned to station k


xik = {
0 otherwise

1 if station k operates
yk = {
0 otherwise

C: cycle time (given)


K: maximum number of stations
ti : task time
IPi = set of immediate predecessors of task i

IE252 – Integer Programming 24


K
Min Z y (1)
k
k 1

S.t.

x
k 1
ik =1 for all i=1,..,N (2)

t i x
i 1
ik ≤ C yk for all k=1,..,K (3)

K K

k x
k 1
ik
≥ k x
k 1
jk
for all i=1,..,N and jIPi (4)

xik=0/1 and yk=0/1 for all i=1,..,N ; k=1,..,K (5)

Given K 

Minimize C (1)

t i x ≤ C
i 1
ik
for all k=1,..,K (3)

No need for yk variables

IE252 – Integer Programming 25


- MULTIPLE WORKERS/PROCESSORS IN STATIONS

Available time in a station = C x (number of workers)

- PARALLEL STATIONS

2C 2C

ST2-1 ST4-1
C C

ST1
ST3
2C 2C

ST2-2 ST4-2

C=3 min/unit

Min. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

ST1 C1 C1 C1 C2 C2 C2

ST2-1 C1 C1 C1 C1 C1 C1

ST2-2 C2 C2 C2 C2 C2 C2

ST3 C1 C1 C1 C2 C2 C2

- MIXED MODEL ASSEMBLY LINES

IE252 – Integer Programming 26


BRANCH AND BOUND METHOD (B&B)

MAX Z = 8x + 7y
s.t.
-18x +38y ≤ 133
13x +11y ≤ 125
10x - 8y ≤ 55
x, y ≥ 0 and integer

y 7
ZLP=78.25
6 x=4.75
y=5.75
5

1 2 3 4 5 6 7 8

Feasible points(IP)  Feasible area (LP)

Max: ZIP ≤ ZLP Upper Bound (UB)

Min: ZLP ≤ ZIP Lower Bound (LB)

IE252 – Integer Programming 27


P1
Z= 78.25
x=4.75 y=5.75
x≤4 x≥5

P2 P3
Z= 68.76 Z= 78.18
x=4 y=5.95 x=5 y=5.46

y≤5 y≥6

P4 P5
Z= 78.07 INFEASIBLE
x=5.39 y=5

x≤5 x≥6

P6 P7
Z= 75 Z= 77.91
x=5 y=5 x=6 y=4.27

y≤4
y≥5
P8
Z= 77.85 P9
x=6.23 y=4 INFEASIBLE
x≥7
x≤6

P11
P10 Z= 77.64
Z= 76 x=7 y=3.1
x=6 y=4 y≥4
y≤3

P13
P12 INFEASIBLE
Z= 77.62
x=7.1 y=3
x≤7 x≥8

P14 P15
Z= 77 INFEASIBLE
x=7 y=3

IE252 – Integer Programming 28


STRONGER FORMULATIONS OF IP
MAX Z= 4x1 + 3x2
s.t.
3x1 + 4x2 ≤ 5
x1 , x2≥0 and integer

X2
1.25

1.67
1 X1

ZLP1 =4 (5/3) = 6.67

Add: X1 ≤ 1 and X2 ≤ 1 (2)

ZLP2 =4*1 + 3 * (1/2) = 5.5

Add : x1 + x2 ≤ 1 (3)
ZLP3 =4*1 = 4 = ZIP

IE252 – Integer Programming 29


LP2

LP1

IP

Maximization: Z*IP ≤ Z*LP1 ≤ Z*LP2

FORMULATE IP’s such that the LP relaxations are


STRONGER (TIGHTER)!!!!

HELPS YOU TO SOLVE IP’s WITH LESSER EFFORT

IE252 – Integer Programming 30


FIXED CHARGE TRANSPORTATION PROBLEM:
M N M N
Min z  F y ij
 c x ij ij
ij
i 1 j 1 i 1 j 1

S.t.
a) Supply:
N

 x S
j 1
ij i
i=1,..,M

b)Demand:
M

 x D
i 1
ij j
j=1,..,N

xij≤ M yij for all i=1,..,M; j=1,..,N

yij = 0/1 and xij ≥0 i=1,..,M; j=1,..,N

What should M=?

Si Dj
xij
i j

xij≤ M yij

M= Min { Si , Dj }

IE252 – Integer Programming 31


KNAPSACK – BIN PACKING PROBLEM

objects

KNAPSACK

There is a single Knapsack(bin) with a capacity (K) and there


are N items (objects) each has a value (vj) and capacity
requirement (wj).

How many of these items to put into the bin so that total value
of the objects will be maximized without exceeding the capacity
of the bin?

Capacity K=12 tons.

item vj wj(tons)
1 6 1
2 3 2
3 2 3
4 1 4

IE252 – Integer Programming 32


xj = number of item j put into the bin

Max Z= 6 x1+3 x2+2 x3+1 x4

S.t. :

1x1+2 x2+3 x3+4 x4 ≤ 12

xj: integer (0/1) j=1,..,4

N
Max z  v j x j
j 1

S.t.
N

w x  K
j 1
j i

xj = integer (0/1) j=1,..,N

SOLVING KNAPSACK PROBLEMS BY B&B

Max ZIP = c1x1+ c2x2+……+ cjxj+……+ cnxn

s.t.
a1x1+ a2x2+…….+ ajxj+………..+ anxn≤b

xj= 0/1 for all j=1,…,n

LP relaxation: 0≤ xj ≤1

IE252 – Integer Programming 33


ZIP ≤ ZLP

MAX ZIP = 40x1+ 80x2+10x3+10x4+4x5+20x6+60x7


s.t.
40x1+ 50x2+30x3+10x4+10x5+40x6+30x7≤ 100

xj= 0/1 for all j=1,…,7

Solving LP:

Most value per unit capacity used

(yükde hafif pahada ağır!)

Order

c[1]/a[1] ≥ c[2] /a[2] ≥….. c[j] /a[j] ≥…….. ≥c[n] /a[n]

a
j 1
j
b largest k

x[j] =1 for all j=1,..,k

 k 
xk 1  b   a  j  / ak 1
 j 1 

x[j] =0 for all j=k+1,..,n

IE252 – Integer Programming 34


EXAMPLE:

MAX ZIP = 40x1+ 80x2+10x3+10x4+4x5+20x6+60x7


s.t.
40x1+ 50x2+30x3+10x4+10x5+40x6+30x7≤ 100

xj= 0/1 for all j=1,…,7

j 1 2 3 4 5 6 7
cj/aj 1 8/5 1/3 1 2/5 1/2 2
Rank 3 2 6 3 5 4 1

30+50+10=90 ≤ 100

x1=(100-90)/40=1/4

x7=x2=x4=1 x1=1/4 x3=x5=x6=0 ZLP=160

B&B:

MAX ZIP = 16x1+ 22x2+12x3+8x4


s.t.
5x1+ 7x2+4x3+3x4≤ 14

xj= 0/1 for all j=1,…,4

j 1 2 3 4
cj/aj 3 1/5 3 1/7 3 2 2/3
Rank 1 2 3 4

x1=x2=1 x3=1/2 x4=0 ZLP=44

IE252 – Integer Programming 35


S1
ZLP= 44
x1=x2=1
x3=1/2
x3=0 x3=1

S2 S3
ZLP= 43 1/3 ZLP= 43 5/7
x1=x2=1 x1=x3=1
x4=2/3 x2=5/7

x4=0 x2=0 x2=1


x4=1
S4 S5
S8 S9 ZLP= 36 ZLP= 43 3/5
ZLP= 38 ZLP= 42 6/7 x1=x3=x4=1 x2=x3=1
x1=x2=1 x1=x4=1 x1=3/5
x2=6/7
x1=0
x1=1

S6 S7
ZLP= 42 INF
x2=x3=x4=1

IE252 – Integer Programming 36


COMBINATORIAL PROBLEMS

- JOB SCHEDULING

JOBS

Sequence?

n! different sequences

IE252 – Integer Programming 37


- Travelling Salesperson (Man) Problem (TSP)

CUSTOMERS

???

dij

SM

n! different sequences

n=10 n!= 3.628.000

B&B

Bounds special to problems.

IE252 – Integer Programming 38


JOB – MACHINE SCHEDULING PROBLEM

Job i Process time days Due date


pi di
1 6 8
2 4 4
3 5 12
4 8 16

JOBS

1
xij
Position (j)
2

3
4 3 2 1
4 position

1 if job i is the jth job processed


xij :{
0 otherwise

Ci: completion time of job i

Sequence (1-2-3-4)

Tardiness: Ti = Max (0, Ci – di)

IE252 – Integer Programming 39


Ci 6 10 15 23

1 2 3 4

Ti 0 6 3 7

Total Tardiness = 16

Formulate: n jobs

Kj = completion time of the jth job processed.


n
Min TT = T
j 1
j

S.t.
n

 x
j 1
ij
1 i=1,..,n

 x
i 1
ij
1 j=1,..,n

K j
 K j 1   i 1
px
i ij
j=1,..,n

T j
 K j   d i xij
i 1
j=1,..,n

Xij= 0/1 for all i,j=1,…,n

IE252 – Integer Programming 40


Fill the positions starting from the last (4th)

S’ S

S’ S

qS’

S= set of jobs which are scheduled to the last |S| positions

S’= set of jobs which are not yet scheduled

q p
S' i
iS '

TS = total tardiness of jobs in S


position
LBS = TS

Position |S’|

S’ | ii S

qS’

LBS+i = TS + Max ( 0 , qS’ – di) iS’

IE252 – Integer Programming 41


j p d
Node 0 1 6 8
S= 2 4 4
3 5 12
4 8 16
j=4

X14 =1
X24 =1 X34 =1
X44 =1
Node 1 Node 2 Node 3 Node 4
LB= 15 LB= 19 LB= 11 LB= 7
q = 17 q = 19 q = 18 q = 15

j=3
X13 =1 X33 =1
X23 =1

Node 5 Node 6 Node 7


LB= 14 LB= 18 LB= 10
q=9 q = 11 q = 10

X12 =1 X22 =1
j=2
Node 8 Node 9
LB= 12 LB= 16
q=4 q=6

IE252 – Integer Programming 42


Node 0
S=

j=4
X14 =1

X24 =1 X34 =1
X44 =1
Node 1 Node 2 Node 3 Node 4
LB= 15 LB= 19 LB= 11 LB= 7
q = 17 q = 19 q = 18 q = 15

j=3 X13 =1
X13=1
X23 =1 X33 =1
X23=1 X43=1

Node 10 Node 11 Node 12 Node 5 Node 6 Node 7


LB= 21 LB= 25 LB= 13 LB= 14 LB= 18 LB= 10
q = 12 q = 14 q = 10 q=9 q = 11 q = 10

X12 =1 X22 =1

j=2
Node 8 Node 9
LB= 12 LB= 16
q=4 q=6

IE252 – Integer Programming 43


DOMINANCE

n!

OPT

pi ≤ pj and di ≤ dj  i<<j

IE252 – Integer Programming 44


Job i Process time days Due date
pi di
1 6 8
2 4 4
3 5 12
4 8 16

2<< 1,3,4
1,2,3<<4

( 1 3)
2 4

IE252 – Integer Programming 45


Node 0
S=

j=4

X13 =1

X33 =1

j=3 Node 5 Node 7


LB= 14 LB= 10
q=9 q = 10

X12 =1

j=2
Node 8
LB= 12
q=4

IE252 – Integer Programming 46


- Travelling Salesperson (-man) Problem (TSP)

2
1

TOUR
4

1 if TS goes directly from city(customer) i to city j


xij :{
0 otherwise
n n
Min TT =   cij xij
i 1 j 1

S.t.
n

 x
j 1
ij
1 i=1,..,n

 x
i 1
ij
1 j=1,..,n

+ Subtour elimination constraints

Xij= 0/1 for all i/j=1,…,n

IE252 – Integer Programming 47


Subtour elimination constraints :

connection

S S’

n n

  x 1
iS jS '
ij for all subsets S{1,2,…,n}

Add 2n constraints

ui – uj +nxij ≤ n-1 i/j=1,…,n and ij

ui= the order city i is visited

Add (n-1)2 constraints

IE252 – Integer Programming 48


x34=x43=1

u3-u4 +5x34 ≤4

u4-u3 +5x43 ≤4
+______________

5(x34 +x43 ) ≤8

NOT UNIMODULAR!!!!!!!!!



IE252 – Integer Programming 49


SOLVING TSP BY B&B:

cij

i/j 1 2 3 4 5
1 M 132 217 164 58
2 132 M 290 201 79
3 217 290 M 113 303
4 164 201 113 M 196
5 58 79 303 196 M

SOLVE AN ASSIGNMENT PROBLEM

1-5-2-1 and 3-4-3

ZAP= 495 ≤ ZTSP

BRANCH:

x34=0 x43=0

c34=M c43=M

SUBTOURS ARE ELIMINATED BY BRANCHING

IE252 – Integer Programming 50


S1
ZAP = 495
1-5-2-1
3-4-3
X34=0
X43=0

S2
ZAP = 652 S3
1-4-3-1 ZAP = 652
2-5-2 1-3-4-1
2-5-2

X25=0 X52=0

S3 S4
ZAP = 668 ZAP = 704
1-5-2-4-3-1 1-4-3-2-5-1

X25=0 X52=0

S5 S6
ZAP = 704 ZAP = 910
1-5-2-3-4-1 1-3-1
2-5-4-2
3-4-3

IE252 – Integer Programming 51


HEURISTICS FOR TSP

APPROXIMATE - NEAR OPTIMAL

SOLUTION METHODS

A. CONSTRUCTION HEURISTICS:

-Nearest Neighbor (NNH)


- Cheapest Insertion (CIH)
-….
-….

B. IMPROVEMENT HEURISTICS
- exchange based
- ….

C. META HEURISTICS
- Tabu search
- Simulated annealing
- Genetic Algorithms
- Ant colony
- …

IE252 – Integer Programming 52


Nearest Neighbor Heuristic (NNH)

- start from any city


- go to the nearest city always

i/j 1 2 3 4 5
1 M 120 220 150 210
2 120 M 100 110 130
3 220 80 M 160 135
4 150 M 160 M 190
5 210 130 185 M M

Start at city 3

80
3------- >2
110
2------- >4
150
4------- >1
210
1------- >5
183
5------- >3

ZTSP= 735

1-2-3-4-5-1 ZTSP= 780

IE252 – Integer Programming 53


Start Tour ZTSP
1 1-2-3-4-5-1 780
2 2-3-4-1-5-2 750
3 3-2-4-1-5-3 735
4 4-1-2-3-5-4 
5 5-2-3-4-1-5 750

IMPROVEMENT HEURISTICs :

Pairwise exchange

3-2-4-1-5-3 ZTSP= 735

2< -- >4 
4< --> 1 725

k-->i-->j-->l

k-->j-->i-->l

(ckj+ cji+ cil) - (cki+ cij+ cjl) = S(i,j)

Exchange ZTSP
(2-4) 
(4-1) 725
(1-5) 810

3-2-4-1-5-4 ZTSP= 725

IE252 – Integer Programming 54


Pairwise neighbor exchange
Pairwise all exchange – 2-OPT

Triple exchange - 3-OPT

n-OPT ???

Meta heuristics:

- Tabu search
- Simulated annealing
- Genetic Algorithms
- Ant colony
- …

CONSTRUCTION

iterate

IMPROVEMENT

IE252 – Integer Programming 55


EVALUATION OF HEURISTICS

1. PERFORMANCE GUARANTEES - Worst Case Bounds

Cheapest Insertion Heuristic – CIH

Z(CHI) / Z(OPT) ≤ 2

Z(HEUR) / Z(OPT) ≤ B

2. PROBABILISTIC ANALYSIS

Assuming cost/distance have certain known probabilty


distributions

E[Z(HEUR)] / E[Z(OPT)] ≤ K

3. EMPRICAL (statistical) ANAYLSIS

Solve large number of TSPs

Compare the average deviation from the optimal (statistical


analysis)

On the average deviates from optimal by x%

NNH  15%

CIH  15%

IE252 – Integer Programming 56


EXTENSIONS OF TSP

1. M-TSP : Multiple salesperson

- which customers by which TS? (assignment)


- tour for each TS?

2. M-TSP Capacitated

Each TS has a capacity and customers demand certain


amount of material to be delivered by TS(vehicle)

VEHICLE ROUTING PROBLEM (VRP)

IE252 – Integer Programming 57


3. Time windows

Each customer can be visited between certain times

4. Distance (time) restricted

5. Pick-up and Delivery Problem

di j2

i1

i2

j1

dj

MANY COMBINATORIAL PROBLEMS CAN BE


TRANSFORMED TO

TSP
IE424 Scheduling
IE452 Mathematical Modeling and Applications
IE455 An Introduction to Combinatorial Analysis
IE456 Network Routing

IE252 – Integer Programming 58

Das könnte Ihnen auch gefallen