A. Aggregation of identical jobs In the available real life - HAL

Transcription

A. Aggregation of identical jobs In the available real life - HAL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
A. Aggregation of identical jobs
In the available real life test instances, usually, there are identical jobs.
We call two jobs a and b identical if pa = pb , la = lb , αa = αb , βa = βb ,
and n(a) = n(b). In order to decrease the size of the formulation (TIA) we
will aggregate jobs into groups. We partition the set N of jobs into the set
Q = {1, . . . , q} of groups {Gk }k∈Q of identical jobs. In the following theorem,
we show that there exists an optimal schedule, in which the operations of jobs
in the same group alternate.
Theorem 1. There exists an optimal schedule, in which the j th operations
of the jobs in the same group are processed in the same order for all j.
Proof. Consider an optimal schedule S. If it satisfies the condition of the
theorem, we are done.
Otherwise, there should exist a triple hi, k; ji such that Si,j−1 < Sk,j−1 <
Sk,j < Sij (we will call such triples non-alternating). Consider such a triple
hi, k; ji with the maximum possible j.
We now transform schedule S into S 0 by setting
Sij0 0 = Skj 0
17
18
19
20
0
and Sjk
0 = Sij 0
∀j 0 : j ≤ j 0 ≤ n(i) = n(k).
Obviously, S 0 is a feasible schedule (as pi = pk ).
First, we show that the cost F (S 0 ) of schedule S 0 is not bigger than the
cost F (S) of schedule S. Taking into account that δi (x) = δk (x), and setting
= Sij − Skj > 0, we have
F (S) − F (S 0 ) = δ(Sij − Si,j−1 ) + δ(Skj − Sk,j−1 )
|
{z
}
| {z }
=∆i
=∆k
− δ(Skj − Si,j−1 ) − δ(Sij − Sk,j−1 ).
|
|
{z
}
{z
}
=∆i−
21
22
23
24
25
26
=∆k+
As the function δi (x) is convex, ∆k < ∆i − , and ∆k + < ∆i, we have
δi (∆k) + δi (∆i) ≥ δi (∆i − ) + δi (∆k + ), and F (S) ≥ F (S 0 ).
Secondly, we show that number of alternating triples has been increased.
Triple hi, k; ji which was non-alternating in S became alternating in S 0 . It
is easy to see that, if an alternating triple hi, k 0 ; ji, k 0 6= k, (or hi0 , k; ji,
i0 6= i) in S became non-alternating in S 0 , then triple hk, k 0 ; ji (respectively,
1
27
28
29
30
31
32
33
34
35
36
triple hi, i0 ; ji) was non-alternating in S and become alternating in S 0 . The
alternating status of other triples in S 0 stayed the same as in S. So, the
number of alternating triples has been strictly increased in S 0 . Therefore,
repeating the same transformation a finite number of times, we can obtain a
desired schedule without increasing the cost of schedule S.
Using the fact just proved, in the next theorem, we show that the penalty
functions γi for the jobs i in group Gk , k ∈ Q, can be “aggregated” into a
single penalty function θk for the group. Let Gkt = {i ∈ Gk : t ∈ ∆i }.
We renumber the jobs such that, for each k ∈ Q, Gk = {i0k , i0k + 1, . . . , i00k },
¯ k = Hi0 , and
Si0k 0 < Si0k +1,0 < . . . < Si00k . We set H
k
(
!
θk (t) = max αi
X
ni (t) − |Gkt |
i∈Gk
37
38
39
!)
, βi
|Gkt | −
X
ni (t)
.
i∈Gk
Theorem 2. Consider a group Gk , k ∈ Q, of jobs and a schedule
{Si0 , Si1 , . . . , Si,n(i) }i∈Gk , in which the operations of jobs in Gk alternate.
¯k,
Then, for all t ∈ H
X
γi (t) = θk (t).
i∈Gkt
40
¯k,
Proof. To prove the proposition, we need to show that, given t ∈ H
X
ni (t) ≥ |Gkt | ⇔ ni (t) ≥ 1, ∀i ∈ Gkt ,
(1)
i∈Gk
X
ni (t) ≤ |Gkt | ⇔ ni (t) ≤ 1, ∀i ∈ Gkt ,
(2)
i∈Gk
41
42
43
44
45
46
47
48
49
50
The implication “⇐” of (1) is obvious. P
We will now prove the implication
“⇒” (1) by contradiction. Suppose that i∈Gk ni (t) ≥ |Gkt | and there exists
a job i0 ∈ Gkt such that ni0 (t) = 0. Then, there is a job i00 ∈ Gkt such that
ni00 (t) ≥ 2. This means that, in the schedule, between two operations of job
i00 , there is no operation of job i0 and an operation of job i0 starts later than
time t (as i0 ∈ Gkt and ni0 (t) = 0). This contradicts the condition of the
proposition which states that the operations of jobs i0 and i00 alternate.
The implications in (2) can be proved in the same way.
Finally, to find an optimal solution of the problem, we can limit the
search to the set of “alternating” schedules and use the penalty function
2
51
52
53
54
55
56
57
58
59
60
P
P
θk (t) instead of i∈N t∈Hi γi (t). We will now modify the formulation (TIA). Integer variables Xkt , k ∈ Q, t ∈ H, are now equal to the
number of operations of jobs in Gk started before or at time t. Continuous
¯ k , now represents the value θk (t). Here we again
variable Wkt , k ∈ Q, t ∈ H
need to introduce additional variables E in order to compute |Gkt |, k ∈ Q,
t ∈ H. Binary variable Ekst , k ∈ Q, s ∈ {1, . . . , |Qk |}, t ∈ Hk , takes value 1
if and only if |Gkt | ≥ s. Again, we do not need to impose the integrality on
these variables. We now present the aggregated alternative time indexed ILP
formulation. For each k ∈ Q, we set p¯k = pi0k , ¯lk = li0k , α
¯ k = αi0k , β¯k = βi0k ,
0
n
¯ (k) = n(ik ).
P
k∈Q
P
¯k
t∈H
min
XX
Wkt
(3)
¯k
k∈Q t∈H
s.t. Xk,Si0 = i00k − i + 1, ∀k ∈ Q, i ∈ Gk ,
Xk,Si0 −1 = i00k − i, ∀k ∈ Q, i ∈ Gk ,
Xk,t−1 ≤ Xkt , ∀k ∈ Q, t ∈ H \ {0},
Xk,h−¯p = |Qk | · (¯
n(k) + 1), ∀k ∈ Q,
X i
X
Xkt −
Xk,t−¯pk ≤ 1, ∀t ∈ H,
k∈Q
(4)
(5)
(6)
(7)
(8)
k∈Q,
t−¯
pk ≥0
¯ k , t ≥ Si00 ,0 + ¯lk , (9)
Ek1t ≥ Xk,t−¯lk +¯pk − Xk,t−¯lk , ∀k ∈ Q, t ∈ H
k
Ekst ≥ Xk,t−¯lk +¯pk + Xk,t−¯lk + Ek,s−1,t+¯pk − 1,
¯ k , t ≥ Si00 ,0 + ¯lk , (10)
∀k ∈ Q, s ∈ {2, . . . , |Qk |}, t ∈ H
k
Ekst ≤ Ek,s,t−1 ≤ 1,
¯ k , t > Si00 ,0 ,
∀k ∈ Q, s ∈ {1, . . . , |Qk |}, t ∈ H
k


