tanker.doc

advertisement
TANKER SCHEDULING
– AN EXAMPLE ILLUSTRATING THE B&B ALGORITHM
PROBLEM 11.2.1 (in the text)
The instance consists of 3 ships and 12 cargoes to be transported. The schedules for each
ship are shown in Table 1.
Table 1. Ship Schedules
Cargoes
S1 S2 S3 S4 S5
1
2
3
4
5
6
7
8
9
10
11
12
1
1
0
0
1
0
0
0
0
0
0
0
0 0 1
0 0 0
0 1 0
1 1 1
1 0 0
0 0 1
0 0 0
1 0 0
0 1 0
1 0 0
0 0 0
0 0 1
Ship 1
S1 S2 S3 S4 S5
1
0
1
0
0
1
0
0
0
0
0
0
0
1
0
1
0
0
0
1
0
1
0
0
1 0 0
0 0 0
0 0 1
0 1 0
0 0 1
1 0 0
0 1 1
0 1 1
1 0 0
0 0 0
1 1 0
0 0 0
Ship 2
0
0
1
0
0
1
0
1
1
0
0
0
S1 S2 S3 S4 S5
0
0
0
0
0
1
0
0
1
1
0
1
0 0 1
1 0 1
0 0 0
0 0 0
0 1 0
0 0 0
0 0 0
0 0 0
1 1 0
1 0 0
1 1 1
0 1 1
Ship 3
0
1
0
0
1
0
1
0
0
0
0
1
The cost ( c *j ) for transporting a cargo j by a chartered ship is defined in Table 2.
Table 2. Cost c *j
1
1429
2
1323
3
1208
4
512
5
2173
6
2217
7
1775
8
1885
9
2468
10
1928
11
1634
12
741
The incremental cost ( c il ) of operating a company-owned ship i under schedule l versus
keeping i idle over the entire planning horizon, is defined in Table 3.
Table 3. Cost c il
i
l
1
2
3
1
5658
4019
5829
2
5033
6914
5588
3
2722
4693
8284
4
3505
7910
3338
5
3996
6868
4715
1
The profit (  il ), i.e., the amount of money that does not have to be paid on the spot
market, by operating ship i according schedule l is defined in Table 4.
Table 4. Profit  il
i
l
1
-733
1629
1525
1
2
3
2
1465
834
1765
3
1466
1113
-1268
4
1394
-869
1789
5
858
910
1297
ILLUSTRATION OF THE BRANCH-AND-BOUND ALGORITHM
Integer Program
 773 x11  1465 x 12  1466 x31  1394 x 14  858 x51
Maximize  1629 x12  834 x 22  1113 x32  869 x 42  910 x52
 1525 x  1765 x  1268 x  1789 x  1297 x
