On the Implementation of Simulation-based on Representation by
Rules Methodology to Plan Port Logistics Operation
Anibal Tavares de Azevedo
a
Applied Science School, University of Campinas, Rua Pedro Zaccaria, 1300, Limeira, Brazil
Keywords: Simulation, Port Logistic Operation, Representation by Rules.
Abstract: This paper proposes a fast and agile methodology that enables easy incorporation of different business rules
for planning port logistics operations. The rules could be embedded in a simplified discrete-event and multi-
agent simulation scheme that clearly shows the impacts of different rules in each part of the port operation.
Furthermore, the developed approach enables an analysis of how operational decisions in one port could
affect subsequent ports.
a
https://orcid.org/0000-0003-1678-7795
1 INTRODUCTION
The introduction of containers into commerce
among countries enabled a higher degree of
efficiency in supply chains. Although, uncoordinated
port operations could lead to congestion or even
worst supply chain disruption, as noted by (Loh and
Thai, 2014): “The increased importance of ports
makes them a vulnerable node as a port-related
disruption can generate domino effect on a network
of supply chains. The vulnerability of ports thus
needs to be addressed to ensure the functionality of
ports and enhance supply chain resilience.”
Furthermore, unpredicted events like Evergreen
blocking Suez Canal could lead to a sudden increase
in demand for port operations. According to
(Leonard, 2021): “That is going to have a big impact
on the already stressed supply chain”.
1.1 Solution and Literature Review
A solution to deal with such kind of unpredicted
events, according to (Cholteeva, 2021), is: “Supply
chains will have to be agile, nimble and flexible to
counter problems like these. Overnight, batch-based
processing and planning simply won’t cut it. Real-
time, fully integrated and digitized supply chains are
needed to reduce the impact of events like these to a
minimum”.
The key concept to avoid uncoordinated port
operations is the ability to fast adapt and react to
unpredicted events considering all parts of the
system (Zavala-Alcívar et al., 2020). Although,
articles in literature integrate only some problems of
container ports: berth allocation and quay crane
scheduling (Bierwirth and Meisel, 2010; Yang et al,
2012); others integrate the allocation of berths and
yard operation planning (Hendriks et al., 2013); and
some integrate empty container allocation in the
yard with vehicle routing (Braekers et al., 2013).
From previous articles, it is possible to see that
integration is limited to propose specific models for
one stage or a combination for a few of them. This
could lead to planning without coordination among
stages and some could behave as bottlenecks for the
container flow through the port.
1.2 Contribution
The solution should encompass, as observed by
(Zeng and Yang, 2009), the following: “Many
complex systems such as manufacturing, supply
chain, and container terminals are too complex to be
modeled analytically. Discrete event simulation has
been a useful tool for evaluating the performance of
such systems. However, simulation can only
evaluate a given design, not provide more
optimization functions. Therefore, the integration of
simulation and optimization is need.".
438
Tavares de Azevedo, A.
On the Implementation of Simulation-based on Representation by Rules Methodology to Plan Port Logistics Operation.
DOI: 10.5220/0010602404380444
In Proceedings of the 11th International Conference on Simulation and Modeling Methodologies, Technologies and Applications (SIMULTECH 2021), pages 438-444
ISBN: 978-989-758-528-9
Copyright
c
2021 by SCITEPRESS Science and Technology Publications, Lda. All rights reserved
In this sense, we developed a methodology to
face random events and fast propose and evaluate a
new set of decisions for all stages of a complex
system like a container port is.
Based on simulation-optimization that employs
representation by Rules for port logistics (Azevedo
et al, 2018; Araújo et al., 2016, Azevedo et al.,
2014) for one or two stages in a port, we created a
general methodology, that could be easily adapted
and employed in all container port stages through
the application of four main steps:
Representation by Rules Methodology
I. Map agents, and their relations through the
system process. Select agents that will be
studied and the areas where they operate;
II. Describe all possible agent operations to
complete a process. For each operation
describe the rules that could be employed;
III. Combine rules into a hybrid simulation based
on discrete event simulation and agent
simulation;
IV. Test a different combination of rules and
identify the one that should be adopted
considering the best performance of the
overall system.
The next sections will describe in detail how to
employ this methodology for a specific part of a
container port operation.
2 THE PROBLEM
The step (I) to employ the Representation by Rules
methodology is to perform an adequate mapping of
the relevant agents and their relations that enable the
port processes.
In a container port, there are three main processes
related to container flow: import flow (IF), export
flow (EF), transshipment, or temporary flow (TF).
Figure 1 identifies the following port agents:
container ship, quay crane, vehicle, yard crane, and
yard storage blocks.
Figure 1: Container port agents and their relations.
Figure 1 also makes clear the relations among
agents through three main processes. One example is
that a quay crane will unload (IF or TF) or load (EF
or TF) a container into a container ship.
Two agents will be selected to illustrate the
methodology application: Container ship and quay
cranes which operate at the berth area and quay area.
2.1 Selection of Agents and Stages
Step (II) consists of the mapping agent’s cooperation
to perform a process. In the context of a container
port, ship unloading and loading operations could be
described as done in Figure 2.
Some process constraints should be observed:
1. The container ship stowage plan: this is a
ship map indicating where each container
will be or is positioned inside a container
ship;
2. Proper scheduling of two or more quay
cranes should consider the movement of
rail-mounted equipment, and keep a
minimum distance to avoid collisions.
Figure 2: Container ship and quay crane cooperation to
unloading and loading cargo process.
2.2 Creation of Agent’s Rules
From Figure 2 it is possible to determine which rules
could be related with agent:
1. Container ship:
1.1. Unloading rules (CUR): determine which
containers should be unloaded. Two
examples are: remove only the containers
whose destination is the current port, or
also remove more containers to reduce the
number of future blocking containers.
1.2. Loading rules (CLR): should determine the
position where a container will be stored.
On the Implementation of Simulation-based on Representation by Rules Methodology to Plan Port Logistics Operation
439
Since containers on a ship are organized in
stacks, depending on the position selected
this could result in more or less blocking
containers. A blocking container hampers a
container that is downwards on the same
stack and should be unloaded.
Figure 3 describes how the ship organizes containers
in stacks. Furthermore, stacks are organized in pairs
of odd bays (for containers of 20
th
feet) or even bays
(for containers of 40
th
feet).
Figure 3: Arrangement of containers in a ship.
Figure 4 details the organization in the 13
th
bay in
terms of rows and columns.
Figure 4: Arrangement of containers in 13
th
bay.
Each square with a number indicates that space is
occupied with a container. The number inside a
square specifies the destination port of a container.
Furthermore, Figure 4 illustrates the container
in position (row, column) = (4, 1), which destination
port is 5, is a blocking container. This occurs
because, once the ship arrives at port 2, this
container should be unloaded to allow the target
container on position (3, 1) to be unloaded.
Once the container ship rules determine which
containers will be moved in each bay, the total
workload per bay will be computed. Then, quay
cranes will employ rules to compute the total time
necessary to perform all operations.
2. Quay cranes:
2.1 Initial position rules (QIR): determine
which position is the more adequate to start
the quay cranes work. No matter is for
unloading, loading, or both operations on
the ship.
2.2 Movement rules (QMR): should observe
physical constraints like one quay crane
could not overpass another one since they
are rail-mounted, and should keep a secure
distance to avoid accidents.
Figure 5 illustrates in detail two quay cranes
allocation in terms of 20’ bays workload.
Figure 5: Initial position of quay cranes 1 and 2.
It is also important to stress that container ship rules
consider the number of containers moved and quay
cranes rules are related to the total time to perform
movements. One manner to merge rules is to employ
a simplified algorithm base on discrete-event
simulation and multi-agent simulation.
2.3 Combining Rules using Simulation
Instead of using a complete simulation framework
that encompasses discrete-event and multi-agent
with a great computational burden, we created an
algorithm that considers the main aspects of both
paradigms with minimal coding. It is also important
to stress that this scheme could be expanded and
generalized for a higher number of agents (ships and
quay cranes) or areas (Yard Area, for example).
Furthermore, the algorithm is a form of a
function in which parameters are the rules that will
be applied for an agent. The algorithm returns the
total time necessary to perform specified operations.
In this case, it means the necessary time to perform
operations to unload and load containers in a ship in
one port.
Another important aspect is that the container
ship is represented by a vector of matrices B whose
element values must be integer numbers
representing the final port destination if space is
occupied by a container, or zero if the space is
empty. This matrix representation encompasses the
ship organization of containers as described in
Figures 3 and 4. The scalar p indicates which port is
the current one. Vector TB indicates which blocking
containers will be unloaded temporarily that will be
SIMULTECH 2021 - 11th International Conference on Simulation and Modeling Methodologies, Technologies and Applications
440
reloaded with containers from the current port from
vector TP. The vector VB is the total workload per
container ship bay that will be used to compute the
total time necessary to perform all unloading or
loading tasks using quay cranes. The vector VB
encompasses the scheme described in Figure 5.
Simulation(B, CUR, CLR, QIR, QMR)
Begin
# Unloading operations.
[B, VB, T] = unloading(B, CUR, p)
Tmov = TotalTime(VB, QIR, QMR)
# Loading operations.
[B, VB, T] = loading(B, CLR, p)
Tmov = Tmov + TotalTime(VB,QIR,QMR)
return Tmov
End
2.4 Testing Combination of Rules
Figure 2 describes each agent operation to ensure
that the unloading and loading cargo processes will
be done. These processes could be related to agent
rules as done in Table 1.
Table 1: Agents, their operations, and related possible
rules.
Agent Operation Rules
Ship Unload CUR1, CUR2
Load CLR1, CLR2
Quay Crane Initial position QR1, QR2
Move
Work
For ships, there are two sets of possible rules:
unloading and loading rules in the sense detailed in
subsection 2.2.
For the cranes, although there are three possible
operations it is possible to create just one set of
rules. This could be done for the following reasons:
A. Quay crane movement is restricted to be
one-directional without losing the
possibility to achieve an optimal solution
(Chen et al., 2014); Furthermore,
movement rules (QMR) described in
subsection 2.2 will be followed;
B. Quay cranes are assumed, without loss of
generality, to be equal and with a
deterministic processing time.
From (A) and (B), the only difference between quay
cranes will be the decision on the initial position of
each quay crane.
Since the set of rules for each operation is
defined, the decision problem could be simplified to
choose the best combination of rules that will
produce the minimal container ship stay time in port.
Tables 2 and 3 give the eight possible combinations
of rules for the set of rules described in Table 1.
Table 2: First four possible combinations of rules.
Combination Unloading Loading Crane
1 CUR1 CLR1 QR1
2 QR2
3 CLR2 QR1
4 QR2
Table 3: Last four possible combinations of rules.
Combination Unloading Loading Crane
5 CUR2 CLR1 QR1
6 QR2
7 CLR2 QR1
8 QR2
Tables 2 and 3 could be summarized in terms of
sequences of numbers as done in Table 4.
Table 4: Summarizing Table 2 and 3 in terms of numbers.
Combination [1, 2, 3, 4, 5, 6, 7, 8, 9]
Unloading [1, 1, 1, 1, 2, 2, 2, 2]
Loading [1, 1, 2, 2, 1, 1, 2, 2]
Crane [1, 2, 1, 2, 1, 2, 1, 2]
One important computational aspect is how to use
combination numbers to determine which rule
should be applied. For this purpose, Equation (1) is
useful.
(math.floor(i/N)) % M + 1 (1)
where: i is an integer number, N is the number of
repetitions of the digit that belongs to the set {1, …,
M}.
From Equation (1) is possible to convert the
numbers on the combination sequence into other
sequences:
I. Unloading sequence: N = 4 and M = 2
will produce: [1, 1, 1, 1, 2, 2, 2, 2];
II. Loading sequence: N = 2 and M = 2
will produce: [1, 1, 2, 2, 1, 1, 2, 2];
III. Crane sequence: N = 1 and M = 2 will
produce: [1, 2, 1, 2, 1, 2, 1, 2].
On the Implementation of Simulation-based on Representation by Rules Methodology to Plan Port Logistics Operation
441
This encoding helps to provide the following
function that translates an integer number (from
combination sequence) into other sequence numbers.
def translateNum2Rules(i,nrules):
nr = len(nrules)
x = [0]*nr
for t in range(0,nr):
N = np.prod(nrules[0:t])
I = (math.floor(s/N)) % nrules[t]+1
x[t] = i
return x
3 SIMULATION EXAMPLE
Consider a simplified version of a ship with an
initial cargo, for didactic purposes, are as shown in
Figure 6.
Figure 6: Simplified container ship.
The combination of rules that will be performed is 1
which means, according to Table 2, CUR1, CLR1,
QR1.
Since the container ship arrived at port 2, it is
necessary to unload all import containers with the
number 2 and ones that are blocking its movement
(CUR1).
Another unloading rule could consider removing
all containers that could be blocking containers as
the container 3 in bay 1 (CUR2).
Observe that the unloading rule will generate the
workload output for quay cranes operation.
To remove containers from the ship two quay
cranes will be employed using the QR1 rule which
initial position in bays will be the one presented in
Figure 7.
Figure 7: Initial position using QR1.
Considering that quay cranes could work in parallel
without a collision and the time necessary to move
one crane to another bay is one workload time, then
the total time to perform unloading operations will
be 5 units of time.
The next step is to plan the spaces on the ship
where export containers will be loaded. Suppose
that the number of containers for each port
destination is as detailed in Table 5.
Table 5: Export containers in port 2.
Destination 3 4 5
# 2 2 1
Additionally, the blocking container, which
destination is port 4, that was moved during
unloading of container 2 in bay 1, are already
counted in Table 5.
The loading rule chosen for the next step is
CLR1 which means start to search for a position in
ship containers with the lowest port destination (3).
The position should avoid producing blocking
containers and begin from the bay with the lowest
number to highest number filling as shown in Figure
8.
Figure 8: Future ship arrangement after loading containers
to port 3.
Now the containers which port destination is 4 will
be distributed along bays, but they turn to be
blocking containers as shown in Figure 9.
Figure 9: Future ship arrangement after loading containers
to port 4.
Finally, the position for the container to port 5 is
also determined.
SIMULTECH 2021 - 11th International Conference on Simulation and Modeling Methodologies, Technologies and Applications
442
Figure 10: Future ship arrangement after loading container
5.
After determining all positions of containers that
will be loaded, the workload per bay is computed
and will be the same as shown in Figure 7. As a
result, the total time to perform loading operations
will be 5 units of time. Another combination of
rules, like one with LR2 which is the reverse of
LR1, could lead to another total stay time value.
The process to choose the best combination is to
evaluate all possible combinations and pick the one
with the lowest total stay time for the ship.
Although, this task could be a computational burden
task for a decision in multiple ports as shown in
Section 4.
4 EXTENDING FOR MULTIPLE
PORTS
Section 3 showed how to evaluate one possible
combination of rules using a simulation that
produced total time to perform operations in one
port.
Additionally, the methodology could be applied
for all ports that a ship will pass during its travel.
Figure 11 explains how to do an integrated
evaluation for more than one port.
Figure 11: Extending the methodology for more than one
port.
Employing the combination of rules 1, as described
in section 3, the container ship arrangement will
change after port 2 as shown in Figure 11.
The extension made in Figure 11 could be
replicated between ports 3 and 4, and ports 4 and 5.
By doing this, it is possible to measure the impact of
chose different rules through several ports.
Although this extension is interesting for a more
detailed evaluation it will bring more complexity to
simulate all combinations of rules as will be shown
in Section 5.
5 MULTI-PORT OPTIMIZATION
PERSPECTIVE
Section 4 showed how to evaluate a solution for
several ports. A general representation that enables
the test of several combinations of rules is shown in
Figure 12.
Figure 12: Using rules for more than one port.
In Figure 12, only the combination of rules 1 was
applied for every port. It is important to stress that
this is one possible combination in 5
8
= 390.625
alternatives of combinations.
Furthermore, as the number of agents and
operations increases, the search for an optimal
combination of rules could be a computational
burden task.
One possibility is to employ flexible methods to
deal with combinatorial problems like metaheuristics
as genetic algorithms, for example (Azevedo et al.,
2014; Azevedo et al. 2018).
6 CONCLUSIONS
We extended the representation by rules approach to
be a methodology to tackle any port process related
to any agent with its corresponding operations.
Furthermore, we illustrated how this approach
could be used to evaluate, for example, the total time
that a container ship will take to perform all
unloading and loading operations through ports.
Ideas of future works are:
It could all be extended to consider more
port agents and their operations in more
stages like the Yard (Zhen et al., 2013) ;
On the Implementation of Simulation-based on Representation by Rules Methodology to Plan Port Logistics Operation
443
The proposed simulation modeling could
be coupled with an optimization tool for a
combinatorial problem on a simulation-
optimization scheme;
An automatic generator of rules could be
created for each operation;
A Monte Carlo approach could be
incorporated to tackle uncertainty on
demand variation.
REFERENCES
Araújo, E. J., Chaves, A. A., Salles, L. L. N., Azevedo, A.
T. (2016). Pareto clustering search applied for 3D
container ship loading plan problem, Expert Systems
with Applications, 44, 50-57.
Azevedo, A. T., Ribeiro, C. M., Sena, G. J., Chaves, A.
A., Salles, L. L. N., Moretti, A. C. (2014). Solving the
3D Container ship loading planning problem by
representation by rules and meta-heuristics,
International Journal of Data Analysis Techniques
and Strategies, 6(3), 228-260.
Azevedo, A. T., Salles L. L. N., Chaves, A. A., Moretti, A.
C. (2018). Solving the 3D stowage planning problem
integrated with the quay crane scheduling problem by
representation by rules and genetic algorithm, Applied
Soft Computing, 65, 495-516.
Bierwirth, C., Meisel, F. (2010), A survey of berth
allocation and quay crane scheduling problems in
container terminals, European Journal of Operational
Research 202 (3), 615 – 627.
Braekers, K., Caris, A., Janssens, G. (2013) Integrated
planning of loaded and empty container movements,
OR Spectrum 35 (2), 457–478.
Chen, J., Leeb, D.-H., Gohc, M., (2014) An effective
mathematical formulation for the unidirectional
cluster-based quay crane scheduling problem,
European Journal of Operational Research, Vol. 232,
No. 1, 198-208.
Cholteeva, Y. (2021). Offshore explainer: The Evergreen
Marine blockage at the Suez Canal, https://www.
offshore-technology.com/features/offshore-explainer-
the-evergreen-marine-blockage-at-the-suez-canal/,
26th, March.
Hendriks, M. P. M., Lefeber, E., Udding, J. T. (2013)
Simultaneous berth allocation and yard planning at
tactical level, OR Spectrum 35 (2), 441–456.
Leonard, M. (2021). Ever Given and the Suez Canal: A
list of affected ships and what delays mean for
shippers, https://www.supplychaindive.com/news/ever-
given-suez-canal-evergreen-blocked-shippers-
cargo/597295/, 21th, March.
Loh, H. S., Thai V. V. (2014). Managing Port-Related
Supply Chain Disruptions: A Conceptual Paper, The
Asian Journal of Shipping and Logistics, 30(1), 97-
116.
Yang, C., Wang, X., Li, Z. (2012) An optimization
approach for coupling problem of berth allocation
problem and quay crane assignment in container
terminal, Computers & Industrial Engineering 63 (1),
243–253.
Zavala-Alcívar, A., Verdecho, M.-J., Alfaro-Saiz, J.-J.
(2020). A Conceptual Framework to Manage
Resilience and Increase Sustainability in the Supply
Chain, Sustainability, 12, 6300, 2071-1050.
Zeng, Q., Yang, Z. (2009) Integrating simulation and
optimization to schedule loading operations in
container terminals, Computers & Operations
Research 36 (6), 1935–1944.
Zhen, L., Jiang, X., Lee, L.H., Chew, E. P. (2013). A
Review on Yard Management in Container Terminals,
Vol.12 No.4, pp. 289-305, Industrial Engineering &
Management Systems, Korean Institute of Industrial
Engineers.
SIMULTECH 2021 - 11th International Conference on Simulation and Modeling Methodologies, Technologies and Applications
444