A Comprehensive Modeling of the Discrete and Dynamic Problem of Berth Allocation in Maritime Terminals

: In this study, the discrete and dynamic problem of berth allocation in maritime terminals, is investigated. The suggested resolution method relies on a paradigm of optimization with two techniques: heuristic and multi-agent. Indeed, a set of techniques such as the protocol of negotiation named contract net, the multi-agent interactions, and Worst-Fit arrangement technique, are involved. The main objective of the study is to propose a solution for attributing m parallel machines to a set of activities. The contribution of the study is to provide a detailed modeling of the discrete and dynamic berth allocation problem by establishing the corresponding models using a multi-agent methodology. A set of numerical experiments are detailed to prove the performance of the introduced multi-agent strategy compared with genetic algorithm and tabu search.


Presentation and Motivations for the Berth Allocation
The problem of scheduling ships at berths, called Berth Allocation Problem (BAP), is a problem that consists of assigning the berths to the ships/vessels in maritime terminals, with a specific planning horizon.
Indeed, as shown in Figure 1, a set of vessels are present at the terminal on dates that are known in advance. Precise schedules must be assigned for the attribution of the berths (a problem of assignment) to the vessels (a problem of scheduling) with handling activities. Different constraints/restrictions (which will be detailed in the rest of the paper) should be considered such as the length of the quay and the handling time of the containers makes the berths critical resources and involves wait-time for access into the berth. However, to increase the productivity in maritime ports, reducing berthing costs and waiting time is essential. The dynamic and discrete berth allocation problem (DDBAP) is a real-world practical engineering problem.
For shipowners, the time at the berth is a period without generation of revenue [1]. When assigning berths, we must take into account the space available to accommodate the ship and the future needs of incoming ships. Planning must therefore be carried out over a long enough period to avoid queue.
The main decision made when berthing is the choice of "where" and "when" the ships should birth. Therefore, planning must identify the time and locations for arrivals of ships. The purpose of this planning is to reduce the overall cost, in terms of time, of the berth, knowing the estimated time of arrival, and the duration of operations that represent the temporal aspect of the problem. The problem can therefore be modeled in a two-dimensional space.
The quay can be represented by a horizontal line having a predetermined length. The ships can be represented by a rectangle where the rectangle length indicates the length of the ship (with marginal safety spaces) and the rectangle width represents the duration of the handling operation [2]. The set of obtained rectangles must be positioned in the duration of the handling operation [2]. The set of obtained rectangles must be positioned in the "decision space" with no overlaps while respecting a set of constraints. As a result, the ship berthing problem becomes a constrained two-dimensional bin packing problem. As shown in Figure 2, the aim of the DDBAP problem is to establish an assignment and a berth allocation that minimizes the overall time of service of all the ships. This service time is the time separating the arrival of the ship on the port to the end of handling activities [3]. On the other hand, there are several other objectives which differ according to the variant and the constraints taken into account during the formulation of the problem.  As shown in Figure 2, the aim of the DDBAP problem is to establish an assignment and a berth allocation that minimizes the overall time of service of all the ships. This service time is the time separating the arrival of the ship on the port to the end of handling activities [3]. On the other hand, there are several other objectives which differ according to the variant and the constraints taken into account during the formulation of the problem.
Electronics 2021, 10, x FOR PEER REVIEW 2 of 18 duration of the handling operation [2]. The set of obtained rectangles must be positioned in the "decision space" with no overlaps while respecting a set of constraints. As a result, the ship berthing problem becomes a constrained two-dimensional bin packing problem. As shown in Figure 2, the aim of the DDBAP problem is to establish an assignment and a berth allocation that minimizes the overall time of service of all the ships. This service time is the time separating the arrival of the ship on the port to the end of handling activities [3]. On the other hand, there are several other objectives which differ according to the variant and the constraints taken into account during the formulation of the problem.   DDBAP belongs to real-world engineering problems. This type of problems is complex and needs intelligent optimization methods to resolve it [4,5]. Indeed, DDBAP is categorized as "NP-Hard" [6] given the complexity of the considered constraints of the berth, which includes several factors and parameters. Even if there is a single berth, the problem will be reduced to the problem of minimizing total execution time (or minimizing other parameters depending on the intended purpose) on one machine.
Indeed, the BAP can be modeled as a 2D cutting stock problem having several constraints to satisfy, such as needed time for handling containers, the waiting time for berthing, the occupation of quay cranes and terminal trucks. This means it is unresolvable using deterministic algorithms and exact solvers such as CPLEX [7]. Besides, unexpected events such as weather conditions, schedule modification, or equipment problems necessitate fast real-time decision-making and may make the problem of berthing more challenging and harder to solve. For these reasons, heuristic and approximative methods and algorithms should be used to resolve complex problems [8] such as the BAP and other terminal problems. In this regard, numerous heuristics were applied to optimize the berthing.
The contributions proposed by this study are as follows: -The discrete and dynamic berth allocation problem is introduced and formulated as an integer linear problem with a set of constraints based on real world assumptions. -An efficient multi-agent system (MAS) is introduced to resolve the introduced DDBAP. The proposed multi-agent modeling is based on Multi-Agent-Systems-Engineering (O-MaSE), a modeling methodology dedicated for agent-based dynamic contexts and systems. O-MaSE relies on a set of specific diagrams which are detailed and explained for the context of the DDBAP. - The proposed multi-agent architecture is implemented and developed. Then, a set of experiments are achieved using the Jade multi-agent platform to assess the behavior of the proposed system with other heuristic methods such as the genetic algorithms.