|Qk |
X
¯k,
Wkt ≥ α
¯ k Xkt − Xk,t−¯lk −
Ekst  , ∀k ∈ Q, t ∈ H
(11)
(12)
s=1

Wkt ≥ β¯k 
|Qk |
X

Ekst − Xkt + Xk,t−¯lk  ,
¯k,
∀k ∈ Q, t ∈ H
(13)
s=1
Xkt ∈ Z+ , ∀k ∈ Q, t ∈ H,
(14)
¯
Ekst = 0, ∀k ∈ Q, s ∈ {2, . . . , |Qk |}, t ∈ Hk , t < Si0k +s−1,0 . (15)
3
Instance
n
(n(i); pi , di ; αi , βi )
h
bib2
bib3
3
5
(4; 9,35; 10,10) (4; 9,50; 10,10)
(4; 13,35; 10,10) (4; 9,50; 10,10)
(12; 5,5; 1,1)
(4; 13,50; 10,10)
(4; 13,50; 10,10)
(6; 5,5; 1,1)
150
208
(4;
(4;
(5;
(4;
(4;
(5;
bib5
6
6,50; 2,2)
6,50; 2,2)
6,40; 2,2)
9,50; 1,1)
9,50; 1,1)
9,40; 1,1)
200
Table 1: Data for small instances
71
The constraints (4)-(5) fix the position of the “zero” operations. The
constraints (6) reflect the nature of the variables X. The constraints (7)
state that all operations of jobs in Gk should be processed within the time
horizon. The constraints (8) prevent overlapping. The constraints (9)-(11)
relate the variables X and E. The constraints (12)-(13) are used to compute
P k|
¯
the values of the variables W . Here |Q
s=1 Ekst = |Gkt |, ∀k ∈ Q, t ∈ Hk .
The formulation (3)-(15) has roughly (2q + n)h variables, qh which are
integer, (3q + 2n + 1)h constraints and (10q + 9n)h non-zero coefficients in
the matrix. So, the size of this formulation depends first and foremost on
the length of the time horizon h, then on the number of groups of identical
jobs q, and finally on the number of jobs n.
72
B. Testing small instances
61
62
63
64
65
66
67
68
69
70
75
We have tested the formulations of three small instances whose data is
given in Table 1. These test instances are of the same type as real life
instances but of a reduced size. Results are presented in Table 2.
76
C. Testing random instances
73
74
77
78
79
80
81
82
The random instances were generated using the following procedure. The
time horizon length h, the density d (the relation between the total processing
time of operations and the horizon
length), the number n of jobs and the total
Pn
c.
number of operations o = i=1 n(i) are fixed. Let a = b no c and b = b dh
o
Then, for each job i ≤ n, n(i) and pi are
uniformly
generated
over
[1,
2a]
and
P
[1, 2b] accordingly in such a way that ni=1 pi n(i) = dh. Next, for each job i,
4
Test
bib2(LP)
bib2
GapLB
74.9%
59.0%
bib3(LP)
bib3
56.3%
47.5%
bib5(LP)
bib5
90.5%
85.7%
(TI)
GapU B
647%
Tm
1.3s
>10m
GapLB
45.0%
0%
—
3.4s
>10m
37.6%
0%
25.7%
0.3s
>30m
56.2%
0%
(TIA)
GapU B
0%
Tm
0.3s
17s
Branch-and-price
GapLB GapU B T m
42.3%
9.1s
0%
0%
6m
0%
1.2s
32s
19.7%
0%
0%
1.4s
11m
56.2%
0%
Table 2: Comparison of formulations
83
84
h
c. At last, the “zero” operations are scheduled before time 0
we set li = b n(i)
one just after another in the reverse order:
S10 = −p1 ,
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
Si0 = Si−1,0 − pi , i ∈ [2, . . . , n].
The instances were generated for the next values of the parameters: h ∈
{250, 500}, d ∈ {0.5, 0.75, 1.0}, o ∈ {30, 60, 100, 150}, n ∈ {3, 6, 15, 30}. For
each combination of values {h, d, o, n} satisfying the conditions 3o < dh and
3n < o, 2 instances were created. Therefore, in total, 234 instances were
tested.
The formulation (TI) was not tested. Firstly, because of its poor results
for the three small instances. Secondly, because of the quality of the lower
bound given by the LP relaxation of the formulation (TI). For the generated random instances, it was always less than the lower bound of the LP
relaxation of the formulation (TIA), and on the average the relation between
these two bounds was only 25.7%.
In the following, we present results for the following statistics:
• P — percentage of instances solved within 30 minutes.
• T m — average solution time (if, for some instance, the time limit of
1800 seconds was reached, this time limit is included into statistics).
• Gap — average difference between the best upper bound known and the
best lower bound obtained, in percents from the best solution known
(this statistics takes into account only instances for which an upper
bound is known and the LP relaxation can be solved within the time
limit).
5
0%
9.0s
37s
0%
1.4s
23m
Selection
All instances
h = 250
h = 500
d = 0.5
d = 0.75
d = 1.0
n=3
n=6
n = 15
n = 30
PLP
T mLP GapLP
94.9%
222s 60.0%
100.0%
13s 57.2%
92.6%
315s 61.5%
100.0%
13s 47.6%
100.0%
155s 59.3%
88.6%
363s 69.0%
100.0%
5s 68.2%
100.0%
36s 59.9%
100.0%
403s 50.4%
33.3% 1614s 28.0%
P
26.1%
44.4%
17.9%
71.4%
24.1%
13.3%
45.2%
22.6%
8.3%
0.0%
Tm
1458s
1187s
1578s
772s
1550s
1597s
1104s
1568s
1756s
1800s
Gap
40.4%
26.4%
47.6%
11.9%
37.9%
55.3%
37.4%
41.4%
45.5%
27.6%
Nd
2902
4660
1537
1430
4090
4577
4291
1618
309
1
Table 3: Results for random instances — the formulation (TIA)
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
• N d — average number of nodes in the branch-and-bound or branchand-price tree (only instances for which the LP relaxation can be solved
within the time limit).
The results for the random instances are presented in Tables 3 and 4.
The statistics for the whole set of instances show that the efficiency of both
approaches is roughly the same. The strength of the lower bound given by the
solution of the LP relaxation of the formulation (TIA) is almost the same in
comparison to the lower bound obtained by the column generation procedure
(in average, the relation is 94.2%). This advantage of the column generation
procedure results in slightly smaller gaps on average for the branch-and-price
algorithm. Unfortunately, these gaps remain quite large even after 30 minutes
of the solution time. So, the random instances happened to be harder to solve
than the real life instances.
It can be also seen that instances with longer time horizon or with bigger
operations density d are harder to solve. The impact of the number of jobs
is not so simple. The results show that instances with small number of jobs
are simpler for the formulation (TIA) and harder for the branch-and-price
algorithm. This can be better seen in Table 5 where detailed results for the
statistics TLP , GapLP and Gap are presented. From Table 5 it is clear that
such a dependence of the approach efficiency from the number of jobs comes
from the LP relaxations. The solution of the LP relaxation of the formulation
(TIA) takes much more time for instances with a larger number of jobs. The
contrary takes place when the column generation procedure is concerned.
6
Selection
All instances
h = 250
h = 500
d = 0.5
d = 0.75
d = 1.0
n=3
n=6
n = 15
n = 30
PLP
T mLP GapLP
93.2%
212s 57.2%
97.2%
72s 54.6%
91.4%
274s 58.4%
100.0%
1s 46.5%
100.0%
2s 57.0%
86.7%
422s 63.8%
86.9%
294s 67.5%
94.1%
231s 57.6%
100.0%
96s 47.8%
100.0%
50s 38.7%
P
26.1%
37.5%
21.0%
73.8%
33.7%
12.4%
33.3%
30.6%
14.6%
0.0%
Tm
1385s
1202s
1467s
512s
1321s
1611s
1272s
1313s
1554s
1800s
Gap
Nd
32.4% 802
20.8% 1443
37.9% 499
5.2% 1389
23.3% 1322
48.8% 713
35.7% 965
30.1% 849
31.9% 677
30.3% 268
Table 4: Results for random instances — the branch-and-price algorithm
128
129
130
131
132
The main conclusion of the computational tests on random instances is
that the formulation (TIA) should be used when the number of jobs (or the
number of groups of identical jobs) is small (6 or less). When the number
of jobs is big and each job contains a moderate number of operations, the
branch-and-price algorithm should be preferred.
7
T mLP
0.75
1.0
3s 682s
1s 539s
2s 191s
2s
74s
d=
n=3
n=6
n = 15
n = 30
0.5
.2s
.3s
.6s
-
d=
n=3
n=6
n = 15
n = 30
T mLP
0.5 0.75
1.0
1s
3s
9s
8s
23s
61s
63s 256s 600s
- 1243s 1800s
Branch-and-price
GapLP
0.5 0.75 1.0
56% 70% 77%
45% 58% 65%
21% 46% 56%
- 26% 45%
Formulation (TIA)
GapLP
0.5 0.75 1.0
58% 72% 74%
46% 61% 69%
22% 48% 59%
- 28%
-
0.5
8%
5%
0%
-
1.0
67%
51%
49%
40%
Gap
0.5 0.75 1.0
8% 37% 56%
17% 40% 57%
8% 41% 58%
- 28%
-
Table 5: Detailed results for random instances
8
Gap
0.75
29%
23%
21%
10%