solution, with attribution of all R rules to all the N
ports is only obtained when defining the assignments
until level N.
To avoid the exponential growth of the tree, the
proposed algorithm does not create all the nodes of
the tree. The nodes are created according to some
rules. In each node of the tree, the following
information is stored as:
(1) Rule Identification;
(2) Port Identification;
(3) Unloading and loading number of container
movements from the simulation (Figure 11) and
related to the allocation made in the node;
(4) Partial cost of the solution, i.e., total number
of movements performed until the actual level was
reached.
During the construction process of the solution
tree, the first criterion whether to create or not a
node in the level i, it must be checked whether the
constraints are within their limits. One node will
only be created (assignment of rule r) in level i, if
the constraints (2) to (6) holds. If not then, all the
branches that will be originated from this node are
not going to exist. However, this is not the case for
the representation by rules integrated with
simulation because the rule r always produces a
feasible arrangement for the container ship in port
(level) i.
After going through the test to check whether the
constraints hold, the node will only remain in the
solution tree if it passes in the search width criterion
β. For example, if the search width chosen by the
user is β =2 in each level, only the nodes that
generate the two minor solutions, computed by the
technique of the greedy algorithm, remain in the
tree.
Thus, for β =2, each node will only generate two
branches, and they will be those that the greedy
solution computation produces the lowest cost.
Initially the algorithm is in level one and start
creating nodes (S1.1). The nodes of level 1 are the
seed nodes and one seed node is created for each
rule. In (S1.2), for each node created in (S1.1), it is
assigned a rule of the vector of rules that will be
applied to each port. Following, it is calculated the
unloading and loading number of movements of
each of these nodes.
The greedy best-first search performed in the 2
nd
Step, aims to choose, in the 3
rd
. Step, which nodes of
level i should remain in the tree of feasible solutions
to respect the width of search β. For example, if
β=2, only two nodes will remain in each level.
The creation process of the greedy solution is
similar to the process of the tree of solutions
creation, except that here, in each step, it is chosen
the allocation that generated the best partial solution
of the node, i.e., the nodes with less costs will be
part of the solution. A more complete description of
the Beam Search Method and also the greedy best-
first search could be found in (Ribeiro et al, 2010).
5 RESULTS
To verify the developed Beam Search performance,
15 instances were automatically and randomly
generated to test the developed approach. These
instances are classified according to the number of
ports, the type of transportation the matrix T, and
Container ship dimension. For each instance, it was
generated a transport matrix T which ensures that the
Container ship capacity will not be exceeded for
every port p. In other words, the value given by Eq.
(9) must be lower or equal to R for every port p. It
means, in mathematical terms, that the inequality
(10) holds for every port.
CRT
p
i
N
pj
ij
×≤
∑∑
=+=11
for all p= 1, ..., N (10)
According to (Avriel et al. 1998), it is possible to
generate three types of transportation matrix: 1 -
Mixed, 2 - Long, 3- Short. This classification for the
transportation matrix expresses how long a container
must be taken by the container ship through the
ports. The Short Transportation Matrix indicates the
majority of the containers that will remain for a short
number of ports until the unloading. For the Long
Transportation Matrix, it is expected the greatest
number of containers remaining in the Container
ship along most of the ports. The Mixed is created in
a manner that it mixes Short and Long instances
characteristics. The ship dimension adopt for the
instances presented in this article are D = 5, R = 6, C
= 50. All instances are available at following site:
https://sites.google.com/site/projetonavio/home
In Tables 2 and 3, the column index I
corresponds to instance number, N corresponds to
how many ports the Container ship has to pass
through, the column index M refers to the type of
transportation matrix, NMin refers to lower bound
on the number of movements (the lower bound value
can be obtained by multiplying by two the sum of
T
ij
, which comes from Eq. (10)), FO1 is the total
number of movements performed (Eq. (7)), FO2 is
SOLVING THE 3D CONTAINER SHIP LOADING PLANNING PROBLEM BY REPRESENTATION BY RULES AND
BEAM SEARCH
139