Related Works
Amultitude of methods are used by several researchers to solve berth planning problem. Among the most widely used methods we cite tabu search, Branch and Bound, genetic algorithms, heuristic, hybrid and evolutionary algorithms, linear programming, and multi-agent systems. Table 1 gives a summary of the most relevant studies resolving the problem of berth planning. Probabilistic optimization based on Dynamic programming and Iterated tabu search.
Minimization of the global weighted flow-time.
Instances from the literature were used to evaluate the algorithms. Obtained results indicate the adaptability of the introduced algorithm to both reactive and proactive phases regarding the needed computation times. Three terminal problems are integrated and simultaneously resolved: the quay crane scheduling problem (QCSP), the quay crane assignment problem (QCAP), and the berth allocation problem (BAP). Real experimental tests were achieved on the terminal of Abu Dhabi.
Minimization of the total penalty cost.
Experimental tests were achieved on a real case in bulk ports, and using additional instances.
Minimization of the global turnaround time of ships. Minimization of the global penalty cost of maintenance of the quay cranes.
Additional constraints are considered, such as the preventive activities of maintenance. Small size and large size instances of the problem are considered.
According to the investigated studies, the BAP is a relevant operation to carefully enhance in maritime ports. However, it raises numerous issues. The most used classification of the BAP in these studies relies on three categories (continuous, discrete, and hybrid) according to the layout of the quay. The continuous BAP assumes that the quay is continuous with no specific positions for the berths. The discrete BAP supposes that the quay is composed of a set of berths where each berth receives one ship at a time. In addition, the investigated studies highlight the most important objectives and constraints to be taken into consideration when establishing the berth allocation schedule. They concern essentially the characteristics of vessels (type, speed, capacity, and compatibility with berths). Besides, it is noticed that the majority of research resolves the berth allocation problem using deterministic algorithms. However, handling the containers in terminals is a dynamic and complex operation with a set of stochastic factors such as delays and accidents. Hence, recent studies begin focusing on new factors such as the incertitude of vessel arrival or the weather condition's influence on the BAP. Moreover, the integration of the BAP with other related problems in the terminal, such as the quay crane and container stocking, remain insufficient. The following is a look at recent studies focusing on combined QCAP and BAP in a dynamic and uncertain context: In [19], the authors introduce a data-driven optimization algorithm to resolve the tactical berth allocation problem (TBAP). The algorithm aims to minimize the cost of berthing. A comparison of the suggested algorithm with other models for different levels of time uncertainty is achieved. However, the scalability of the proposed model is not guaranteed for large-size instances of the TBAP.
The study in [20] suggests combining the problems of vessel sequencing and berth planning. An integer linear model and a column generation algorithm were presented. The latter relies on a set-partitioning concept to compute the lower bound of the solution. The findings of the study highlights the performance of the proposed algorithm compared to different heuristic techniques such as the simulated annealing and the genetic algorithm.
Despite a detailed formulation being given in the study, tests were conducted on a small set (55 vessels and 43 berths). The time of execution is also a drawback of the suggested model (three minutes were necessary to resolve this small-size set).
In [21], there was a combined problem of QCAP and BAP. The aim was to obtain the best berthing positions, time, and quay cranes for a set of waiting vessels with the minimum cost regarding the time of departure of vessels. A K-means based clustering algorithm was used to decompose the uncertainty set into several non-overlapping clusters. The results shows that the introduced system is more efficient than a deterministic approach in handling uncertainties. However, different constraints should be added such as the penalty and capacity constraints.
The study in [22] suggest to simultaneously resolve the quay crane and the tactical berth allocation problems. A linear modeling was presented with different realistic constraints. Then a heuristic model was applied on a problem instance of 10 vessels and 100 berths. The pseudo-code of the algorithm was given. However, additional objectives should be considered such as the degree of berth use, the relocation of containers and the yard occupancy.
Authors in [23] propose a study to resolve the BAP taking into consideration the effect of weather circumstances. The approach used was relied on a two-stage optimizer which identifies the needed handling time then proposes a mixed-integer programming for the problem. For large-size instances of the BAP, a particle swarm optimizer (PSO) and machine learning algorithm were implemented. However, in this study, the BAP is resolved separately from the quay crane and yard assignment problems.
In [24], a real dynamic berth allocation model was implemented in the terminal of Paranaguá in Brazil. Two optimizers were combined: a local search dynamic programming with a genetic algorithm. Then two heuristics were used: an elimination process procedure and a reduced neighborhood for unpromising areas in the search space. The problem complexity was investigated and the behaviors of the genetic and local search were compared with the two heuristics performance on the real data from the Paranaguá terminal. However, small instances for experiments were used.
Authors in [25] introduces a multi-user model in the port of Cartagena in Spain to resolve the BAP by reducing the delays of serving ships. The indicated port was a liquid bulk terminal characterized by a little number of quays. An optimizer was developed to simultaneously enhance the arrival time and the berth assignment. Despite the fact that the study is based on real data and is multi-user, the behavior of the latter is not taken into consideration.
The study in [26] addresses the problem of berth allocation in automotive terminals. Car flow constraints were formulated in terms of traffic fluidity and collision risk in an integer linear model. The aim was to simultaneously enhance the car flow crossing effect and the overall handling time. A Complexity analysis was given. However, there is a non-conformity between the modeling assumptions and those used in the experimental tests. Moreover, important constraints, such as the capacity and positions of storage yards, are not considered in the suggested formulation.
The study in [27] highlights the interest of the used policy for optimizing the berth allocation in multimodal terminals. The proposed approach relied on a learning system which was used to resolve Markov decision problems. However, the suggested system relies only on simulations and the allocation-of-berths problem is not solved simultaneously with the quay cranes one.
In [28], authors investigate the problem of the movement of the truck yard in seaports. The aim was to study how the berth allocation and the container stacking influences the distance traveled by the trucks. The used approach relied on a hybrid tabu and genetic method for simultaneously resolving the container stacking and the berth and yard allocation problems. However, numerous constraints are not considered in this study such as the unloading process which influences the route planning of trucks. Hence, a tradeoff between the processes of loading and unloading can be interesting.

