dongxu wu sining gu hong ouyang - columbia universitycs2035/courses/ieor4405.s14/p12.pdf · 1....

24
Dongxu Wu Sining Gu Hong Ouyang *

Upload: lamthuy

Post on 31-Jan-2018

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

Dongxu Wu

Sining Gu

Hong Ouyang

*

Page 2: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

Page 3: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

1.

Alaska 2. Korea

Strait

3

Makassar

Strait

4

Sunda

Strait

5

Malacc

a

6

Red

Sea,

the

southe

rn tip

7

Suez

Canal

8

Gibral

tar

9

Strait

of

Horm

uz

10

The

Straits

of

Florid

a

11

South

Atlant

ic

Ocean

12

Icelan

d -

British

Water

way

13

WA

14

San

Diego

15

Virgini

a

State

16

Hawai

i

17

Japan

Yokos

uka

18

Guam

Island

0 7000 9000 11000 11000 15000 20000 16000 19000 13000 24000 24000 2000 4500 16500 5000 6000 8000

7000 0 5000 6000 6000 12000 17000 22000 12000 18000 24000 28000 8000 8000 18000 7000 2000 3000

9000 5000 0 2000 2000 8000 12000 18000 8000 16000 15000 24000 12000 11000 18000 8000 4000 3000

11000 6000 2000 0 1000 7000 11000 17000 7000 17000 14000 23000 14000 13000 20000 10000 6000 5000

11000 6000 2000 1000 0 6000 10000 16000 6000 18000 15000 22000 15000 14000 18000 12000 8000 7000

15000 12000 8000 7000 6000 0 4000 10000 3000 20000 12000 16000 21000 20000 15000 18000 14000 13000

20000 17000 12000 11000 10000 4000 0 6000 7000 16000 16000 12000 18000 15500 12000 18000 17000 16000

16000 22000 18000 17000 16000 10000 6000 0 13000 10000 12000 6000 14000 11500 8000 14000 20000 20000

19000 12000 8000 7000 6000 3000 7000 13000 0 23000 14000 19000 17000 16000 19000 18000 17000 13000

13000 18000 16000 17000 18000 20000 16000 10000 23000 0 9000 11000 11000 8500 2000 10000 16000 15000

24000 24000 15000 14000 15000 12000 16000 12000 14000 9000 0 18000 22000 19500 10000 16000 22000 21000

24000 28000 24000 23000 22000 16000 12000 6000 19000 11000 18000 0 22000 19500 9500 21000 27000 32000

Page 4: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

*Basic Stand-by Strategy

*Each base can accommodate at most 2 carriers

*Each carrier can only stay on one hot-spot\

*12 hotspots. Gen. 12 different strategies that

minimize the total response time of aircraft

carriers for each hot post.

*Compare and analyze, then get the best

solution.

Page 5: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

* For each strategy: 𝑄𝑚||𝐿𝑚𝑎𝑥

* Let Tij be the time needed for aircraft carrier i to travel from spot j to destination.

* Let Cij be the placement of aircraft carrier i at spot j (binary).

* Min 𝑇𝑖𝑗𝐶𝑖𝑗

S.T. 𝐶𝑖𝑗𝑖=12,𝑗=12𝑖=1,𝑗=1 = 6

𝐶𝑖𝑗𝑖=12,𝑗=18𝑖=1,𝑗=13 = 6

𝐶𝑖𝑗𝑖=12 𝑖=1 ≤ 1 𝑓𝑜𝑟 𝑎𝑙𝑙 1 ≤ 𝑗 ≤ 12

𝐶𝑖𝑗𝑖=12 𝑖=1 ≤ 2 𝑓𝑜𝑟 𝑎𝑙𝑙 13 ≤ 𝑗 ≤ 18,

All variables positive and integer

Page 6: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

# File Project.mod

# model for final project

param T{i in 1..12, j in 1..18};

var c{i in 1..12, j in 1..18} integer >=0;

minimize Response:

sum{i in 1..12, j in 1..18} T[i,j]*c[i,j];

subject to Sixbase:

sum{i in 1..12, j in 1..12} c[i,j] = 6;

subject to Sixhotspot:

sum{i in 1..12, j in 13..18} c[i,j] = 6;

subject to maxbase {j in 13..18}:

sum{i in 1..12} c[i,j] <= 2;

subject to maxhotspot {j in 1..12}:

sum{i in 1..12} c[i,j] <= 1;

subject to oneship {i in 1..12}:

sum{j in 1..18} c[i,j]=1;

Page 7: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

V Spot

1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18

56 Carrier

1 0.0 5.2 6.7 8.2 8.2 11.2 14.9 11.9 14.1 9.7 17.9 17.9 1.5 3.3 12.3 3.7 4.5 6.0

56 C2 0.0 5.2 6.7 8.2 8.2 11.2 14.9 11.9 14.1 9.7 17.9 17.9 1.5 3.3 12.3 3.7 4.5 6.0

56 C3 0.0 5.2 6.7 8.2 8.2 11.2 14.9 11.9 14.1 9.7 17.9 17.9 1.5 3.3 12.3 3.7 4.5 6.0

65 C4 0.0 4.5 5.8 7.1 7.1 9.6 12.8 10.3 12.2 8.3 15.4 15.4 1.3 2.9 10.6 3.2 3.8 5.1

56 C5 0.0 5.2 6.7 8.2 8.2 11.2 14.9 11.9 14.1 9.7 17.9 17.9 1.5 3.3 12.3 3.7 4.5 6.0

65 C6 0.0 4.5 5.8 7.1 7.1 9.6 12.8 10.3 12.2 8.3 15.4 15.4 1.3 2.9 10.6 3.2 3.8 5.1

60 C7 0.0 4.9 6.3 7.6 7.6 10.4 13.9 11.1 13.2 9.0 16.7 16.7 1.4 3.1 11.5 3.5 4.2 5.6

65 C8 0.0 4.5 5.8 7.1 7.1 9.6 12.8 10.3 12.2 8.3 15.4 15.4 1.3 2.9 10.6 3.2 3.8 5.1

56 C9 0.0 5.2 6.7 8.2 8.2 11.2 14.9 11.9 14.1 9.7 17.9 17.9 1.5 3.3 12.3 3.7 4.5 6.0

56 C10 0.0 5.2 6.7 8.2 8.2 11.2 14.9 11.9 14.1 9.7 17.9 17.9 1.5 3.3 12.3 3.7 4.5 6.0

56 C11 0.0 5.2 6.7 8.2 8.2 11.2 14.9 11.9 14.1 9.7 17.9 17.9 1.5 3.3 12.3 3.7 4.5 6.0

56 C12 0.0 5.2 6.7 8.2 8.2 11.2 14.9 11.9 14.1 9.7 17.9 17.9 1.5 3.3 12.3 3.7 4.5 6.0

Page 8: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18

s1 12 5 4 8 7 0 0 0 0 6 0 0 9 ,

10 1 ,2 0

3 ,

11 0 0

S2 6 11 12 7 5 0 0 0 4 0 0 0 0 0 0 3 , 8 1 ,10 2,9

S3 0 2 5 12 3 7 0 0 6 0 0 0 0 0 0 4, 8 1 ,

10 9,11

S4 0 11 5 9 12 8 0 0 2 0 0 0 0 0 0 4,6 7,10 1 , 3

S5 0 12 5 9 10 3 0 0 11 0 0 0 0 0 0 4, 6 7 , 8 1, 2

S6 0 0 11 12 1 10 3 0 9 0 0 0 0 0 4, 6 0 7 ,8 2 ,5

S7 0 0 0 9 10 5 3 11 2 0 0 0 0 4 ,6 1, 12 0 0 7 ,8

S8 0 0 0 0 0 10 11 12 0 3 1 5 4 , 8 6 ,7 2,9 0 0 0

S9 0 0 2 3 1 11 5 0 9 0 0 0 8 4,7 0 0 6 2 ,

10

S10 6 0 0 0 0 0 4 9 0 12 2 7 0 1,5 10,

11 3, 8 0 0

S11 0 0 0 1 0 5 0 3 10 11 9 0 0 4,8 2, 12 6 ,7 0 0

s12 0 0 0 0 0 12 11 9 0 10 1 3 0 6,7 2, 5 4 , 8 0 0

Page 9: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

*We get the U.S navy 12

carriers response ability

is as right side

*(based on 6 existed bases

and 12 hot spots)

Total Days Avg_days

51 4.3

