Applying Dynamic Programming To Assembly Line Balancing and Sequencing Problems
Applying Dynamic Programming To Assembly Line Balancing and Sequencing Problems
Applying Dynamic Programming To Assembly Line Balancing and Sequencing Problems
INFORMATICS INSTITUTE
BACHELOR OF COMPUTER SCIENCE
Graduation Thesis
Agradeço minha família por todo o suporte durante a vida acadêmica e, principal-
mente, durante a realização deste trabalho. Nisso, sintam-se especialmente lembrados
meu pai, mãe, avó e namorada. Que o exemplo de Estudante dado por minha mãe e o de
Homem por meu pai sejam cada vez mais bem assimilados e postos em prática por mim.
Conviver com vocês é algo extraordinário e ser como vocês é no mínimo desafiador.
Também agradeço ao ensino de qualidade recebido no Instituto de Informática da
Universidade Federal do Rio Grande Sul. Os professores bons e motivadores serão sem-
pre lembrados por mim. Em especial, agradeço meu orientador pela ajuda e verdadeira
orientação na concepção deste trabalho.
CONTENTS
LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
RESUMO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.1 Structure of this thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 2.1: Graph of an assembly line balancing problem. Inside the nodes, we
have the tasks’ labels. Below each node, the processing time for that
task. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 2.2: Task assignment of one possible solution for SALBP-1 of instance in
Figure 2.1 and cycle time = 10. The vertical axis represents the time
units. From left to right, we show the order the stations should appear
in this assembly line. . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 3.1: Task assignment of one possible solution for BPP-P of instance in
Figure 2.1 and cycle time = 10. The vertical axis represents the time
units. From left to right, we show the order the bins should appear in
this assembly line. . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
LIST OF TABLES
Table 2.1: Results for SALBP-1 grouped by graph - task-based without fathom-
ing rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 2.2: Results for SALBP-1 - task-based loop without fathoming rule. . . . 22
Table 2.3: Results for SALBP-1 grouped by graph - task-based with fathoming
rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 2.4: Results for SALBP-1 - task-based loop with fathoming rule. . . . . . 23
Table 2.5: Results for SALBP-1 grouped by graph - station-based without fath-
oming rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 2.6: Results for SALBP-1 - station-based loop without fathoming rule. . . 24
Table 2.7: Results for SALBP-1 grouped by graph - station-based with fathom-
ing rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 2.8: Results for SALBP-1 - station-based loop with fathoming rule. . . . . 25
Table 2.9: Different SALBP-1 implementations results. . . . . . . . . . . . . . 26
Table 2.10: Number of instances solved in SALBP-1 - comparisson with (Sewell
e Jacobson 2012). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 3.1: Results for BPP-P grouped by graph - task-based without fathoming
rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Table 3.2: Results for BPP-P - task-based loop without fathoming rule. . . . . . 31
Table 3.3: Results for BPP-P grouped by graph - task-based with fathoming rule. 32
Table 3.4: Results for BPP-P - task-based loop with fathoming rule. . . . . . . . 32
Table 3.5: Results for BPP-P grouped by graph - station-based without fathom-
ing rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Table 3.6: Results for BPP-P - station-based loop without fathoming rule. . . . . 33
Table 3.7: Results for BPP-P grouped by graph - station-based with fathoming
rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Table 3.8: Results for BPP-P - station-based loop with fathoming rule. . . . . . 34
Table 3.9: Different BPP-P implementations results. . . . . . . . . . . . . . . . 35
Table 3.10: Number of instances solved in BPP-P - comparison with (Dell’Amico
et al. 2012). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
ABSTRACT
This work presents two dynamic programing algorithms to treat simple assembly line
balancing problem (SALBP) and bin-packing problem with precedence constraints (BPP-
P). While the former has been explored for many years, the latter has been studied only
recently. For BPP-P, our approach is the first to use dynamic programming and we pro-
vide one new optimal answer that was unknown until our algorithm was proposed (from
the instances used in the literature, 2 still remain unsolved). For both variants, our imple-
mentations are able to deal with the small instances commonly used in the literature. In
average, we treat these instances with execution times from miliseconds to few minutes.
We also present, for each algorithm explained, one way to reduce the search space:
an implementation of Jackson Dominance Rule and our approximation of Jackson Maxi-
mally Loaded station principle. The impact of these optimizations is discussed, measured
and compared to the state of the art algorithms.
Remarks are made about important works (from the past and current state of the art
algorithms) and surveys in order to make the interested reader able to find further informa-
tion regarding assembly line balancing problems (specially SALBP and BPP-P variants).
Este trabalho apresenta dois algoritmos de Programação Dinâmica que tratam os pro-
blemas Simple Assembly Line Balancing Problem (SALBP) e Bin-Packing Problem with
Precedence Constraints (BPP-P). Enquanto o primeiro problema já foi longamente explo-
rado, o segundo só foi estudado anteriormente em um único artigo. Para o BPP-P, nossa
abordagem é a primeira a utilizar Programação Dinâmica e nós fornecemos uma nova
solução ótima que, até a publicação de nosso algoritmo, era desconhecida (duas instân-
cias do conjunto de testes consagrado pela literatura ainda continuam sem uma resposta
ótima). Para ambas variações, nossas implementações conseguem lidar com instâncias
pequenas comumente utilizadas na literatura. Em média, tratamos tais instâncias com
tempos de execução que vão de milissegundos até poucos minutos.
Também apresentamos, para cada algoritmo explicado, uma forma de reduzir o es-
paço de busca: uma implementação da regra de corte Jackson Dominance Rule e uma
aproximação do princípio de utilizar estações preenchidas de maneira ótima proposto por
Jackson. Os impactos dessas otimizações são discutidos, medidos e comparados com os
algoritmos do estado-da-arte.
Observações sobre trabalhos importantes (incluindo trabalhos antigos e algortimos
que são o estado-da-arte) e pesquisas são feitas com o intuito de direcionar ao leitor da
área mais informações sobre problemas de balanceamento de linhas de montagem (em
especial, as variantes SALBP e BPP-P).
1 INTRODUCTION
Problems related to assembly lines have been subject of study for many years in fields
like Operations Research, Combinatorial Optimization, Computational Complexity and
Mathematics. In a very simple and not formal manner, we could define such problems as
a set of tasks, each one with a cost information associated, and workstations which can
execute the referred tasks. An assignment of each task to one station is a solution to such
assembly line problem.
Interesting problems arise due to the large number of variations and constraints that
can be applied to this simple description. Using the workstations dimension, we could
think of different station models: parallel stations executing their tasks simultaneously;
a linear flow of stations; stations with different performance depending on which task
is being executed or the skills of the worker which operates the work station. Regard-
ing the tasks dimension, we can mention the presence or not of some kind of order (or
dependence) between tasks.
Towards the optimization subject, the most common variables are: the number of work
stations necessary to execute all tasks; the maximum processing time that can be assigned
to a single workstation (called cycle time); the amount of time that one station executes
no task (idle time).
Due to the combinatorial nature of these problems, besides computing a solution, we
are also interested in strategies to reduce the time necessary to retrieve a solution. The
combination of the above cited points – variations of models, constraints and optimization
subjects – may lead to different ways of treating these problems. Classical and state-of-
the-art algorithms may use branch-and-bound, dynamic programming or a combination
of these techniques (aiming to reduce the amount of time to evaluate partial solutions
and generate the final and optimal answer). Fathoming rules, lower and upper bounds
and different strategies to explore the generated partial solutions may be used in order
to optimize memory usage. Both problems presented here (SALBP-1 and BPP-P) are
NP-hard (see (Scholl e Becker 2006) and (Dell’Amico et al. 2012) for more information
about problems’ complexity).
Our goal in this thesis is to study the use of dynamic programming to solve ALBP.
SALBP-1 and BPP-P variants were used because they represent very simple models of
assembly lines. We focused on the implementation and adaptation of already known
algorithms and dynamic programming models. The analysis of the results also directed us
to explore how the problems’ properties could be used in order to reduce the search space
and, therefore, improve our implementation memory and execution time performance.
For further information regarding ALBP, consider accessing www.assembly-line-
balancing.de. This website provides extensive information about many variations of
ALBP, including important data sets, references and optimal (or best) answers to each
13
instance.
2.1 Motivation
SALBP has been subject of study for many years. We can find publications from the
middle of the 50’s trying to deal with this balancing problem - like (Jackson 1956) - until
state of the art works as (Sewell e Jacobson 2012). Although more complex and inter-
esting variants of ALBP exist, SALBP is a good starting point, since its definitions and
constraints can be easily understood and could be adapted and mapped to more difficult
variants. Moreover, properties observed from SALBP behaviour were the basis for many
heuristics, reduction and fathoming rules, lower and upper bounds computation (used in
branch and bound algorithms), constructing an important framework that can be adapted
and used with less explored task-assignment problems.
SALBP is used here as a means to i) see how ALBP could be solved using purely dy-
namic programming techniques (the mainstream technique nowadays is branch and bound
or a mix of branch and bound and dynamic programming - called branch, bound and re-
member) and ii) see how we could use our implementations from SALBP in BPP-P, an
ALBP with almost no work done before. To the best of our knowledge, the algorithm pro-
posed here is the second to solve exactly this problem, being the first one to use dynamic
programming.
Figure 2.1: Graph of an assembly line balancing problem. Inside the nodes, we have the
tasks’ labels. Below each node, the processing time for that task.
(Scholl e Becker 2006) and (Fleszar e Hindi 2003) that compile important data related to
properties of SALBP and how the classical algorithms were adapted and improved in new
methods for exact and approximate solutions of SALBP.
Finally, the interested reader may look to (Nicosia et al. 2002) where SALBP algo-
rithms are adapted to treat the case where the workstations are not identical.
(
0, S=∅
F (S) = (2.1)
minj∈Q(S) {F (S), F (S − j) + ∆(F (S − j), tj )} otherwise
16
Figure 2.2: Task assignment of one possible solution for SALBP-1 of instance in Figure
2.1 and cycle time = 10. The vertical axis represents the time units. From left to right, we
show the order the stations should appear in this assembly line.
We will present the implementation proposed by (Fleszar e Hindi 2003). The main
difference is that, while the original algorithm encourages using operations over the prece-
dence matrix of the instance graph, this one relies on expanding lists with partial solutions.
The Algorithm 2 assumes that we have a global list L with the current free tasks (in
the same sense as in Subsection 2.4.1). Configurations with the minimum idle time are
obtained as follows:
1. Call GETBESTLOAD(1) (start expanding from the first possible free task);
4. Returning from recursive calls, remove task added at step 2 and update L with
REMOVENEWAVAILABLE;
If we reach the end of L list, we are at the base case: we should evaluate if the idle
time found is better than the current one for this configuration.
Algorithm 2 can be adapted to generate all maximally loaded states. We modify
GETBESTLOAD function, which gives us the Algorithm 3. In summary, the following
situations occur:
1. A new parameter, called m, will store the current max idle value for one recursion
branch. Max idle value is defined as the minimum processing time of the current
excluded tasks.
2. We have an external loop (that does not appear in Algorithm 3) that will call GET-
MAXLOADS, expanding all partial solutions generated at the previous step. List
L is set at this loop and GETMAXLOADS(1, ∞) is called here too. This means
that we are expanding the first element of L and no tasks were already excluded.
The number of steps of this loop indicate how many workstations were used. The
execution stops when we generate one partial solution that have all tasks assigned;
3. GETMAXLOADS will now fill the list Lp with all new maximal loads;
4. The condition to find one maximally loaded configuration is: if none of the already
excluded tasks fit in the last station, we are facing a maximally loaded partial solu-
tion.
The Di sets different from ∅ for the example of Figure 2.1 are
D2 = {1}
D6 = {5}
D8 = {7}
It is important to remark that these two steps take no cycle time information into
consideration. It is sufficient just to know the precedence relationship. The consequence
is that Di can be precomputed and retrieved during the execution of Algorithm 5, which
will effectively prune unnecessary partial solutions.
Function CANREPLACE(t, j) used in Algorithm 5 will deal with item "i could be
perfectly replaced by j (meaning that the cycle time and precedence relationship are not
violated)" defined before. It will return true if:
1. All predecessors of j are already assigned;
2.6 Results
The tests were conducted with a Core i7 930 processor with 12 GiB of memory. The
development environment was: C++ language (together with Boost Libraries and Stan-
dard Template Library), Linux operating system and GCC compiler.
We used a time limit of one hour and also put limits to memory usage: no instance
can generate more than 106 states from one step to the other (column max Lp ). However,
there is no limit to the total number of explored states.
For SALBP-1, we executed our algorithm for 269 well known instances of the lit-
erature. This data set is generated from 25 precedence graphs, varying the cycle time
constraint. For the four possible combinations of feasible set generation procedure and
cut rule (task-/station-based and without/with rule), we present the results grouped by
precedence graph, giving the number of tasks (t), instances (i), number of instances with
optimal answer found without reaching memory limit (s), number of instances with opti-
mal answer found reaching the memory limit (h) and instances where optimal answer is
not found (n). The averages of the following variables are also provided:
diff: absolute difference from the optimal answer;
21
In the following subsections, we present the results in Tables 2.1-2.8 and the remarks
about improvements and differences of each implementation.
Then, Table 2.10 compare the results of those tests with state-of-the-art algorithm in
(Sewell e Jacobson 2012).
Table 2.1: Results for SALBP-1 grouped by graph - task-based without fathoming rule.
graph t i diff max Lp exp. states time(s) alloc(%) s h n
ARC83 83 16 0.00 255418.00 6499481.00 90.80 100.00% 16 0 0
ARC111 111 17 0.00 1000000.00 85925996.00 1719.89 100.00% 0 17 0
BARTHOL2 148 27 N/A 1000000.00 112649293.07 3599.97 81.13% 0 0 27
BARTHOLD 148 8 N/A 1000000.00 115575219.00 3599.91 83.11% 0 0 8
BOWMAN8 8 1 0.00 3.00 15.00 0.00 100.00% 1 0 0
BUXEY 29 7 0.00 164.00 2062.00 0.01 100.00% 7 0 0
GUNTHER 35 7 0.00 152.00 2289.00 0.01 100.00% 7 0 0
HAHN 53 5 0.00 989.00 6489.00 0.05 100.00% 5 0 0
HESKIA 28 6 0.00 38920.00 326601.00 2.41 100.00% 6 0 0
JACKSON 11 6 0.00 9.00 51.00 0.00 100.00% 6 0 0
JAESCHKE 9 5 0.00 4.00 17.00 0.00 100.00% 5 0 0
KILBRID 45 10 0.00 48786.00 626574.00 5.99 100.00% 10 0 0
LUTZ1 32 6 0.00 16.00 244.00 0.00 100.00% 6 0 0
LUTZ2 89 11 0.00 9431.00 122565.00 1.69 100.00% 11 0 0
LUTZ3 89 12 0.00 9431.00 122565.00 1.50 100.00% 12 0 0
MANSOOR 11 3 0.00 8.00 46.00 0.00 100.00% 3 0 0
MERTENS 7 6 0.00 5.00 21.00 0.00 100.00% 6 0 0
MITCHELL 21 6 0.00 26.00 199.00 0.00 100.00% 6 0 0
MUKHERJE 94 13 0.00 1000000.00 56231258.00 1593.43 100.00% 0 13 0
ROSZIEG 25 6 0.00 32.00 299.00 0.00 100.00% 6 0 0
SAWYER30 30 9 0.00 330.00 3995.00 0.02 100.00% 9 0 0
SCHOLL 297 26 N/A 1000000.00 60330039.46 3599.97 24.73% 0 0 26
TONGE70 70 16 0.00 227050.00 2514263.00 31.23 100.00% 16 0 0
WARNECKE 58 16 0.00 72884.00 861122.00 8.85 100.00% 16 0 0
WEE-MAG 75 24 0.04 1000000.00 51078881.00 818.93 100.00% 0 23 1
Table 2.2: Results for SALBP-1 - task-based loop without fathoming rule.
Instances % of total
Solved 154 57.25%
Optimal with heuristic 53 19.70%
Not solved 62 23.05%
23
Table 2.3: Results for SALBP-1 grouped by graph - task-based with fathoming rule.
graph t i diff max Lp exp. states time(s) alloc(%) s h n
ARC83 83 16 0 235655.25 5980416.87 79.52 100% 16 0 0
ARC111 111 17 0 1000000 79662572.82 1466.44 100% 0 17 0
BARTHOL2 148 27 0.11 1000000 129230883.37 3577.54 93.56% 0 8 19
BARTHOLD 148 8 N/A 1000000 121068414.75 3599.95 86.82% 0 0 8
BOWMAN8 8 1 0 3 15 0 100% 1 0 0
BUXEY 29 7 0 139.14 1650 0 100% 7 0 0
GUNTHER 35 7 0 94.71 1301.71 0.00 100% 7 0 0
HAHN 53 5 0 874.8 5607.6 0.04 100% 5 0 0
HESKIA 28 6 0 34018.33 280677.33 1.91 100% 6 0 0
JACKSON 11 6 0 6.16 35.33 0 100% 6 0 0
JAESCHKE 9 5 0 2 11.8 0 100% 5 0 0
KILBRID 45 10 0 48503.2 620010.5 5.638 100% 10 0 0
LUTZ1 32 6 0 14.33 205.33 0 100% 6 0 0
LUTZ2 89 11 0 6132.54 85723.54 1.08 100% 11 0 0
LUTZ3 89 12 0 9161.58 112043.08 1.35 100% 12 0 0
MANSOOR 11 3 0 8 45 0 100% 3 0 0
MERTENS 7 6 0 4.66 19.5 0 100% 6 0 0
MITCHELL 21 6 0 20.33 149.33 0 100% 6 0 0
MUKHERJE 94 13 0 1000000 54739888.69 1430.6 100% 0 13 0
ROSZIEG 25 6 0 26 242 0 100% 6 0 0
SAWYER30 30 9 0 275.33 3310.33 0.01 100% 9 0 0
SCHOLL 297 26 N/A 1000000 64678185.26 3599.95 26.21% 0 0 26
TONGE70 70 16 0 198975.75 2150713.93 25.19 100% 16 0 0
WARNECKE 58 16 0 66217.62 772246.31 7.61 100% 16 0 0
WEE-MAG 75 24 0 1000000 46406823.87 672.60 100% 0 24 0
Table 2.4: Results for SALBP-1 - task-based loop with fathoming rule.
Instances % of total
Solved 154 57.25%
Optimal with heuristic 62 23.05%
Not solved 53 19.70%
24
Table 2.5: Results for SALBP-1 grouped by graph - station-based without fathoming rule.
graph t i diff max Lp exp. states time(s) alloc(%) s h n
ARC83 83 16 0 668452.81 1203141.68 3328.28 59.86% 1 2 13
ARC111 111 17 N/A 268117.94 34035.70 3599.99 28.19% 0 0 17
BARTHOL2 148 27 N/A 442207.74 3709.66 3599.99 7.55% 0 0 27
BARTHOLD 148 8 N/A 575616 575616 3599.91 15.03% 0 0 8
BOWMAN8 8 1 0 4 5 0 100% 1 0 0
BUXEY 29 7 0 171.42 783.42 0 100% 7 0 0
GUNTHER 35 7 0 135.71 472 0 100% 7 0 0
HAHN 53 5 0 104.4 165 0.06 100% 5 0 0
HESKIA 28 6 0 3236.66 4674.83 1.31 100% 6 0 0
JACKSON 11 6 0 6 13.33 0 100% 6 0 0
JAESCHKE 9 5 0 1.8 6 0 100% 5 0 0
KILBRID 45 10 0 43460.7 122123.1 39.38 100% 10 0 0
LUTZ1 32 6 0 18.83 75.5 0 100% 6 0 0
LUTZ2 89 11 0 33513 244827.81 9.00 100% 11 0 0
LUTZ3 89 12 0 30944.75 88664.5 20.79 100% 12 0 0
MANSOOR 11 3 0 5.33 5 0 100% 3 0 0
MERTENS 7 6 0 4.66 8.5 0 100% 6 0 0
MITCHELL 21 6 0 17 27.5 0 100% 6 0 0
MUKHERJE 94 13 N/A 210809.61 211511.76 3599.94 23.56% 0 0 13
ROSZIEG 25 6 0 31 51.16 0 100% 6 0 0
SAWYER30 30 9 0 341.77 1479.66 0.00 100% 9 0 0
SCHOLL 297 26 N/A 244350.88 244350.88 3599.98 6.63% 0 0 26
TONGE70 70 16 0 566189.75 1207735.25 1227.34 100% 16 0 0
WARNECKE 58 16 0 138674.5 814144.31 29.40 100% 16 0 0
WEE-MAG 75 24 0.5 1000000 30503038.87 1294.97 100% 0 15 9
We can also note that most ARC83 instances are not solved, although these instances
have 83 tasks (less than our supposed limit). This is the case where other properties influ-
ence the results (in this case, the precendence relation, as shown in the website referred
in 2.6).
Table 2.6: Results for SALBP-1 - station-based loop without fathoming rule.
Instances % of total
Solved 154 57.25%
Optimal with heuristic 54 20.07%
unsolved 61 22.68%
25
Table 2.7: Results for SALBP-1 grouped by graph - station-based with fathoming rule.
graph t i diff max Lp exp. states time(s) alloc(%) s h n
ARC83 83 16 0.00 701628.38 1646792.75 3336.67 57.76% 1 2 13
ARC111 111 17 N/A 290693.06 338706.82 3599.99 28.93% 0 0 17
BARTHOL2 148 27 N/A 423450.59 130366.15 3599.99 7.33% 0 0 27
BARTHOLD 148 8 N/A 485882.25 485882.25 3599.94 15.29% 0 0 8
BOWMAN8 8 1 0.00 4.00 5.00 0.00 100.00% 1 0 0
BUXEY 29 7 0.00 170.57 776.00 0.00 100.00% 7 0 0
GUNTHER 35 7 0.00 116.00 423.00 0.00 100.00% 7 0 0
HAHN 53 5 0.00 41.80 60.40 0.03 100.00% 5 0 0
HESKIA 28 6 0.00 1651.00 2512.50 0.74 100.00% 6 0 0
JACKSON 11 6 0.00 5.33 11.83 0.00 100.00% 6 0 0
JAESCHKE 9 5 0.00 1.60 5.20 0.00 100.00% 5 0 0
KILBRID 45 10 0.00 27256.90 74938.10 28.71 100.00% 10 0 0
LUTZ1 32 6 0.00 16.00 65.17 0.00 100.00% 6 0 0
LUTZ2 89 11 0.00 28353.73 201037.73 7.70 100.00% 11 0 0
LUTZ3 89 12 0.00 10648.08 29655.83 7.11 100.00% 12 0 0
MANSOOR 11 3 0.00 5.00 5.00 0.00 100.00% 3 0 0
MERTENS 7 6 0.00 4.67 8.50 0.00 100.00% 6 0 0
MITCHELL 21 6 0.00 12.67 24.50 0.00 100.00% 6 0 0
MUKHERJE 94 13 N/A 145378.77 145970.85 3599.93 23.57% 0 0 13
ROSZIEG 25 6 0.00 24.67 44.33 0.00 100.00% 6 0 0
SAWYER30 30 9 0.00 331.44 1431.44 0.01 100.00% 9 0 0
SCHOLL 297 26 N/A 218242.08 218242.08 3599.99 6.50% 0 0 26
TONGE70 70 16 0.00 516153.88 1090615.75 1005.00 100.00% 16 0 0
WARNECKE 58 16 0.00 103443.50 648038.56 18.82 100.00% 16 0 0
WEE-MAG 75 24 0.04 1000000.00 28230963.08 578.47 100.00% 0 23 1
The status of the instances are exactly the same (154 were solved, 62 needed the
heuristic and 53 were not solved). The maximum number of tasks between solved in-
stances is also equal: 89.
Table 2.8: Results for SALBP-1 - station-based loop with fathoming rule.
Instances % of total
Solved 154 57.25%
Optimal with heuristic 54 20.07%
Not solved 61 22.68%
26
Table 2.10: Number of instances solved in SALBP-1 - comparisson with (Sewell e Jacob-
son 2012).
Our algorithm Sewell and Jacobson Our algorithm Sewell and Jacobson
solved 154 269 57.25% 100.00%
unsolved 115 0 42.75% 0.00%
station-based variant.
The best version of the algorithm presented in (Sewell e Jacobson 2012) solves all 269
intances with an average time of 0.43 seconds. Our best implementation is far from this
value. In only 67 instances we have average execution times comparable to them.
27
3.1 Motivation
Until now, BPP-P has recieved little attention. Besides what is proposed here and in
(Dell’Amico et al. 2012), we could find no other related works regarding exact solution
of this problem. Although BPP-P is very close to SALBP and BPP, problems that have
been studied for many years, not even adaptations to treat BPP-P were proposed by other
authors.
As we noticed that algorithms and strategies studied by us for SALBP could be easily
extended to treat BPP-P, we decided to invest efforts in trying to solve and analyzing this
variant of ALBP.
Although theoretical and history purposes may have motivated SALBP studies (as
it can be used as basis for real ALBP), (Dell’Amico et al. 2012) list several practical
situations that could be mapped into BPP-P: a special case of a multiprocessor scheduling
problem with a single resource constraint; strict precedences between parts and its metal
shields in a assembly line case-study from Motorola; dynamic reconfiguration of FPGAs
(Field-Programmable Gate Arrays) when implementing image processing applications,
like JPEG encoding.
The bin packing problem (BPP) is defined by n items with non-negative weight (tj )
that should be allocated to identical bins of capacity c. Bin packing problem with prece-
dence constrains (BPP-P) extends BPP adding a precedence relation somehow different
from the one presented at Section 2.3: P 0 is a strict partial order relation expressed as
i → j (or i < j), meaning that "task i should be executed before task j".
For the same graph of Figure 2.1, and cycle time c = 10, one optimal solution is that
of Figure 3.1. The difference of one workstation (or bin) comes from the strict partial
order relation defined before: second station should be split into two, since task 3 should
not be allocated together with tasks 4 and 6.
28
Figure 3.1: Task assignment of one possible solution for BPP-P of instance in Figure 2.1
and cycle time = 10. The vertical axis represents the time units. From left to right, we
show the order the bins should appear in this assembly line.
(
tj , (tj ≤ C − F (S) mod C) ∧ (preds(j) ∩ A = ∅)
∆(F (S), tj ) =
C − F (S) mod C + tj otherwise
(3.1)
3.6 Results
The same information related to the system configuration, data sets and measurements
provided at Section 2.6 is valid here. (Dell’Amico et al. 2012) proposed to use the same
data set of SALBP-1 and could prove optimality for 266 of the 269 instances. We use
their data as basis and, at the best case, we found the correct answer for 191 instances
(161 of them found without limiting memory usage). Regarding the three instances with-
out solution, we could find one new solution (WARNECKE, cycle time = 62. The best
number of bins is 30). Tables 3.1-3.8 collect the results for each implementation already
explained. Remarks regarding improvements and technical details are given in the fol-
lowing appropriate subsections.
30
Table 3.1: Results for BPP-P grouped by graph - task-based without fathoming rule.
graph t i diff max Lp exp. states time(s) alloc(%) s h n
ARC83 83 16 0.00 1000000.00 45630859.44 787.14 100.00% 0 16 0
ARC111 111 17 1.06 1000000.00 85922549.82 1906.73 100.00% 0 6 11
BARTHOL2 148 27 N/A 1000000.00 82197346.11 3599.98 59.71% 0 0 27
BARTHOLD 148 8 N/A 1000000.00 88492764.13 3599.98 64.27% 0 0 8
BOWMAN8 8 1 0.00 5.00 20.00 0.00 100.00% 1 0 0
BUXEY 29 7 0.00 2435.00 26229.14 0.16 100.00% 7 0 0
GUNTHER 35 7 0.00 2148.29 24854.71 0.17 100.00% 7 0 0
HAHN 53 5 0.00 58762.00 299348.00 3.03 100.00% 5 0 0
HESKIA 28 6 0.17 1000000.00 12542968.83 145.85 100.00% 0 5 1
JACKSON 11 6 0.00 30.50 133.00 0.00 100.00% 1 5 0
JAESCHKE 9 5 0.00 6.80 24.60 0.00 100.00% 5 0 0
KILBRID 45 10 0.00 1000000.00 20317685.90 281.34 100.00% 0 10 0
LUTZ1 32 6 0.00 88.17 1001.17 0.00 100.00% 6 0 0
LUTZ2 89 11 0.00 756335.55 8395843.73 150.20 100.00% 7 4 0
LUTZ3 89 12 0.00 1000000.00 12168979.50 208.26 100.00% 0 12 0
MANSOOR 11 3 0.00 24.00 120.33 0.00 100.00% 3 0 0
MERTENS 7 6 0.00 12.17 39.50 0.00 100.00% 6 0 0
MITCHELL 21 6 0.00 130.50 836.83 0.00 100.00% 6 0 0
MUKHERJE 94 13 1.00 1000000.00 60372147.69 2213.95 100.00% 0 4 9
ROSZIEG 25 6 0.00 237.17 1746.17 0.00 100.00% 6 0 0
SAWYER30 30 9 0.00 6012.67 64074.11 0.43 100.00% 9 0 0
SCHOLL 297 26 N/A 1000000.00 54024362.92 3599.92 21.98% 0 0 26
TONGE70 70 16 0.06 1000000.00 31316595.50 504.95 100.00% 0 15 1
WARNECKE 58 16 0.06 1000000.00 18394216.50 263.53 100.00% 0 16 0
WEE-MAG 75 24 0.04 1000000.00 58149551.88 1110.89 100.00% 0 23 1
Optimal answer is reached in 68.77% (in only 27.51% of them this result is not due to
the memory limit), needing 172.79 seconds, in average. This great number of instances
that face the memory limit is reached because the state saved in memory here differs from
SALBP-1: when dealing with BPP-P in a task-based loop approach, besides from the
already allocated tasks, we need to store which tasks were assigned to the last bin.
For example, imagine state S1 with tasks 1,2,3,4 already assigned. Consider that
tasks 3 and 4 are at the last bin and represent S1 as {{1, 2, 3, 4}, {3, 4}}. We could
construct a state S2 with the same tasks as S1 , but with just task 4 at the last bin
(S2 = {{1, 2, 3, 4}, {4}}). Both S1 and S2 have to be stored and treated apart. This
particular behaviour is due to BPP-P’s definition.
In the cases where we do not provide the optimal answer, in average, we allocate
approximately 83 tasks (graphs BARTHOL2, BARTHOLD and SCHOLL). Between in-
stances solved with no memory limit, the maximum number of allocated tasks is 89. This
range could be considered as the limit to when we give the correct answer and when this
does not happen.
Refer to Table 3.1 to see the results by precedence graph.
31
Table 3.2: Results for BPP-P - task-based loop without fathoming rule.
Instances % of total
Solved 74 27.51%
Optimal with heuristic 111 41.26%
Not solved 84 31.23%
Table 3.3: Results for BPP-P grouped by graph - task-based with fathoming rule.
graph t i diff max Lp exp. states time(s) alloc(%) s h n
ARC83 83 16 0.00 155424.94 1463115.44 21.87 100.00% 15 1 0
ARC111 111 17 0.76 824868.53 34950929.71 717.78 100.00% 4 3 10
BARTHOL2 148 27 N/A 1000000.00 109554788.78 3599.98 79.13% 0 0 27
BARTHOLD 148 8 N/A 1000000.00 122794115.63 3599.98 89.78% 0 0 8
BOWMAN8 8 1 0.00 2.00 11.00 0.00 100.00% 1 0 0
BUXEY 29 7 0.00 207.86 2330.57 0.01 100.00% 7 0 0
GUNTHER 35 7 0.00 30.14 298.71 0.00 100.00% 7 0 0
HAHN 53 5 0.00 27.00 248.60 0.00 100.00% 5 0 0
HESKIA 28 6 0.00 291152.67 2614904.67 21.71 100.00% 6 0 0
JACKSON 11 6 0.00 7.00 36.67 0.00 100.00% 6 0 0
JAESCHKE 9 5 0.00 3.00 15.40 0.00 100.00% 5 0 0
KILBRID 45 10 0.00 1000000.00 12914264.40 150.19 100.00% 0 10 0
LUTZ1 32 6 0.00 6.00 70.83 0.00 100.00% 6 0 0
LUTZ2 89 11 0.00 22108.64 178332.27 2.65 100.00% 11 0 0
LUTZ3 89 12 0.00 2482.25 11608.00 0.15 100.00% 12 0 0
MANSOOR 11 3 0.00 5.00 34.33 0.00 100.00% 3 0 0
MERTENS 7 6 0.00 6.50 22.33 0.00 100.00% 6 0 0
MITCHELL 21 6 0.00 6.17 45.33 0.00 100.00% 6 0 0
MUKHERJE 94 13 0.92 1000000.00 48546920.31 1510.83 100.00% 0 4 9
ROSZIEG 25 6 0.00 7.83 62.33 0.00 100.00% 6 0 0
SAWYER30 30 9 0.00 444.44 4884.67 0.03 100.00% 9 0 0
SCHOLL 297 26 N/A 1000000.00 59539219.73 3599.95 24.46% 0 0 26
TONGE70 70 16 0.00 14065.19 158943.38 1.76 100.00% 16 0 0
WARNECKE 58 16 0.06 1000000.00 15972212.25 207.49 100.00% 0 16 0
WEE-MAG 75 24 0.04 1000000.00 52951168.83 915.59 100.00% 0 23 1
Table 3.4: Results for BPP-P - task-based loop with fathoming rule.
Instances % of total
Solved 131 48.70%
Optimal with heuristic 56 20.82%
Not solved 82 30.48%
33
Table 3.5: Results for BPP-P grouped by graph - station-based without fathoming rule.
graph t i diff max Lp exp. states time(s) alloc(%) s h n
ARC83 83 16 0.00 2729.94 8649.75 0.26 100.00% 16 0 0
ARC111 111 17 0.33 664014.29 6258362.59 1606.47 97.09% 7 4 6
BARTHOL2 148 27 N/A 468673.81 38724.52 3599.99 7.48% 0 0 27
BARTHOLD 148 8 N/A 639573.75 639573.75 3599.95 12.67% 0 0 8
BOWMAN8 8 1 0.00 1.00 4.00 0.00 100.00% 1 0 0
BUXEY 29 7 0.00 56.14 331.86 0.00 100.00% 7 0 0
GUNTHER 35 7 0.00 13.86 80.43 0.00 100.00% 7 0 0
HAHN 53 5 0.00 2.00 33.00 0.00 100.00% 5 0 0
HESKIA 28 6 0.00 108.83 279.00 0.00 100.00% 6 0 0
JACKSON 11 6 0.00 3.50 12.00 0.00 100.00% 6 0 0
JAESCHKE 9 5 0.00 1.60 7.20 0.00 100.00% 5 0 0
KILBRID 45 10 0.00 898.10 1997.10 0.04 100.00% 10 0 0
LUTZ1 32 6 0.00 3.00 44.67 0.00 100.00% 6 0 0
LUTZ2 89 11 0.00 3751.36 32390.91 0.36 100.00% 11 0 0
LUTZ3 89 12 0.00 117.25 226.00 0.00 100.00% 12 0 0
MANSOOR 11 3 0.00 2.67 10.67 0.00 100.00% 3 0 0
MERTENS 7 6 0.00 3.33 8.50 0.00 100.00% 6 0 0
MITCHELL 21 6 0.00 2.00 14.50 0.00 100.00% 6 0 0
MUKHERJE 94 13 N/A 63385.38 64162.23 3599.92 36.01% 0 0 13
ROSZIEG 25 6 0.00 4.00 15.50 0.00 100.00% 6 0 0
SAWYER30 30 9 0.00 113.56 639.56 0.00 100.00% 9 0 0
SCHOLL 297 26 N/A 394398.27 127541.31 3599.96 7.87% 0 0 26
TONGE70 70 16 0.00 1858.69 5850.69 0.12 100.00% 16 0 0
WARNECKE 58 16 0.06 137445.75 840400.63 13.81 100.00% 16 0 0
WEE-MAG 75 24 0.61 1000000.00 31424986.13 1293.12 99.39% 0 10 14
Table 3.6: Results for BPP-P - station-based loop without fathoming rule.
Instances % of total
Solved 161 59.85%
Optimal with heuristic 14 5.20%
Not solved 94 34.94%
34
Table 3.7: Results for BPP-P grouped by graph - station-based with fathoming rule.
graph t i diff max Lp exp. states time(s) alloc(%) s h n
ARC83 83 16 0.00 2052.94 6726.94 0.18 100.00% 16 0 0
ARC111 111 17 0.06 612408.35 5561866.71 963.89 100.00% 7 9 1
BARTHOL2 148 27 N/A 484637.37 487945.37 3599.96 7.73% 0 0 27
BARTHOLD 148 8 N/A 539869.63 539869.63 3599.96 11.57% 0 0 8
BOWMAN8 8 1 0.00 1.00 4.00 0.00 100.00% 1 0 0
BUXEY 29 7 0.00 51.71 305.43 0.00 100.00% 7 0 0
GUNTHER 35 7 0.00 10.71 68.86 0.00 100.00% 7 0 0
HAHN 53 5 0.00 2.00 33.00 0.00 100.00% 5 0 0
HESKIA 28 6 0.00 86.17 222.67 0.01 100.00% 6 0 0
JACKSON 11 6 0.00 2.67 10.83 0.00 100.00% 6 0 0
JAESCHKE 9 5 0.00 1.60 6.40 0.00 100.00% 5 0 0
KILBRID 45 10 0.00 301.80 727.30 0.01 100.00% 10 0 0
LUTZ1 32 6 0.00 3.00 44.67 0.00 100.00% 6 0 0
LUTZ2 89 11 0.00 2730.91 22623.82 0.26 100.00% 11 0 0
LUTZ3 89 12 0.00 22.83 118.17 0.00 100.00% 12 0 0
MANSOOR 11 3 0.00 2.67 10.33 0.00 100.00% 3 0 0
MERTENS 7 6 0.00 3.33 8.50 0.00 100.00% 6 0 0
MITCHELL 21 6 0.00 2.00 14.33 0.00 100.00% 6 0 0
MUKHERJE 94 13 N/A 35096.00 35641.62 3599.99 35.02% 0 0 13
ROSZIEG 25 6 0.00 4.00 15.50 0.00 100.00% 6 0 0
SAWYER30 30 9 0.00 110.11 616.56 0.00 100.00% 9 0 0
SCHOLL 297 26 N/A 445202.50 448014.12 3599.98 8.21% 0 0 26
TONGE70 70 16 0.00 1732.94 5364.50 0.11 100.00% 16 0 0
WARNECKE 58 16 0.06 100461.25 671751.56 11.06 100.00% 16 0 0
WEE-MAG 75 24 0.13 1000000.00 30192088.04 560.58 100.00% 0 21 3
Table 3.8: Results for BPP-P - station-based loop with fathoming rule.
Instances % of total
Solved 161 59.85%
Optimal with heuristic 30 11.15%
Not solved 78 29.00%
35
Table 3.10: Number of instances solved in BPP-P - comparison with (Dell’Amico et al.
2012).
Our algorithm Dell’Amico et al. Our algorithm Dell’Amico et al.
solved 161 266 59.85% 98.88%
unsolved 108 3 40.15% 1.12%
The fathoming rules implemented here have different impact in time and memory
usage. The bigger decrease is due to the task-based prune rule.
In (Dell’Amico et al. 2012), the average time to obtain the optimal solution is 157.20
seconds. In our best algorithm variant, when we obtain the optimal answer, our average
execution time is 73.14 seconds. Although their time is arround the double of ours, we
should observe that their solved instances percentage is much better.
36
4 CONCLUSION
For both ALBP studied, we present two ways to apply dynamic programing model to
them: a task-based version (as shown in (Kao e Queyranne 1982), originaly proposed by
(Lawler 1979)) and our adaptation from (Hoffmann 1963) heuristic (taking in mind the
adaptation available in (Fleszar e Hindi 2003) and following the principle of Maximally
Loaded station observed by (Jackson 1956)). For each strategy, we provide two ways of
pruning the search space: station-based fathoming rule (mainly known as Jackson Dom-
inance Rule (Jackson 1956)) and a rule for the task-based version, which approximates
Jackson’s Maximally Loaded Rule.
Pseudocodes, detailed algorithm explanation and adaptations from SALBP-1 to BPP-
P are given. The results present and measure the impact of each kind of implementation,
giving also a comparison to state of the art algorithm in each variant. For BPP-P problem,
where 3 from 269 instances were still with no optimal solution, we prove a new optimal
answer (WARNECKE, cycle time 62).
As we could see, simply using dynamic programming and one fathoming rule is not
enough to solve large instances of ALBP. Although the rules used here (and better versions
of them) are implemented in state-of-the-art algorithms, definitely other strategies like
pre-processing techniques and lower and upper bounds tests are also very important when
we are trying to reduce the search space.
Regarding future works, the framework to treat ALBP produced here could be ex-
tended and aggregated with other methods and procedures used in ALBP handling, in
order to analyze their possible influence and usage in more complex scenarios. Also other
fathoming rules could be attached to the existing ones, in order to evaluate their impact
on the SALBP-1 and the BPP-P variants.
37
REFERENCES
[Dell’Amico et al. 2012]DELL’AMICO, M.; DÍAZ, J. C. D.; IORI, M. The bin packing
problem with precedence constraints. Operations Research, v. 60, n. 6, p. 1491–1504,
2012.