Mathematical Formulation of the DDBAP
The dynamic formulation assumes that ships can arrive at the port before or after the start of the berth assignment process and so we can extend the planning to reach possible horizons. The goal is to minimize berthing and service waiting times. The dynamic problem is formulated as follows: The constraints are as follows: with: i from 1 to I in B is the set of the available berths.  (1) is to minimize the overall time for each ship. The constraints (2), (3), and (6) relate to the assignment of the ship. The constraint (4) guarantees to handle the ships only after its arrival. We assume that Aj, Si, and Cij are integer. Yijk indicates the priority that relates the arrival of the vessel and its handling. To explain that the service is performed only after the arrival, Yijk is defined as the difference of time separating the beginning of the service of the boat j from the time of departure of its predecessor.

O-MaSE Modeling Methodology
There are several studies that are interested in the methodology of analysis and design of MAS. However, there is no standard method because each research group conducts different method withdifferent aspects. Indeed, the Multi-Agent-Systems-Engineering O-MaSE is an object-oriented methodology which aims to design a society of agents relying on an organizational meta-model [29]. Being of clear presentation, easy to use and recognized by various works, we propose to follow this methodology and the associated platform AgentTool [30] to design our System.
The development process of this methodology covers the analysis, design, and implementation phase using the AgentTool:

•
The analysis phase: it is made up of the following three stages: -Identify goals: a "goal" is considered as an objective of the system. The goals are structured and organized according to their importance. The O-MaSE methodology contains models such as the model of goals, of roles, of agents, of protocols and of plans. Figure 3 shows the process for developing these diagrams. methodology and the associated platform AgentTool [30] to design our System.
The development process of this methodology covers the analysis, design, and implementation phase using the AgentTool:

•
The analysis phase: it is made up of the following three stages: -Identify goals: a "goal" is considered as an objective of the system. The goals are structured and organized according to their importance.

-
Determine the desired behaviors of the system and describe the exchanged messages.

-
Define roles: each goal is transformed into a role and this role will be played by an agent. The O-MaSE methodology contains models such as the model of goals, of roles, of agents, of protocols and of plans. Figure 3 shows the process for developing these diagrams.

Analysis phase Design phase
Study of needs  We propose the following multi-agent architecture which includes the following agents: the berth agent, the scheduler agent, the ship agent, and the objects (containers). The scheduling agent is the mediator between the berth and ship agents, who communicate with each other to find a solution while respecting the constraints. We propose the following multi-agent architecture which includes the following agents: the berth agent, the scheduler agent, the ship agent, and the objects (containers). The scheduling agent is the mediator between the berth and ship agents, who communicate with each other to find a solution while respecting the constraints.

Analysis Phase
This phase concerns the study of needs, it mainly covers the identification of goals and the definition of roles. We present the models of goals, organization and roles.

Goal Model
It is, as defined on the official AgentTools website [30]; an AND/OR tree of goals. Goals in this tree can have any number of attributes and can have priorities and trigger its relationships. The occurred events may also be added if one goal is triggered from another.
The main purpose of our system is to schedule and assign ships to berths. To achieve this assignment, the system must create and be able to manage vessel and post agents, assist and serve vessels requesting berthing, and seek and provide a berthing position and ultimately build a close-to-optimal solution. Figure 4 shows the goal tree. Goals in this tree can have any number of attributes and can have priorities and trigger its relationships. The occurred events may also be added if one goal is triggered from another.
The main purpose of our system is to schedule and assign ships to berths. To achieve this assignment, the system must create and be able to manage vessel and post agents, assist and serve vessels requesting berthing, and seek and provide a berthing position and ultimately build a close-to-optimal solution. Figure 4 shows the goal tree.
"Goal" 2 Assist / serve ships "Goal" 1 Manage ships and berths agents "Goal" 3 Search for berth "precedes" "precedes" "and" "Goal" 0 Assign ships tp berths According to DeLoach [29], the task of goal refinement is to capture the goal model and its dynamic aspect and to define the goals with a method named Assign Precede Trigger Analysis. We then obtain a Goal Model for Dynamical Systems (GMoDS) refined-version. If goal A should be accomplished before goal B is pursued, then goal A precedes goal B. The new goals are generally produced to satisfy new events. Indeed, goal refinement is employed to capture the constraints between goals, to identify the goals to create and to document the required parameters. After refinement of the goals, we will have the diagram of Figure 5. According to DeLoach [29], the task of goal refinement is to capture the goal model and its dynamic aspect and to define the goals with a method named Assign Precede Trigger Analysis. We then obtain a Goal Model for Dynamical Systems (GMoDS) refined-version. If goal A should be accomplished before goal B is pursued, then goal A precedes goal B. The new goals are generally produced to satisfy new events. Indeed, goal refinement is employed to capture the constraints between goals, to identify the goals to create and to document the required parameters. After refinement of the goals, we will have the diagram of Figure 5.