41.7 3.5

38 3.2

45.3 3.8

52.2 4.4

78.2 6.5

87.3 7.3

78.1 6.5

85.7 7.1

69.7 5.8

106.5 8.9

114.1 9.5

Page 10: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

* No 1-12 carriers are located at the 12 hotspots respectively. Each hotspot has one carrier.

* All the carriers are now performing on some tasks. Once they receive the order to return to bases, they should first accomplish the task and then return.

Goal: *Find the shortest time needed for all the 12 carriers to return to a base.

Page 11: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

*Qm|rj|Cmax.

*Qm = 12 carriers with different speed

*rj = the time each carrier spend on continue finishing the task

*Cmax = minimize the length of time needed for all the 12

carriers to return to the bases

Page 12: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

Carrier speed rj 1 2 3 4 5 6

1 56 1 1.5 3.3 12.3 3.7 4.5 6.0

2 56 2 6.0 6.0 13.4 5.2 1.5 2.2

3 56 3 8.9 8.2 13.4 6.0 3.0 2.2

4 65 4 9.0 8.3 12.8 6.4 3.8 3.2

5 56 5 11.2 10.4 13.4 8.9 6.0 5.2

6 65 6 13.5 12.8 9.6 11.5 9.0 8.3

7 60 7 12.5 10.8 8.3 12.5 11.8 11.1

8 65 8 9.0 7.4 5.1 9.0 12.8 12.8

9 56 9 12.6 11.9 14.1 13.4 12.6 9.7

10 56 10 8.2 6.3 1.5 7.4 11.9 11.2

11 56 11 16.4 14.5 7.4 11.9 16.4 15.6

12 56 12 16.4 14.5 7.1 15.6 20.1 23.8

Page 13: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

param numcarriers = 12;

param numbases = 6;

param T {1..numcarriers, 1..numbases} >=0;

var X {1..numcarriers, 1..numbases} binary;

minimize Makespan {i in 1..numcarriers}:

max { sum {j in 1..numbases} T[i,j]*X[i,j]};

subject to Carrier_Constraints {i in 1..numcarriers} :

sum {j in 1..numbases} X[i,j] = 1;

subject to Base_Constraints {j in 1..numbases} :

sum {i in 1..numcarriers} X[i,j] = 2;

Page 14: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

*Cmax = 19.1

1 2 3 4 5 6

2.5 15.4 18.4 9.0 11.0 18.1

8.0 16.3 19.1 10.4 15.0 18.7

(1,2) (8,10) (11,12) (3,4) (5,6) (7,9)

Page 15: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

*Job Shop Scheduling Problems

* 3 jobs (carriers), 4 machines(hotspots)

*Each carrier follows a predetermined route

*(a sequence of hotspots)

Strategy 3:

*Operation (i,j) : Processing of carrier j on hotspot i

*Processing time pij

*Assume that carriers do not recirculate

*Minimize Cmax

Page 16: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

Carriers Hotspot Sequence Processing Times

1 1,2,3 p11=21, p21=17, p31=9

2 2,1,4,3 p22=17, p12=7, p42=11,

p32=13

3 1,2,4 p13=9, p23=15, p43=7

Page 17: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

* param numhotspots = 3;

* param carrier = 3;

* param M = 10000;

* param C >= 0;

* param T [i in 1..numhotspots, j in 1.. carrier];

* param P [i in 1..numhotspots, j in 1.. carrier];

* var X[ i in 1..numhotspots, j in 1..carrier, k in 1..

carrier] binary;

*

* minimize Makespan: C;

*

* subject to makespan1: C>=T[3,1] + P[3,1];

* subject to makespan2: C>=T[3,2] + P[3,2];

* subject to makespan3: C>=T[4,3] + P[4,3];

*

* subject to job1:t21 ≥ t11 + p11;

* subject to job2:t31 ≥ t21 + p21;

* subject to job3:t12 ≥ t22 + p22;

* subject to job4:t42 ≥ t12 + p12;

* subject to job5:t32 ≥ t42 + p42;

* subject to job6:t23 ≥ t13 + p13;

* subject to job7:t43 ≥ t23 + p23

*

* subject to constraint {i in 1..numhotspots,}:

* {j in 1.. carrier, j<k}