3
1
3
2
3
3
3
4
(1)
3
5
Subject to:
x11  x14  x51  x 22  x 43  1
(2)
x  x  x  x  x 1
(3)
x  x  x  x 1
(4)
x  x  x  x  x 1
(5)
x11  x12  x 42  x33  x53  1
(6)
x  x  x  x  x 1
(7)
x  x  x 1
(8)
1
1
1
3
1
2
1
4
2
3
2
1
1
5
1
3
1
5
2
4
3
2
2
4
1
4
2
2
3
4
3
5
2
5
2
1
2
5
2
3
3
1
3
5
x  x  x  x  x 1
(9)
x31  x 22  x52  x13  x 23  x33  1
(10)
x  x  x  x 1
x  x  x  x  x 43  1
(11)
x 14  x13  x33  x 43  x53  1
(13)
x  x  x  x  x 1
(14)
x  x  x  x  x 1
(15)
x  x  x  x  x 1
(16)
xil  {0,1}, i  1,2,..,5; l  1,2,3
(17)
1
2
1
2
2
2
1
1
2
1
3
1
2
1
2
1
2
3
1
2
2
2
3
2
2
3
3
1
3
2
1
3
2
3
3
3
2
4
2
5
3
2
3
3
1
4
2
4
3
4
1
5
2
5
3
5
(12)
2
Initial Feasible Solution As An Initial Lower Bound (LB)
Although we can always obtain a feasible solution as a lower bound when the B&B
reaches a leaf node, it would always be a good idea to construct an initial solution serving
as a lower bound. From the performance aspect, the better is the initial solution, the more
effective is the B&B algorithm. Due to this reason, we can use the following heuristic to
construct a feasible initial solution:
Step 1: {Initialization}
Mark all schedules in S1 “un-chosen”.
Step 2: {Choose a schedule s1 of the maximal profit for ship 1}
If there exists a schedule s1 in S1 such that s1 is “un-visited” and it has the larger profit
than those of all other un-visited schedules, then choose s1, mark s1 “visited”, mark all
schedules in S2 “un-visited”, and goto Step 3. Otherwise, goto Step 6.
Step 3: {Choose a schedule s2 for ship 2}
If there exists a schedule s2 in S2 such that s2 is “un-visited” and no cargoes are to be
transported by both ship 1 and ship 2, then choose s2, mark s2 “visited”, mark all
schedules in S3 “un-visited”, and goto Step 4. Otherwise, goto Step 2.
Step 4: {Choose a schedule s3 for ship 3}
If there exists a schedule s3 in S3 such that s3 is “un-visited” and no cargoes are to be
transported by ship 1, ship 2, and ship 3 at the same time, then choose s3, mark s3
“visited”, and goto Step 5. Otherwise, goto Step 3.
Step 5: {Return the solution}
The latest visited schedules s1 s2 s3 is returned as an initial solution.
Step 6: {Return no solution}
The problem instance has no feasible solutions, and return no solution.
The cost of the solution obtained by the above heuristic serves the initial lower bound
(LB) for the branch-and-bound algorithm. At each iteration, a LP relation of the problem
is solved to obtain an upper bound (UB).
According the above heuristic, we have the following initial solution:
x14  x42  x23  1 , all other decision variables are 0. The cost of the initial solution equals
2290 (initial lower bound), that is, LB=2290. Of course, for the purpose of illustrating,
we don’t want the initial solution to be very good so that the B&B terminates very
quickly. In fact, from the following illustration, this lower bound is not good at all.
3
Linear Programming Relaxation As An Upper Bound (UB)
UB  773 x11  1465 x 12  1466 x31  1394 x 14  858 x51
Maximize  1629 x12  834 x 22  1113x32  869 x 42  910 x52
 1525 x  1765 x  1268 x  1789 x  1297 x