Organizational Model
The organizational model defines the relationships between roles. According to the same definition of the official AgentTools website [30], the organizational model illustrates the interactions between the external actors and the organization. Organizational models are static and include services, protocols, goals, organizations, and actors. They

Organizational Model
The organizational model defines the relationships between roles. According to the same definition of the official AgentTools website [30], the organizational model illustrates the interactions between the external actors and the organization. Organizational models are static and include services, protocols, goals, organizations, and actors. They have as input the derived GMoDS model. The purpose of this activity is to determine the relationships of the organization (the system) with the external actors, which may be agents, actors, or organizations. To identify the organization interfaces, several classes from external entities may be checked to decide whether the organization should communicate with them. When the organization is a sub-organization of a bigger organization, the communications between the agents in the higher-level organization and the sub-organization identify the initial communications with this secondary organization.
In the case of our system, the interactions are formulated as protocols identified as a set of arrows going from the trigger of the communication to its destination, which can be the system or the external actor. Figure 6 shows our organizational model.

Role-Model
The role-model determines all the roles in the organization and the communications between them and with the external actors. The purpose of role modeling is to assign each sheet goal of the organizational goal template to a predefined role. A simple role is often created for each sheet goal. However, sometimes it is necessary to allow a simple role to achieve more than a goal. Indeed, the designer should also determine the communications between roles and with the external actors. The communications with the external actors may be extracted from the organizational model [29].
The official AgentTools website [30] defines this diagram as a representer of all the organization roles with other goals and with the communication protocols from the organization. The models of roles are therefore static and can include actors, roles, goals, possibilities, services, and protocols; and relationships between the entities include 'require', 'provide' or 'inheritance'. Figure 7 illustrates our role model (protocols between roles are not specified so as not to clutter the diagram).

Role-Model
The role-model determines all the roles in the organization and the communications between them and with the external actors. The purpose of role modeling is to assign each sheet goal of the organizational goal template to a predefined role. A simple role is often created for each sheet goal. However, sometimes it is necessary to allow a simple role to achieve more than a goal. Indeed, the designer should also determine the communications between roles and with the external actors. The communications with the external actors may be extracted from the organizational model [29].
The official AgentTools website [30] defines this diagram as a representer of all the organization roles with other goals and with the communication protocols from the organization. The models of roles are therefore static and can include actors, roles, goals, possibilities, services, and protocols; and relationships between the entities include 'require', 'provide' or 'inheritance'. Figure 7 illustrates our role model (protocols between roles are not specified so as not to clutter the diagram).  The development of the role model uses the organizational model and GMoDS described earlier in the process. The main task then is to determine the roles necessary for the organization and the communications between these actors. These interactions are presented as protocols. Actors in the organizational model must appear as actors in the role model. Thus, protocols between the organization and the actors should link an actor and a specific role in the role model.
Besides, a role is assigned to each "leaf" from the tree of the GMoDS goal. We use the term "achieves" on the roles to indicate the goals achieved by the latter roles. Hence, a role may achieve more than one goal while a specific role is supposed to achieve at least one goal.
At this stage all the roles are defined and the analysis stage is completed. Based on the models determined in the phase of analysis, we approach the second phase of the methodology.