* {

* T[i,1]+P[i,1] <= T[i,2]+M*(1-X[i,1,2]);

* T[i,2]+P[i,2] <= T[i,1]+M*X[i,1,2];

* T[i,1]+P[i,1] <= T[i,3]+M*(1-X[i,1,3]);

* T[i,3]+P[i,3] <= T[i,1]+M*X[i,1,3];

* T[i,2]+P[i,2] <= T[i,3]+M*(1-X[i,2,3]);

* T[i,3]+P[i,3] <= T[i,2]+M*X[i,2,3];

* }

Page 18: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

*Optimal solution with

makespan 60

Hotspots Carrier

Sequence

1 1,2,3 (21,7,9)

2 2,1,3(17,17,15)

3 1,2(9,13)

4 2,3(11,7)

Page 19: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

* Assume there are 10 carriers (C0–C9) available and there are also 10 hotspots(H1–H10) need to be watched. Each time only one carrier watching one hotspot.

* Every hotspot must be processed on each of the 10 carriers in a predefined sequence.

* The objective is to minimize the completion time of the last Hotspot(job) to be processed (Makespan).

* The hotspots are described in the data set “arr” by using the following statements.

H1 C2 C3 C5 C4 C0 C7 C8 C9 C1 C6

H2 4 7 1 8 0 3 2 5 9 6

H3 9 6 4 3 1 0 8 2 7 5

H4 1 2 7 5 8 4 3 6 9 0

H5 6 1 3 0 2 8 4 7 9 5

H6 7 5 8 2 4 6 3 1 9 0

H7 6 1 4 5 2 3 7 8 9 0

H8 0 5 8 9 3 6 4 7 2 1

H9 5 2 3 6 4 7 8 9 1 0

H10 9 4 6 7 0 2 8 5 3 1

* Carriers Arrange Schedule for 10 Hotspots

Page 20: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

* /* Hotspots specification */

data arr (drop=i mid);

do i=1 to 10;

input mid _DURATION_ @;

_RESOURCE_=compress(‘C'||put(mid,

best.));

output;

end;

datalines;

2 44 3 5 5 58 4 97 0 9 7 84 8 77 9 96 1 58 6 89

4 15 7 31 1 87 8 57 0 77 3 85 2 81 5 39 9 73 6 21

9 82 6 22 4 10 3 70 1 49 0 40 8 34 2 48 7 80 5 71

1 91 2 17 7 62 5 75 8 47 4 11 3 7 6 72 9 35 0 55

6 71 1 90 3 75 0 64 2 94 8 15 4 12 7 67 9 20 5 50

7 70 5 93 8 77 2 29 4 58 6 93 3 68 1 57 9 7 0 52

6 87 1 63 4 26 5 6 2 82 3 27 7 56 8 48 9 36 0 95

0 36 5 15 8 41 9 78 3 76 6 84 4 30 7 76 2 36 1 8

5 88 2 81 3 13 6 82 4 54 7 13 8 29 9 40 1 78 0 75

9 88 4 54 6 64 7 32 0 52 2 6 8 54 5 82 3 6 1 26

Page 21: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

/* create the Activity data set */

data act (drop= i j);

format _ACTIVITY_ $8. _SUCCESSOR_ $8.;

set arr;

_QTY_ = 1;

i=mod(_n_-1,10)+1;

j=int((_n_-1)/10)+1;

_ACTIVITY_ =

compress('J'||put(j,best.)||'P'

||put(i, best.));

JOB=j;

TASK=i;

if

i LT 10 then _SUCCESSOR_ =

compress('J'||put(j,best.)||'P'||put((i+

1),best.));

else

_SUCCESSOR_ = ' ';

output;

run;

The minimum makespan would be 617—the time it takes to go to Hotspot 1.(finish hotspot 1 job)

Page 22: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*

*proc const

domain=[0,842]

actdata=actdata

schedout=sched_jobshop

dpr=50

restarts=150

showprogress;

schedule finish=842 edgefinder

nf=1 nl=1;

run;

Result: 842 days

Page 24: Dongxu Wu Sining Gu Hong Ouyang - Columbia Universitycs2035/courses/ieor4405.S14/p12.pdf · 1. Alaska 2. Korea Strait 3 Makassar Strait 4 Sunda Strait 5 Malacc a 6 Red Sea, the southe

*