3
1
3
2
3
3
3
4
(1’)
3
5
Subject to:
x11  x14  x51  x 22  x 43  1
(2’)
x  x  x  x  x 1
(3’)
x  x  x  x 1
(4’)
x  x  x  x  x 1
(5’)
x11  x12  x 42  x33  x53  1
(6’)
x  x  x  x  x 1
(7’)
x  x  x 1
(8’)
1
1
1
3
1
2
1
4
2
3
2
1
1
5
1
3
1
5
2
4
3
2
2
4
1
4
2
2
3
4
3
5
2
5
2
1
2
5
2
3
3
1
3
5
x  x  x  x  x 1
(9’)
x31  x 22  x52  x13  x 23  x33  1
(10’)
x12  x12  x13  x23  1
x 22  x32  x 23  x33  x 43  1
(11’)
(12’)
x 14  x13  x33  x 43  x53  1
(13’)
x  x  x  x  x 1
(14’)
x  x  x  x  x 1
(15’)
x  x  x  x  x 1
(16’)
0  xil  1, i  1,2,..,5; l  1,2,3
(17’)
1
2
1
1
2
1
3
1
2
1
1
2
2
2
3
2
2
3
1
3
2
3
3
3
2
4
1
4
2
4
3
4
2
5
1
5
2
5
3
5
The First LP Relax Solution
1
x 12  x31  x51  , x11  x 14  0
3
1
x12  x52  , x 22  x32  x 42  0
3
1
2
x13  , x 43  , x 23  x33  x53  0
3
3
UB  3810.33
4
Branch-and-Bound Tree For Solving The Instance
Subproblem 1 (t=1)
x 12  x 31  x 51  1 / 3, x11  x 14  0
x12  x 52  1 / 3, x 22  x 32  x 42  0
x13  1 / 3, x 43  2 / 3, x 23  x 33  x 53  0
UB  3810.33  LB  2290
x12  0
x12  1
Subproblem 2 (t=2)
Subproblem 3 (t=13)
x31  x51  1 / 3, x11  x12  x 14  0
x 12  1, x11  x 31  x 14  x 51  0
x12  x32  x52  1 / 3, x 22  x 42  0
x12  x 22  x 32  x 42  x 52  0
x13  1 / 3, x 43  2 / 3, x 23  x33  x53  0
x 43  1, x13  x 23  x 33  x 53  0
UB  3 6 9 3 LB  2 2 9 0
UB  3254  LB  3255
x31  1
x31  0
Subproblem 4 (t=3)
Candidate solution
Algorithm terminates
Subproblem 5 (t=12)
x51  0 .5, x11  x12  x31  x51  0
x31  1, x11  x12  x14  x51  0
x12  x32  0 .5, x 22  x 42  x52  0
x12  x32  x32  x52  x 42  0
x  x  0 . 5, x  x  x  0
x 43  1, x13  x 23  x 43  x53  0
UB  3 4 5 7  LB  2 2 9 0
UB  3255, LB  3255
3
2
3
4
3
1
3
3
3
5
x51  0
Subproblem 6 (t=4)
x51  1
Candidate solution
LB updated
Subproblem 7 (t=9)
x 14  1 /3 , x11  x12  x31  x51  0
x51  1, x11  x 12  x31  x14  0
x12  x32  x52  1 / 3, x 22  x 42  0
x12  1 / 3, x32  2 / 3, x 22  x 42  x52  0
x  x  x  1 / 3, x  x  0
x 23  x53  1 / 3, x13  x33  x 43  0
UB  3 3 7 5  LB  2 2 9 0
UB  3 1 6 3.6 6 7  LB  3 1 5 9
3
1
x14  0
3
2
3
4
3
3
3
5 1
x4  1
x23  1
x23  0
Subproblem 8 (t=5)
Subproblem 9 (t=8)
x 14  1, x11  x12  x31  x51  0
x11  x12  x31  x14  x51  0
x12  x32  1 / 2, x 22  x 42  x52  0
x12  x 22  x32  x52  x 42  0
x  1, x  x  x  x  0
3
3
3
3
3
x12  0x1  x 4  1 / 2, x2  x3  x5  0x12  1UB  3159 , LB  3159
3
2
3
1
3
3
3
4
3
5
UB  3 0 2 8 LB  2 2 9 0
Candidate solution
LB updated
Subproblem 10 (t=6)
x12  x32  1 / 2, x 22  x 42  x52  0
x53  1 / 2, x 23  x33  x13  x 43  0
UB  2 87 7.5  LB  31 59
UB<LB
This node is deleted
Subproblem 13 (t=11)
x51  1, x11  x 12  x31  x 14  0
x12  x 22  x32  x52  x 42  0
x 23  1, x13  x33  x 43  x53  0
UB  2623 , LB  3159
Candidate solution
LB not updated
Subproblem 11 (t=7)
x11  x 12  x31  x 14  x51  0
x11  x 12  x31  x14  x51  0
x52  1, x12  x 22  x32  x 42  0
x12  1, x 22  x32  x 42  x52  0
x 43  1, x13  x 23  x33  x53  0
x13  x 23  x33  x 43  x53  0
UB  2 699 , LB  2699
UB  1 6 2 9  LB  2 6 9 9
Candidate solution
LB updated
Subproblem 12 (t=10)
x51  1, x11  x12  x31  x14  0
Candidate Solution
LB not updated
In the above tree, we use t to track the order of the node being explored. From the above
figure, the optimal solution is obtained from the subproblem 3 at time point t=13. The
solution states that our best choice would be choosing schedule S2 for ship 1, and
schedule S4 for ship 3, for ship 2, we let it be idle, and the cargoes that are not covered by
5
schedule S2 for ship 1 and schedule S4 for ship 3 are to be transported by chartered ships.
In more detail:
 Cargoes to be transported according to schedule S2 for ship 1: {4, 5, 8, 10}.
 Cargoes to be transported according to schedule S4 for ship 3: {1, 2, 11, 12}.
 Ship 2 is idle.
 Cargoes to be transported by chartered ships: {3, 6, 7, 9}.
LINDO Code For LP
MAX -773X11+1465X12+1466X13+1394X14+858X15
+1629X21+834X22+1113X23-869X24+910X25
+1525X31+1765X32-1268X33+1789X34+1297X35
SUBJECT TO
X11+X14+X15+X22+X34<=1
X11+X21+X32+X34+X35<=1
X13+X15+X24+X25<=1
X12+X13+X14+X21+X23<=1
X11+X12+X24+X33+X35<=1
X14+X15+X22+X25+X31<=1
X23+X24+X35<=1
X12+X21+X23+X24+X25<=1
X13+X22+X25+X31+X32+X33<=1
X12+X21+X31+X32<=1
X23+X22+X23+X32+X33+X34<=1
X14+X31+X33+X34+X35<=1
X11+X12+X13+X14+X15<=1
X21+X22+X23+X24+X25<=1
X31+X32+X33+X34+X35<=1
…
END
6
Download