The Design Phase
In this phase, we are interested in the modeling of agents, their internal behavior and their social behavior towards other agents. We present the models of protocol, plan, agent, and many other O-MaSE diagrams.

Agent Behaviors
For our system, we have at least three plans since it has three types of agents. We can also model a plan for each role played by the agent since each role achieves a goal. Figure 8 shows the plan diagram corresponding to the goal "launch a CNP". Figure 9 describes the plan diagram corresponding to the "manage agents" goal. The development of the role model uses the organizational model and GMoDS described earlier in the process. The main task then is to determine the roles necessary for the organization and the communications between these actors. These interactions are presented as protocols. Actors in the organizational model must appear as actors in the role model. Thus, protocols between the organization and the actors should link an actor and a specific role in the role model.
Besides, a role is assigned to each "leaf" from the tree of the GMoDS goal. We use the term "achieves" on the roles to indicate the goals achieved by the latter roles. Hence, a role may achieve more than one goal while a specific role is supposed to achieve at least one goal.
At this stage all the roles are defined and the analysis stage is completed. Based on the models determined in the phase of analysis, we approach the second phase of the methodology.

The Design Phase
In this phase, we are interested in the modeling of agents, their internal behavior and their social behavior towards other agents. We present the models of protocol, plan, agent, and many other O-MaSE diagrams.

Agent Behaviors
For our system, we have at least three plans since it has three types of agents. We can also model a plan for each role played by the agent since each role achieves a goal. Figure 8 shows the plan diagram corresponding to the goal "launch a CNP". Figure 9 describes the plan diagram corresponding to the "manage agents" goal. [I=refuseOffer]^send(I,P), berths   In what follows, we investigate the interactions and communications between the agents of the system. [I=refuseOffer]^send(I,P), berths   In what follows, we investigate the interactions and communications between the agents of the system. In what follows, we investigate the interactions and communications between the agents of the system.

Interactions and Communications between Agents
Interactions and communications between agents are described using protocol models which allow modeling the protocols determined in the model of roles and in the model of agents. The model details are presented in the form of messages exchanged between the external actors and the agents. As defined by the official AgentTools website [30], this model represents the diagrams of protocols as shown in AgentUML. It illustrates the orders of messages sent between organizations, roles, and external actors. It can include iterative and alternative structures of the system.
The purpose of protocol models is to determine the specifications of communication between the roles. The protocols are being indicated in the organization, role, or agent models; hence, we can decide which protocols we will specify. If the protocols of the role model are indicated by the protocol models, the agent having these roles must inherit the protocols. Figure 10 illustrates the protocol diagram representing the interactions between the scheduling agent and the ship agent and shows the roles involved in negotiation.

Interactions and Communications between Agents
Interactions and communications between agents are described using protocol models which allow modeling the protocols determined in the model of roles and in the model of agents. The model details are presented in the form of messages exchanged between the external actors and the agents. As defined by the official AgentTools website [30], this model represents the diagrams of protocols as shown in AgentUML. It illustrates the orders of messages sent between organizations, roles, and external actors. It can include iterative and alternative structures of the system.
The purpose of protocol models is to determine the specifications of communication between the roles. The protocols are being indicated in the organization, role, or agent models; hence, we can decide which protocols we will specify. If the protocols of the role model are indicated by the protocol models, the agent having these roles must inherit the protocols. Figure 10 illustrates the protocol diagram representing the interactions between the scheduling agent and the ship agent and shows the roles involved in negotiation.

Experimental Results
To assess the efficiency of our method, we compare our results with other methods. Figure 11 shows the communications between the different agents of the system.

