Combinatorial Optimization Combinatorial Optimization in Container Scheduling in Container Scheduling
Michael PinedoStern School of Business, New York University
with Byung-Cheon Choi, Kangbok Lee (NYU), Joseph Leung (NJIT), Dirk Briskorn (Cologne).
CMMI, Boston, July, 2012
Contents
Preliminary
Scenarios, Examples, and
Equivalent Scheduling Problems
Assumptions / Parameters / Constraints / Objectives
Settings
Motivation
Summary
Future Study
Model
Problems
Conclusion
Results Result 1 / Result 2 / Result 3 / Result 4
Other Objective functions
Motivation
A shipping company has
a number of containers to be delivered from source ports to destination ports
ships that have fixed routing schedules.
with
Which container should be delivered by which ship?
Motivation
Qingdao
Ningbo
Yangshan
New York
Norfolk
Savannah
Busan
Qingdao
201
0-0
3-1
5
201
0-0
3-2
2
201
0-0
3-2
9
201
0-0
4-0
5
201
0-0
4-1
2
201
0-0
4-1
9
201
0-0
4-2
6
201
0-0
5-0
3
201
0-0
5-1
0
http://www.hapag-lloyd.com/en/products_and_services/services_between_asia_and_north_america.html#TPD_east
Service : North/Central China Eastcoast Express (NCE)
Model
Assumptions
Assumptions / Parameters / Constraints / Objectives
Unidirectional route
Ship 1
Ship 2
Ship 3
• There is a sequence of ports• A ship may skip some ports
Port A B C D E F
visitingnon-visiting
1. Unidirectional Route
1. Unidirectional Route
2. Non-Overtaking
Model
Assumptions
Assumptions / Parameters / Constraints / Objectives
2. Non-Overtaking
Non-overtaking
Ports
• Overtaking case Ports
time
• Non-Overtaking example
ship 1
ship 2
time
ship 1ship 2
ship 3
1. Unidirectional Route
2. Non-Overtaking
3. No Transfer
Model
Assumptions
3. No Transfer
Example transfer
• Transfer case
Ship 1
Ship 2
Container
Source port
Destination port
loading
loading unloading
unloading
Transfer
Assumptions / Parameters / Constraints / Objectives
Model
Containers
Assumptions / Parameters / Constraints / ObjectivesContainers Ships
• Release date / Due date rj, dj
• Importance (weight) factor
wj
• Two types of Size (1 or 2)
Twenty-foot Equivalent Unit = 1 TEU
Forty-foot Equivalent Unit (FEU) = 2 TEU
20-ft8 ft
8.6 ft
40-ft8 ft
8.6 ft
sj
• Source port / Destination port
uj, vj
Model
• Number of ships m
• Capacity : ci
Ships
• Predetermined Routing Schedule
Ship i
ti,k
ti,1 ti,2 ti,3 ti,5
: time when ship i visits port k.
port 1 2 3 4 5 6
Assumptions / Parameters / Constraints / ObjectivesContainers Ships
Model
Constraints
Assumptions / Parameters / Constraints / Objectives
•A container can be delivered only by a ship that visits both the source port and destination port of the container.
•A container can be delivered only by a ship that visits the source port of the container at a time after the release date of the container.
•Ship Eligibility Constraints
By source and destination ports
By release dates
• At any time, the total size of containers being loaded at a ship cannot exceed the capacity of the ship.
•Capacity Constraints
Model
• Delivery Time (Dj)
Terminology
• Tardiness (Tj)
The arrival time of the ship at the destination port of the container.
Maximum { 0, Delivery Time – Due date }
•The maximum tardiness
Objectives
•The weighted Delivery Time
•The weighted number of tardy containers•The weighted tardiness
Tmax
wjDj
wjUj
wjTj
Main topic
Assumptions / Parameters / Constraints / Objectives
• Tardy Container (Uj)Uj = 0 if Tj = 0, Uj = 1 if Tj > 0
With a target objective function value T ,
Consider a feasibility problem to find a feasible schedule not violating the modified due date dj + T.
If the answer is Yes, T*max ≤ T .
If the answer is No, T*max > T .
ModelAssumptions / Parameters / Constraints / Objectives
A Feasibility Problem for Tmax
T*max { max{0, Dj – dj} | j = 1, …, n }
= { max{0, ti, – dj} | j = 1, …, n , i = 1, …, m } =
vj
The optimal objective function value
A simple model
•All ships visit all ports following the order of the ports
•All containers have a common source port
•All containers are released at time 0.
Problems An Example / Scenarios
•Each container has a last available ship.
size 1
size 2
ship
capacity
•Containers of each size can be ordered in increasing order of the last available ship
A connectivity problem in a layered graph
Problems An Example / Scenarios
• n1 and n2 represent the number of containers of size 1 and size 2
• h1a and h2
b represent the last available ship for a-th container of size 1 and b-th container of size 2, respectively.
(ai, bi) (ai+1, bi+1)• and are connected to one another if ai ≤ ai+1 and bi ≤ bi+1
(ai, bi)•A node at layer i represents a partial schedule with
ai and bi containers of size 1 and size 2 each are assigned to ships 1, …, i.
if h1a≥ i , h2
b ≥ ii i
and ai + 2bi = ckk=1
i
A connectivity problem in a layered graph
Problems An Example / Scenarios
(0,0)
(c1, 0) (c1-2, 1) (c1-2n2, n2)
(c1+c2, 0) (c1+c2-2, 1) (c1+c2-2n2, n2)
(n1,n2)
(ck-2,1)k=1
m-1 ( ck-2n2, n2)k=1
m-1
layer 0
:
…layer 1
layer 2
layer m-1
layer m
…
…
: ::
(c1+c2-4, 2)
(ck, 0)k=1
m-1
Problems An Example / Scenarios
Category Options Symbols
Arbitrary routes (special case: nested routes)
A (N)
Ship routings Identical routes (all ships visit all ports)
Rou
tin
g I
# of Ports Fixed number of ports (constant)Arbitrary number of ports
Np
Release Date
Source Port
Container Size
Con
tain
er
Zero release dates (all containers are ready)Arbitrary release dates
Common source ports (distribution center)Arbitrary source ports
Unit container size only
Container size of 1 or 2
rj = 0rj
uj = 1uj
sj = 1sj = 1 or 2
Problems
Example:
I , Np | rj=0, uj, sj = 1 or 2 | Tmax
Container Characteristics
Objective FunctionRouting Environment
An Example / Scenarios
rj uj sj
Fixed # of ports Arbitrary # of ports
Identical Arbitrary Identical Arbitrary
0 1 1
0 1 1 or 2
rj1 1
rj1 1 or 2
0 uj1
0 uj1 or 2
rj uj1
rj uj1 or 2
The Computational Complexities
P: polynomial time solvable, NP: NP-hard
Problems
Routing
Con
tain
er P
An Example / Scenarios
ports
Ship 1
0
Ship 2
Ship 3
c1=3
c2=4
c3=2
uj
vj
5 10 15 20
sourceport
destinationport
Container j : (uj, vj) = (8,16)
I , | rj = 0, uj , sj = 1 | Tmax
due daterestriction
Since rj= 0, the first ship is available.
Results Result 1 / Result 2 / Result 3 / Result 4.
Results
Equivalent Problem :
Hierarchical Interval Scheduling with T machine Types: HIS(T)
Job j : fixed starting time (bj) and completion time (ej)Job j of type i : job j can be scheduled on machine with type k for 1 k i.
job j of type 2 with (bj, ej) = (8,16)
time
m/c type 1
0
m/c type 2m/c type 3
m1=3m2=4m3=2
bj ej
5 10 15 20
Example:
Result 1 / Result 2 / Result 3 / Result 4.
Strongly NP-hard for T ≥ 3Kolen et al. 2007. NRL
Results
I , | rj , uj = 1, sj = 1 or 2 | Tmax
1 2 3 m
Capacity
c
12
… Ship
size = 1 or 2
the firstavailable ship
the lastavailable ship
Result 1 / Result 2 / Result 3 / Result 4.
Resource constrained scheduling
Pc | rj , pj = 1, sizej = 1 or 2 | Tmax
1 2 3 m time
Machinec
12
…
Results
Related (and in some way equivalent) Problem:
OPEN Complexity Problem by P. Brucker and A. Krämer. EJOR (1996)P | rj , pj = 1, |{ sizej }| = K | Tmax for constant K
Partial Results on P | rj , pj = 1, sizej = 1 or m | Tmax
O(n4) Philippe Baptiste and Baruch Schieber. J. Scheduling (2003)O(n3) Christoph Dürr and Mathilde Hurand, Algorithmica (2009)
Result 1 / Result 2 / Result 3 / Result 4.
Data Structure
I , | rj , uj = 1, sj = 1 or 2 | Tmax
1 2 3 4
11:4J
11:3J
11:2J
11:1J
12:4J
12:3J
12:2J
13:4J
14:4J
13:3J
5
15:1J
15:2J
15:3J
15:4J
15:5J
1:khJ
The set of containers
of size 1
that are eligible to ships h to k.
ships
Results Result 1 / Result 2 / Result 3 / Result 4.
• n1(n2) : the number of containers of size 1 (size 2).
• m ships with capacity ci
N(i , ai , bi) :
N(0, 0, 0) :
indicates that ai containers of size 1 and
bi containers of size 2
have been assigned to ships 1, 2, …, i.
Solution Structure
single node for the case of i = 0.
N(m, n1, n2) :
single node for the case of i = m.
211
2nncm
ii
Parameters and assumptions
Results Result 1 / Result 2 / Result 3 / Result 4.
Node Feasibility conditions
1 2 3 4 m…
…
…
…
…
11:4J
11:3J
11:2J
11:1J
12:4J
12:3J
12:2J
13:4J
14:4J
13:3J
1:3mmJ
1:2 mmJ
1:1mmJ
1:mmJ
1:1mJ
1:
11
1:
1ih
mihkkih
kih
JnaJ
2:
11
2:
1ih
mihkkih
kih
JnbJ
k
iikk cba
1
2
Results Result 1 / Result 2 / Result 3 / Result 4.
Arc Feasibility conditions
1 2 3 4 m…
…
…
…
…
11:4J
11:3J
11:2J
11:1J
12:4J
12:3J
12:2J
13:4J
14:4J
13:3J
1:3mmJ
1:2 mmJ
1:1mmJ
1:mmJ
1:1mJ
1:
1ih
lihkkl Jaa
N(k , ak , bk) and N(l , al , bl) are connected to each other for k < l,
if
2:
1ih
lihkkl Jbb
k lk+1
Results Result 1 / Result 2 / Result 3 / Result 4
is reduced toI , | rj , uj = 1, sj = 1 or 2 | Tmax
N(0, 0, 0)
N(m, n1, n2)
……
……
……
Layer 0
Layer 1
Layer 2
Layer m1
Layer m
N(m1, am-12, bm-1+1) N(m1, am-1, bm-1) N(m1, am-1+2, bm-11)
N(1, a12, b1+1) N(1, a1, b1) N(1, a1+2, b11)
N(2, a22, b2+1) N(2, a2, b2) N(2, a2+2, b21)…
the problem of finding a (m + 1)-clique in an (m + 1)-layered graph.
N(0, 0, 0)
N(m, n1, n2)
……
……
……
Layer 0
Layer 1
Layer 2
Layer m1
Layer m
N(m1, am-12, bm-1+1) N(m1, am-1, bm-1) N(m1, am-1+2, bm-11)
N(1, a12, b1+1) N(1, a1, b1) N(1, a1+2, b11)
N(2, a22, b2+1) N(2, a2, b2) N(2, a2+2, b21)…
Results Result 1 / Result 2 / Result 3 / Result 4.
I , | rj , uj = 1, sj = 1 or 2 | Tmax can be solved in O( (mn2 + m3n) log mn ) time.
Results Result 1 / Result 2 / Result 3 / Result 4.
Additionally, we proved that
• There is a clique with size (m+1) there exists a feasible schedule.
There exist a polynomial time algorithm to construct a feasible schedule with a given (m+1) clique in (n+m2) time.
Trivial.
• There exists an algorithm to find a (m+1)-clique in polynomial time if
it exists.
In general, to find a k-clique in a k-layered graph is NP-complete.
However, based on a special property of the graph, we can find a (m+1)-clique in O(mn2 + m3n)time.
For, the binary search on the target objective function value takes time of O( log mn ).
Additional assumptions• m is enough large to load all containers by MS rule.
• All ships have the same capacity c, i.e. ci = c for i = 1, …, m.
• The inter-departure times between consecutive ships at port l = , i.e. ti,l = t1,l + (i-1) for i = 2, …, m and l = 1, …, Np
Minimum Slack (MS) first priority rule for
I , | rj , uj
= 1, sj = 1 or 2 | Tmax
Results Result 1 / Result 2 / Result 3 / Result 4.
The error bound of MS rule
c
nnm 21 2where min
1
1)()( maxmax
c
mOPTTMST min
capacity
c
time
The optimal schedule
mmin 2
: : : : : : :
(mmin-1)
The schedule by MS rule
capacityc
time
1
1minmin c
mm
: : : : : : :
2
1minm
:
The worst case example of MS rule
size 1
size 2
Results Result 1 / Result 2 / Result 3 / Result 4.
mmin(mmin-1)
rj uj sj
Fixed # of ports Arbitrary # of ports
Identical Arbitrary Identical Arbitrary
0 1 1 P P P P0 1 1 or 2 P P P NP
rj1 1 P P P P
rj1 1 or 2 P OPEN P NP
0 uj1 P P NP NP
0 uj1 or 2 P P NP NP
rj uj1 OPEN OPEN NP NP
rj uj1 or 2 OPEN OPEN NP NP
The Time complexities of the problems (Tmax)
P: polynomial time solvable, NP: NP-hard, OPEN: unknown
Summary for the Maximum Tardiness objective
Results Result 1 / Result 2 / Result 3 / Result 4.
I , | rj = 0, uj = 1, sj = 1 or 2 | wj Dj
with identical inter-departure times
• All inter-departure times are identical.• In an optimal schedule, containers of each size are ordered in non-increasing order of weight. • We can add dummy containers of size 1 with zero weight.
Additional Assumptions & Observation
Results Result 1 / Result 2 / Result 3 / Result 4.
I , | rj = 0, uj = 1, sj = 1 or 2 | wj Dj with identical inter-
departure times(ai, bi)•A node at layer i represents a partial schedule with
ai and bi containers of size 1 and size 2 each being assigned to ships 1, …, i.
k=1
if ai + 2bi = cki
(ai, bi) (ai+1, bi+1)• are connected if ai ≤ ai+1 and bi ≤ bi+1
and its weight is
where wj and vj are weight and destination of j-th container of
size
1
2
1
1
1,1
2
1,1
1i
i
j
i
i
j
b
bjvij
a
ajvij
twtw
Results Result 1 / Result 2 / Result 3 / Result 4.
A Shortest Path Problem : O(mn2)
(0,0)
(c1, 0) (c1-2, 1) (c1-2n2, n2)
(c1+c2, 0) (c1+c2-2, 1) (c1+c2-2n2, n2)
(n1,n2)
(ck-2,1)k=1
m-1 ( ck-2n2, n2)k=1
m-1
layer 0
:
…layer 1
layer 2
layer m-1
layer m
…
…
: ::
(c1+c2-4, 2)
(ck, 0)k=1
m-1
1 2 3 4 5 61 2 3 4 5 6 7 8
Results Result 1 / Result 2 / Result 3 / Result 4.
I , | rj , uj = 1, sj = 1 or 2 | wj Dj with identical inter-departure times
•Order containers in non-increasing order of wj/sj.WSS (Weighted Smallest Size first) rule
1
1
2
2
3
3
4
4
5
5
6
61 2 3 4 5 6 7 8
1
1
2
2
3
4
4
5
5
6
61
2
3
4
5
6
7
8
3 ship
capacity
c
2
3
3
4
4 5
5
6
6
2
3
4
5
6 7
8
1
1
21 ship
capacity
cc-1
Obj. value = A Obj. value = B
OPT WSS
A B
c c+1
= 1 + c 1
≤ ≤
rj uj sj
Fixed # of ports Arbitrary # of ports
Identical Arbitrary Identical Arbitrary
0 1 1 P P P P0 1 1 or 2 P P OPEN, NP
rj1 1 P P P P
rj1 1 or 2 OPEN, OPEN, OPEN, NP
0 uj1 P P NP NP
0 uj1 or 2 P P NP NP
rj uj1 OPEN, OPEN, NP NP
rj uj1 or 2 OPEN, OPEN, NP NP
The Time complexities of the problems ( wjDj)
P : polynomial time solvable, NP: NP-hard, OPEN: unknown : polynomial time solvable for identical weight (wj = 1 ) case : polynomial time solvable for identical inter-departure times case : polynomial time solvable for identical weight and identical inter-departure times case
Summary for Weighted Delivery dates objective
Results Result 1 / Result 2 / Result 3 / Result 4.
I , | rj =0, uj = 1, sj = 1 or 2 | wj Uj with identical inter-departure times
N(i , a1, a2, b1, b2) :
N(1, 0, 0, 0, 0) :
indicates that a1 containers of size 1 and a2 containers of size 2 have been determined to be assigned to ships 1, 2, …, i. or not.
b1, and b2 are current numbers of
containers of size 1 and 2 on ship i, respectively.
Solution Structure
only node for the case of i = 1.
N(m+1, n1, n2, 0, 0) : only node for the case of i = m+1.
•In an optimal schedule, on-time (non-tardy) containers of each size are ordered in non-decreasing order of due date.
Observation
Results Result 1 / Result 2 / Result 3 / Result 4.
I , | rj =0, uj = 1, sj = 1 or 2 | wj Uj with identical inter-departure times
N(i , a1, a2, b1, b2)
N(i , a1+1, a2, b1, b2 )
N(i , a1+1, a2, b1+1, b2
)
N(i , a1, a2+1, b1 , b2 )
N(i , a1, a2+1, b1 , b2+1)
N(i+1, a1, a2, 0, 0 )
Assign (a1+1)th container of size 1
Not assign (a1+1)th container of size 1
Assign (a2+1)th container of size 2
Not assign (a2+1)th container of size 2
Close ship i and open ship i+1
A Shortest Path Problem : O(mn4)
At most
five outgoing arcs
Future Research
• Some open problems of minimizing ( Tmax / wjDj / wjUj / wjTj )• Other objectives: Minimizing shipping cost by selecting ships.
Open Problems
• Worst case analysis or experimental analysis of a simple priority rule • For example : assign containers in the decreasing order of
A simple priority rule
wj
sj T(uj, vj)
Larger weight
Shorter distance
Smaller size
wj
sj T(uj, vj)
T(uj, vj)
uj vj
Ports
Distance from the source port to the destination port
Future Research
• A refrigerator container requires electricity • A ship has a limited space for such containers.
Additional restrictions
• Nested routes case (between identical and arbitrary routes cases)
Other routings
Ship 1Ship 2Ship 3
visiting only important ports
visiting all ports
• Analysis of the performance of algorithms with real data.• Development of efficient algorithms for practical use.
Empirical work