Experimental Results
To assess the efficiency of our method, we compare our results with other methods. Figure 11 shows the communications between the different agents of the system. In [31], the authors introduce a Branch-and-Bound strategy relying on the computation of upper and lower bound, and a set of dominance criteria. In [32], the authors suggest a simplex and Branch-and-Bound method using the same instances. In our study, we compare our method only with the Dell'Amico results in [31] since their found results surpass those in [32] for all instances. Figure 12 illustrates the obtained results. Electronics 2021, 10, x FOR PEER REVIEW 14 of 18 Figure 11. Messages exchanged between the agents of the proposed multi-agent system.

Obtained Results for Small Size Instances of DellAmico and E. Mokotoff
In [31], the authors introduce a Branch-and-Bound strategy relying on the computation of upper and lower bound, and a set of dominance criteria. In [32], the authors suggest a simplex and Branch-and-Bound method using the same instances. In our study, we compare our method only with the Dell'Amico results in [31] since their found results surpass those in [32] for all instances. Figure 12 illustrates the obtained results. Dell'Amico execution time is better than ours only for the small size instances. This constatation is explained by the fact that the authors in [31] use an exact algorithm (branch and bound) that solves the problem faster than our algorithm. Indeed, we use a heuristic algorithm that needs a lot of messages to be exchanged between the agents which generates an additional execution time for small size problems. However, for large size instances, the results indicate the superiority of our method compared to [31] regarding the execution time. Hence, multi-agent negotiation may be an efficient heuristic method to resolve complex engineering problems. Dell'Amico execution time is better than ours only for the small size instances. This constatation is explained by the fact that the authors in [31] use an exact algorithm (branch and bound) that solves the problem faster than our algorithm. Indeed, we use a heuristic algorithm that needs a lot of messages to be exchanged between the agents which generates an additional execution time for small size problems. However, for large size instances, the results indicate the superiority of our method compared to [31] regarding the execution time. Hence, multi-agent negotiation may be an efficient heuristic method to resolve complex engineering problems. 5.1.2. Obtained Results for Big Size Instances of DellAmico and E. Mokotoff Table 2 illustrates the results of the same studies for a larger number of instances (n ≤ 200 and m ≤ 100). The number of tasks (vessels) is represented by n and M is the number of machines (berths).  In [34], Adriana A. and Celso C.R, they introduce a hybrid tabu search algorithm to solve a problem of the P||Cmax which has, mathematically, the same decision parameters of the berth allocation problem. The aim in both the two problems is to identify a specific set M of tasks (vessels) to assign to specific number n of machines (berths) having a predefined capacity (makespan). As indicated in Table 3, n is set between 10 and 1000 and M is set between 5 and 25. Three intervals of time (Pi:) are used in the experiments (up to one hundred, up to one thousand, and up to ten thousand). Table 3 presents the results after applying different approaches.

Performance Analysis of Genetic Algorithms
The behavior of the genetic algorithm used is assessed by computing the objective value representing the cost of berthing (in terms of handling time) according to the number of generations (Table 4). It is concluded from Table 4 that the performance of the tested genetic algorithm depends on the problem size and the number of generations. It is also noticed that increasing the number of generations to more than 500 has no effect on the quality of the solution due to its convergence.

Conclusions
In this study, we introduced the dynamic and discrete problem of berth allocations. We presented a scheduling solution to this problem. Then we suggested a detailed formulation of this problem including the notation, the constraints, the objective function, and the decision variables. Afterwards, we introduced a detailed modeling of the multi-agent approach proposed to solve the DDBAP, using the O-MaSE methodology by providing the corresponding diagrams. Numerical results show the superiority and effectiveness of our approach compared to other paradigms. As a future directive of our study, the aim is to apply our method on other complex engineering problems such as the deployment of objects on Internet of Things networks [35].
Author Contributions: S.M. and M.A. contributed equally to this article. All authors have read and agreed to the published version of the manuscript.