1. Introduction
The port logistics network plays a strategic role in the global supply chain, directly influencing the productivity and competitiveness of maritime transport. This improvement in efficiency can also contribute to the reduction in CO
2 emissions, a key factor in lowering the ecological footprint of ports [
1,
2,
3,
4,
5]. In this context, reducing operating costs and handling times is crucial for improving terminal efficiency and optimizing vessel management. In particular, optimizing the ships’ stay time in ports requires a thorough analysis of each step of the operational process, taking into account the characteristics of the ships and containers [
5,
6,
7].
With the increasing container flow, stricter competitive demands, larger container ships, rising congestion, and higher operational costs, container terminals must pursue growth and profitability while carefully managing their environmental impact. Achieving this balance requires reducing emissions, optimizing operations, and adopting sustainable practices to stay competitive in a rapidly evolving maritime industry [
4]. In addition, in view, often, of limited terminal space and resources, terminals strive to adapt their traffic to existing resources and improve container fluidity [
1].
In this context, the objective of our research is to evaluate the performance of container terminals, focusing specifically on the management of quayside operations. These operations involve several complex decision-making challenges, including quay crane allocation, berth allocation, and container stowage planning [
1]. Ships arrive at the port on a time-dependent basis and must be efficiently assigned to berths to initiate cargo handling. Key constraints include ship length, quay depth, time windows, vessel priorities, and preferred berthing zones, all of which aim to optimize terminal efficiency by minimizing internal transport distances [
2]. Improving the coordination of these operations not only enhances operational efficiency but also contributes to sustainability goals by reducing the energy consumption of handling equipment and lowering the port’s carbon emissions [
4]. Reducing waiting times at the berths and optimizing quay crane usage minimize fuel consumption from idling ships and unnecessary movements within the terminal, further aligning with environmental and sustainability objectives [
8]. This integrated approach ensures that operational improvements support both economic efficiency and the reduction in the terminal’s environmental footprint [
5].
The discrete allocation of berths presupposes that ships arriving in port comply with the traffic rules laid down by the port authority. Indeed, in this case, all ships must be in port before the start of the handling plan. On the other hand, the continuous allocation of berths assumes that ships can arrive after the start of the schedule, resulting in dead time between two ships assigned to a berth [
3]. Finally, assigning ships to berths requires considering the assignment of quay cranes to ships, which directly influences the ship’s turnaround time.
As a result, authorities are adopting practices that reduce carbon emissions and promote resource efficiency [
7]. The challenge is to reduce berth times and the costs of the various container handling operations [
9]. Adapting to these evolving requirements is no longer optional but essential for maintaining competitiveness and building long-term resilience in a global economy that increasingly values sustainability.
In addition, the interconnected nature of the elements of supply chains in the low-carbon sourcing problem requires a comprehensive approach for modeling and analysis [
6]. Machine learning (ML) algorithms excel at managing such complexity by integrating vast datasets across multiple points in the supply chain, identifying patterns, and optimizing resource allocation. Furthermore, AI is now being used to optimize port logistics and protect the environment [
3,
7,
8]. More specifically, ML makes it possible to extract knowledge from data and base predictions and decisions on that knowledge. Indeed, as the maritime industry undergoes a digital transition, ports and ships are producing enormous volumes of data that present an opportunity to utilize ML techniques for predictive logistics. By leveraging ML algorithms, ports can forecast cargo volumes, optimize vessel arrival schedules, and streamline berth allocation, reducing idle times and fuel consumption. Additionally, predictive maintenance powered by ML helps identify potential equipment failures in advance, minimizing downtime and extending the lifespan of critical assets. Moreover, ML enhances energy management by analyzing consumption patterns and recommending energy-efficient practices, such as optimizing crane operations or automating lighting systems. On the other hand, ML-driven insights promote transparency in supply chains, enabling better tracking of shipments and reducing inefficiencies, which further contributes to sustainability efforts.
Incorporating ML into port logistics not only reduces environmental impact by lowering emissions and resource waste but also boosts operational efficiency, ensuring ports remain competitive in a fast-evolving global trade environment. As these systems become more sophisticated, they will play an even greater role in achieving long-term sustainability goals across the maritime industry.
In this work, we introduce a hybrid approach combining machine learning for predictive analysis and discrete-event simulation to optimize port operations. This approach allows the identification of key factors that can reduce handling costs and shorten the turnaround times of container ships. This methodology is applied to the container terminal at the Port of Algiers, offering practical insights to enhance operational efficiency and sustainability.
The remainder of this paper is organized as follows.
Section 2 consists of a literature review to discuss port performance evaluation using AI and simulation.
Section 3 describes the proposed approach based on ML and simulation. We present a comparative study of the performance of ML algorithms, and we evaluate the operational performance of the container terminal through a simulation system carried out by FlexTerm [
10]. We are able to optimize the system by balancing the workload of the quay cranes, as described in
Section 4. Finally,
Section 5 concludes this paper with potential perspectives.
2. Literature Review
A terminal can be considered as consisting mainly of two parts: the quay area and the storage yard [
8]. Cargo-handling operations take place at the quay area where ship-to-shore (StS) cranes are of course located. The yard is used for the temporary storage of export and import containers. StS cranes start operations as soon as the ship is safely berthed. Internal terminal vehicles transfer containers between the ship and the yard. At all three levels of decision making (strategic, tactical, and operational), optimization and simulation tools have frequently been used to suggest solutions to container terminal issues [
2].
In recent years, there has been a proliferation of statistical models and machine learning algorithms tailored for addressing the diverse challenges encountered in container terminals [
11], such as quayside and yard operations, gate management, and more [
12]. To deal with these, and propose optimal solutions, AI-based optimization algorithms consider various parameters such as capacity, time constraints, costs, and available resources.
Machine learning (ML) concerns the study of algorithms that can gain knowledge from data over time. Without requiring prior data and context knowledge, ML enables information to be extracted from data and educated predictions and decisions to be made, based on what has been learnt [
3,
7,
8,
13,
14]. ML methods can be divided into three categories [
12]: supervised, unsupervised, and reinforcement learning.
Supervised learning algorithms solve tasks using a set of labeled data. The algorithm is trained on a dataset that contains input examples and related outputs (labels) linked to these instances in a supervised learning setting. The goal is to develop an understanding of how to map inputs to outputs, to be able to anticipate the outcome for new, unforeseen inputs. The most common supervised learning algorithms are linear regression, Support Vector Machines (SVMs), decision trees, random forests, k-nearest neighbors (KNNs), naive Bayes, convolutional neural networks (CNNs), long short-term memory (LSTM), Support Vector Regression (SVR), and Bayesian networks.
Unsupervised learning plays a crucial role in exploratory data analysis and the generation of useful information from large quantities of unstructured data. Algorithms are designed to perform tasks such as automatic classification, clustering, anomaly detection, dimensionality reduction, pattern or trend discovery, and data visualization.
Reinforcement learning occurs through iterative interactions between the agent and its environment. The agent selects an action based on its policy, executes it in the environment, observes the resulting state and reward, and then adjusts its policy to improve future performance. The goal is for the agent to ultimately learn how to act in a way that maximizes cumulative long-term rewards.
In the literature, seaport problems have been modeled using a variety of techniques, including the ML method [
9,
11,
14,
15,
16,
17,
18].
To address the berth allocation problem at the port of Colombo, Sri Lanka, an artificial neural network model was proposed, considering crane productivity, number of cranes, and operating delays [
19]. An ensemble methodological framework was outlined, including signal decomposition methodologies and splitting daily forecasting into a group of forecasts for a set of vessels arriving within a specific time window around the expected day [
20]. For vessel-level forecasting, an extreme gradient boosting (XGBoost) machine learning technique is employed, taking into account the temporal characteristics of the vessels. The total number of containers entering and leaving the port each day is then calculated based on the predicted values for all vessels in the dataset. Experimental findings show that the suggested strategy outperforms time-series ARIMA methods by a large margin.
To help businesses make informed investment decisions, a novel hybrid framework that combines deep learning techniques with the particularities of marine transportation was proposed [
21]. Their approach addresses the medium-term forecasting of container throughput. A hyper-heuristic model utilizing deep reinforcement learning was created to solve the container truck routing problem [
22]. Due to the unknowns surrounding crane operating time, weather, crane type, and operator capacity, the authors focused on the uncertainty of service time. The idea is appealing and adaptable to daily operations because it is employed in an online decision-making process. Results indicate a significant improvement over earlier models. ML-based models are increasingly capable of handling combinatorial optimization issues, as underlined [
23]. The authors describe a system that combines an ML algorithm with discrete-event simulation to forecast truck situations throughout the journey and dynamically rearrange appointments for trucks, classed as early or late, using real-time data obtained by smart technologies. The method has been tested in a port terminal in Brazil. By synchronizing arrivals in balanced time windows, the flexible strategy improved truck waiting times at port hinterland by 90.4% over the existing situation while also reducing queue sizes.
An ML-based system was proposed to solve the bulk berth allocation problem [
24]. The system involves coordinating berthing and yard activities to provide optimized service to ships arriving at the terminal. A metaheuristic method called reduced variable neighborhood search was presented to handle the bulk berth allocation problem with tidal constraints [
25]. Using the random forest regressor, the hyper-parameters for the suggested strategy are tuned in the model. This study explains how the proposed methodology can be used in conjunction with the ML strategy for the bulk berth allocation problem. A highly intriguing data-driven technique was developed to anticipate the berthing of cold ironing ships, using a variety of models including artificial neural networks, multiple linear regression, random forests, decision trees, and extreme gradient boosting [
26]. Energy consumption and ship departure time may both be accurately estimated due to the predictive accuracy of this study’s outcome, which is the berthing time.
A deep reinforcement learning network was proposed to analyze truck routes for a specific container transport order, incorporating key factors such as the order’s origin, destination, time window, and due date, among others [
27]. The model can handle high-dimensional states and action spaces because of the method’s deep network structure. The model is trained using artificially created data, based on five container terminals at the Busan New Port (Korea). The outcomes demonstrate that the model is efficient. A model was proposed to compute the energy consumption results of the container transport process in a terminal, from the quayside to the storage area [
28]. To lower the amount of energy required to transport containers, an automated guided vehicle speed control system based on deep reinforcement learning was created. The outcomes demonstrated that the suggested strategy for modifying AGV driving speed saves considerable energy [
28]. A comparative study was carried out with satisfactory results for the proposed approach. Indeed, the results showed that the model is more time-efficient than the Dijkstra algorithm, which is time-window-based. Machine learning models and historical data on ship trajectories were used to address the issue of predicting vessel arrival times at destination ports [
29]. They gave a structured review of the research on the use of ML approaches to manage port terminal challenges.
There are several reasons why we use ML and simulation. Primarily, ML can predict future demand at container terminals. This enables managers to plan resources, optimize manpower, and reduce vessel turnaround times and equipment waiting times. Our main challenge here is to reduce the cargo handling time of containerships at quayside. This involves scheduling container transfer activities from quay to yard, to minimize internal track movement (and consequent atmospheric emissions).
In particular, time spent at quay by each ship on cargo handling operations needs to be reduced as much as possible, especially as this can often lead to queues of other ships at the port entrance. Simulation is used to study ML solutions. ML algorithms provide a medium- to long-term view based on historical data. Uncertainties about how long handling equipment will need to wait, how many containers need to be delivered or picked up, and how long containers will stay in port could nevertheless affect the suggested approach.
Therefore, the simulation’s initial goal is to evaluate both the robustness of the solution discovered by the ML algorithms in a random environment and the general behavior of the container terminal. Simulation-based approaches enable dynamic modeling of the behaviors of the structure under examination with varying constraints and different policies [
30].
However, simulation cannot create an ideal solution on its own; it can only execute models under predetermined settings and parameters. An innovative approach was introduced to address the issue of internal truck sharing between container terminals [
31]. An integer programming model was developed with the objective of minimizing total overflow workloads and transfer costs. Additionally, a simulation-based optimization method was proposed, combining simulation with a genetic algorithm. A model to mimic the scheduling of handling operations in container terminals was proposed [
13]. An intelligent system that combines AI approaches and simulation tools was proposed to assist terminal managers [
32]. The method generates crane programs of the greatest quality by combining an intelligent evolutionary algorithm with a simulation model that considers the unpredictability and effects of internal delivery vehicles. These technologies enable decision makers to assess proposed programs’ quality and dependability more effectively, which leads to better solutions to widespread issues. The second motivation is to give port staff who oversee putting the optimization process results into action a tool to aid in their decision making. With the help of this application, users can evaluate their own schedules and use the information to inform their decisions. As a result, after a simulation, it is feasible to identify flaws in a certain component and draw conclusions on how to improve certain tactical decisions. After making these adjustments, it is possible to run additional simulations to find the most effective setup.
The management of CO2 emissions in port terminals has become a central focus in achieving sustainability objectives, particularly as global trade continues to grow. The studies reviewed demonstrate that machine learning (ML) techniques are increasingly applied to tackling complex decision-making problems in port operations. ML algorithms excel in extracting actionable insights from vast amounts of data, enabling the prediction of critical variables such as ship turnaround times, container flow, and equipment utilization. These capabilities empower decision makers to optimize resource allocation, reduce operational inefficiencies, and ultimately minimize carbon footprints.
However, while ML offers robust predictive capabilities, its integration with simulation techniques is essential to fully understand and enhance the performance of port systems. Simulation models complement ML by providing a dynamic framework for testing and validating operational scenarios under various constraints and uncertainties. This combination enables a holistic evaluation of strategies to balance efficiency with sustainability.
Our approach proposes an innovative integration of machine learning algorithms with simulation to address the operational and strategic challenges of container terminals. The primary objective is to assess the capacity of current resources to efficiently manage container flows by relying on accurate predictions of volumes and operational needs (
Figure 1).
By leveraging the prediction results, our method enables the design and evaluation of various optimization scenarios. These scenarios aim to enhance overall performance at both strategic and operational levels, particularly by balancing resource utilization, reducing vessel waiting times, and minimizing CO2 emissions. This integrated approach provides a clear vision for sustainable terminal management, aligned with environmental objectives while strengthening operational efficiency and stakeholder satisfaction.
3. Approach Description
To forecast port demand, we leverage artificial intelligence (AI) techniques to analyze historical data. This approach enhances the accuracy of operations planning, particularly by predicting container volumes, vessel traffic patterns, and transit times. For instance, machine learning (ML) models can forecast future demand at container terminals [
15,
16]. These forecasts enable managers to better allocate resources, optimize staff performance, and reduce both vessel turnaround times and cargo-handling durations.
In addition to AI-based forecasting, dynamic modeling techniques, such as simulation methodologies, allow for the analysis of business behavior under various constraints and policy alternatives. These simulation models are particularly useful in handling uncertainties related to supply chain fluctuations, variable demand, and unexpected disruptions. However, simulation models operate within predefined parameters and cannot autonomously generate solutions. They are primarily employed to compare potential outcomes and evaluate the impact of different operational strategies in response to unforeseen circumstances.
The main challenge is to reduce the waiting time of a ship at berth by optimizing the scheduling of container transfer activities between the ship and the yard. This involves minimizing total transfer time and, more importantly, preventing congestion caused by ships waiting at the port entrance.
While the time spent at berth for cargo-handling operations is relatively predictable once the number of ship-to-shore (StS) cranes is assigned, the true challenge lies in preemptively managing and forecasting vessel demand, berth requirements, and resource allocation before the ship arrives. By predicting vessel traffic patterns and operational bottlenecks in advance, we can improve overall port throughput and minimize queuing times for incoming vessels.
Our approach, shown in
Figure 1, involves following an integrated process combining machine learning (ML) and discrete-event simulation. The process starts with the analysis of historical data, which includes parameters such as ship waiting times and port equipment utilization. These data are then used to train ML models, including SVMs and random forests, to predict key metrics such as ship turnaround times and optimal resource allocation. The generated predictions are fed into a FlexTerm simulation to test various operational scenarios. The results obtained are used to assess the overall performance of the system and propose strategies to reduce CO
2 emissions and improve port terminal efficiency.
We apply this framework to the Port of Algiers, Algeria’s largest commercial port, with a focus on improving container handling efficiency (
Figure 2).
Our study employs supervised machine learning (ML) algorithms to predict ship stay durations at the port based on historical data. Several algorithms were tested, including Support Vector Machines (SVMs), decision trees (DTs), random forests (RFs), and artificial neural networks (ANNs). SVM was chosen for its ability to handle non-linear relationships in data through the use of kernel functions. Given the complexity of port operations and the non-linear interactions between variables (e.g., arrival schedules, equipment utilization), SVM proved effective in capturing these dependencies. Random forest was selected for its robustness to overfitting and its ability to handle large datasets with high dimensionality. Decision trees were included as a baseline algorithm due to their interpretability and simplicity. While they lack the predictive accuracy of ensemble methods, they provide valuable insights into the relative importance of input variables. ANN was utilized to capture complex patterns in the data. The architecture of the implemented neural network is based on parameters selected to optimize convergence and performance. The network includes a single hidden layer with 200 neurons, specified by the parameter hidden_layer_sizes = (200). The activation function used is ReLU (rectified linear unit), chosen for its ability to efficiently model non-linearities. The optimization algorithm adopted is Adam, known for its speed and stability. The maximum number of training iterations is set to 300, ensuring a good balance between accuracy and computation time. Additionally, a stopping criterion based on internal tolerance is integrated to halt training if convergence is achieved before reaching the iteration limit.
The Port of Algiers includes 34 berthing docks, running from west to east. It is organized into three main zones:
North Zone: Bounded by the commercial fishing sector, which includes facilities for fishing vessels and handling seafood products, and the harbor master’s office (from quay 5 to 11).
Central Zone: Bounded by the dry docks and the container terminal (berths 16 to 25). This zone is primarily used for loading and unloading container operations.
South Zone: Bounded by the container terminal and the east breakwater (from quay 30 to 37). This zone is dedicated to general freight traffic and container operations.
Figure 2 provides an aerial view of the Port of Algiers, with the different zones numbered and identified.
Between January and the end of March 2022, 329 ships docked at the Port of Algiers, operated by a total of 293 shipping companies. During the first quarter of 2022, container traffic handled by EPAL (Enterprise Port Authority of Algiers) [
33] amounted to 61,220 twenty-foot equivalent units (TEUs), including 34,131 TEUs of full containers (loaded and unloaded).
The preprocessing phase involved exploring historical data (2017–2022) from the Algiers Port to ensure data quality. Outliers were identified using a box plot (
Figure 3) and removed to avoid distorting model predictions. These variables encompass a wide range of operational and logistical details:
Port calls (number and nature of operations for each vessel).
Vessel details (size, type, and capacity).
Arrival and departure dates (timestamps).
Duration of stay (in days).
Berthing dock (specific quay assignment).
Container type (standard, oversized, etc.).
Cargo sensitivity (e.g., hazardous materials).
Presence of refrigerated containers (critical for certain cargo types).
Eliminating outliers, or data cleaning, is an essential step in data preprocessing as they can distort the results of the algorithm if not removed. Inconsistent or noisy data must also be eliminated. We focus specifically on the Stay criterion, which represents the time spent by ships in port. In fact, the prediction made with ML algorithms concerns this criterion which is calculated based on the arrival and departure dates, and it constitutes a key indicator for evaluating and optimizing the operational performance of terminals.
Figure 3 illustrates the distribution of ship stay durations (Stay), measured in days. The
X-axis represents the possible durations, ranging from 0 to 80 days, while the
Y-axis shows the frequency of observations for each time interval. Isolated points beyond 20 days represent outliers. Outliers appear as isolated points outside the box boundaries, significantly differing from the other data points.
Before applying the ML algorithms, it is essential to divide our dataset into training and test data. We have allocated 80% of the data to training data and 20% to test data. In addition, we split the data into x_train and y_train, which correspond to the explanatory variables and their respective classes for the training data and x_test and y_test for the test data. Dividing the data into training, validation, and test sets enables the model to be trained, the validation set is used to adjust the hyper-parameters, and the test set is used to evaluate the model’s final performance.
We then developed a correlation matrix to visualize the linear relationships between the different variables in the dataset. This allows us to analyze how the variables relate to each other.
In the correlation matrix, each parameter represents a variable in the dataset, and the figure shows how these variables are related to each other. Here is an explanation of the parameters in
Figure 4:
Stopover: This represents the ship’s call number. It can be used as a unique identifier.
Arrival date: this represents the ship’s arrival date at the port.
Release date: this represents the ship’s departure date from the port.
Stay (duration): this indicates the number of days a ship remains docked.
Fridge and Nfridge: these variables indicate the number of refrigerated and non-refrigerated containers.
Sensitive and Nsensitive: these variables represent the number of sensitive and non-sensitive containers.
MN20P and MN40P: these variables indicate the number of 20-foot and 40-foot containers unloaded using the ship’s handling equipment.
ME20P and ME40P: these variables indicate the number of 20-foot and 40-foot containers unloaded using handling equipment.
We conducted a correlation analysis to better understand the relationships between the variables (
Figure 4). In the matrix, the colors represent the intensity of the correlations: light beige indicates strong correlations, orange denotes moderate correlations, and black represents weak correlations. Each parameter corresponds to a variable in the dataset, such as port calls, arrival and departure dates, dwell time, container types (e.g., refrigerated, sensitive), and the number of 20TEUs/40TEUs (twenty-foot equivalent units) unloaded by ship’s handling equipment. The values in the matrix measure the relationship between pairs of variables: a positive correlation (+1) means both variables increase together, a negative correlation (−1) indicates that as one variable increases, the other decreases, and a correlation close to 0 suggests no significant relationship. This analysis allowed us to identify key associations that are crucial for the model’s performance.
At this level, we start with implementing ML models for classification and compare the performance of the different algorithms used. To facilitate comparison, we have summarized the results in
Table 1. This table highlights the performance of each algorithm, enabling us to identify the one that stands out in terms of accuracy and predictive capability. This comparison helps us to make informed decisions about the most appropriate algorithm for our specific problem.
It is important to note that the choice of the best algorithm depends on the specifics of our dataset. Thus, this comparison step gives us valuable insight into choosing the most efficient ML model adapted to our situation.
Several supervised ML models were applied, including a decision tree, SVM, random forest, and ANN. Each model was evaluated using metrics such as accuracy, precision, and recall (
Table 1).
We used cross-validation to improve results and avoid over-learning. This uses more test data and measures model performance. Cross-validation uses the entire training dataset for training and evaluation, rather than just part of it. It does not simply measure the accuracy of a model, but it also gives an idea of how representative the dataset is, and how sensitive the model is to variations in the data.
Figure 5 shows that the two curves (training score and validation score) are close to the 99% threshold, and we can see that there is no great discrepancy nor a situation of over-learning.
The blue curve, representing the training score, shows us that the models were very successful in learning the dataset. Indeed, we have a training score close to 100%, and the validation score curve is close to the 99% threshold (
Figure 6).
The decision tree is an algorithm widely used for classification, valued for its ability to represent decisions made from input data using a tree structure. In our case, the method gave an accuracy of 0.996 with a precision of 0.9966. As for the KNN algorithm, it works by identifying the training samples that are closest to a new sample and predicting its class based on the majority class among these nearest neighbors. This algorithm is based on a distance, calculated between the training examples and the example to be predicted, to determine the k-nearest neighbors. It gave an accuracy of 0.9610 with a precision of 0.9651. SVM (Support Vector Machine) is a supervised learning algorithm used for classification and regression. It is commonly used in classification tasks, where the objective is to separate examples of different classes by finding an optimal hyperplane in a higher-dimensional space. In our case, we have classified possible turnaround times. Once the model was trained, we used it to predict the class labels of new data as a function of the position of that data relative to the separating hyperplane. It gave a better result, with an accuracy of 0.9989 and a precision of 0.9991. Finally, random forest is one of the most powerful algorithms in ML. It gave 0.9966 in accuracy with 0.9966 in prediction precision.
For a more detailed evaluation, the MAE (mean absolute error) and RMSE (root-mean-squared Error) metrics were added. The MAE, with a value of 0.055, indicates an average error of 1 h and 20 min in predicting dwell times, which is suitable for operational planning. The RMSE of 0.14 suggests that larger errors (approximately 3 h and 20 min) may occur, likely in specific cases. This indicates that the model is reliable for the majority of scenarios. These results, combined with consistent performance across the training and testing datasets, demonstrate the absence of overfitting and confirm the robustness of the model under operational conditions.
4. Simulation and Performance Evaluation
The continuous expansion of container traffic necessitates significant investments in terminal infrastructure to efficiently handle various flows while addressing environmental considerations. Moreover, shipping companies are keen to minimize their vessels’ turnaround time and ensure seamless operations.
Following cargo-handling operations at berth, containers are transferred to the storage area by internal tracks, straddle carriers, reach stackers, or other equipment. The most essential element of a storage plan is the time a container is expected to stay in the yard. After a certain period, import containers leave their storage area to be delivered to end customers, and export containers are loaded on ships (
Figure 7).
We used FlexTerm to model and simulate container flows within the terminal (
Figure 7). FlexTerm is an object-oriented tool for modeling and simulating the flow of containers in marine terminals using its CT (container terminal) library [
10]. The primary application has several predefined commands and functions written in the C++ programming language.
The simulation uses data from the Algiers container terminal, sourced from an Excel file, and integrates the results obtained from machine learning algorithms. The ML models provide predictions for ship turnaround times over the course of an entire year, including both waiting times and handling times at berth. These predicted values are crucial inputs to the simulation, which replicates ship arrivals, departures, and various handling operations at the terminal. The simulation respects the number of ships and the predicted turnaround times generated by the SVM algorithm, while adhering to the operational constraints typical of container terminals. The simulation parameters include the capacities of the docks and handling equipment. The arrivals of ships are based on historical data. The handling equipment is available and operational. The capacities of cranes and storage areas are managed based on operational priorities and actual operating parameters, including transition speed, orientation speed, washing speed, and lifting capacity. Movements within the terminal must minimize conflicts between equipment and respect the priorities of the vessels. All containers are processed within their allocated parking windows without significant interruptions due to external factors (e.g., weather conditions).
In light of the increasing emphasis on sustainable supply chain management practices under the carbon trading era, we have implemented several simulation scenarios to analyze the behavior of key entities involved in port operations, particularly container handling. These entities include ships, quay cranes, trucks, and storage areas. Our primary focus is on quay cranes, which are not only expensive to operate but also contribute significantly to CO2 emissions. By using the ML-predicted data on ship turnaround times, our simulation system allows us to assess the terminal’s performance and its ability to handle varying traffic flows. The main objective of this study is to evaluate the factors affecting overall ship turnaround times, including unproductive crane movements, waiting times, and resource occupancy rates, while also considering how these factors can be optimized to achieve emission reductions in line with national sustainability targets.
For example, waiting times, which occur when cranes are idle or ships are delayed, are a crucial factor that impacts port efficiency. The growing volume of container traffic demands substantial terminal resources, such as quay cranes, yard cranes, trucks, and storage space, to manage the increasing flows while considering environmental sustainability. Additionally, shipping lines require a minimum stay in port, within specific time windows, to optimize their schedules.
Table 2 presents the input data for a simulated instance. These data represent operations during a typical workday at the container terminal under study. According to the predictions generated by the machine learning model (in this case, an SVM algorithm used for predicting ship handling times), we have two ships: one carrying 300 containers and the other 900 containers. Both ships remain at berth until all handling tasks are completed.
4.1. Ordinary Scenario
The simulation system, configured with the actual operating parameters of the container terminal, produced the results displayed in
Figure 8,
Figure 9 and
Figure 10. This ordinary scenario serves as a baseline to evaluate the impact of current operational practices on port efficiency and CO
2 emissions.
In this simulation, the variable offset_travelempty represents the movement rate of a quay crane when it is not transporting a container, while the travelloaded_offset variable indicates the movement rate when the crane is transporting a container. The term “movement rate” refers to the speed at which the crane moves horizontally along the quay to transfer containers between the ship and the terminal yard.
The quay cranes are critical pieces of equipment in this operation, and the efficiency of their movements—both empty and loaded—directly affects the overall ship turnaround time. Reducing the time quay cranes spend moving without containers is essential for minimizing unnecessary emissions and improving operational efficiency. This aspect is particularly relevant in the context of sustainable supply chain management, where optimizing resource utilization can lead to lower carbon footprints and better compliance with national sustainability targets.
Figure 8 illustrates the application of the predicted turnaround time to the simulation and presents a breakdown of the activities of the handling equipment involved in container operations. The various colors in the figure represent different states of equipment usage: active operation, idle time, and blocked periods.
Blocked indicates times when the equipment was unable to operate due to congestion or unavailability of resources. Allocated idle refers to periods when the equipment was assigned to a task but not actively working, either waiting for the next operation or due to delays in coordination.
The handling equipment displayed in the figure includes quay cranes, yard cranes, and trucks, all of which were involved in internal transfers and container storage operations. These machines worked continuously throughout the ship’s turnaround time, coordinating with each other to optimize handling and storage processes.
Faster evacuation of containers could be achieved by deploying additional resources, as long as this does not interfere with operations at the other docks. Optimizing container evacuation, for example, by using more trucks or cranes, when possible, can significantly reduce a ship’s turnaround time.
Furthermore, the figure shows a high volume of internal truck movements, suggesting that the trucks were able to perform their planned tasks efficiently, contributing to the optimal use of resources. However, it is important to note that the waiting time for the gantry crane is higher than that for the toploader, indicating that gantry crane operations may be a bottleneck in the process, potentially leading to increased emissions due to idling and unproductive movements.
At the end of the simulated procedure,
Figure 9 demonstrates that all import containers have been handled and moved and that there are no containers left in the storage area. Both storage areas were filled and emptied according to the curves shown in the graph. We found that the zones had a balanced workload. The storage area of a container terminal has a considerable impact on a ship’s turnaround time. Its capacity speeds up the evacuation of a ship and reduces its turnaround time.
Efficient management of the storage areas not only enhances operational efficiency but also aligns with the broader goal of sustainability by contributing to lower carbon footprints in port operations. Optimizing the storage area capacity ensures that resources are utilized effectively, further supporting efforts to achieve emission reduction targets under carbon trading policies.
Figure 10 shows the utilization rate of the container terminal’s two quay cranes. In this figure, the rate of movement of Crane 1 without picking up a container is less than 20%, while Crane 2 moved without containers with a percentage higher than 20%. Furthermore, the rate of movement of Crane 1 with a container is 27.62%, compared with 83.19% for Crane 2. We found that there was an imbalance in the workloads of the handling equipment at the same terminal, with the “Crane 2” quay crane having a heavier workload than the “Crane 1” quay crane. This imbalance can lead to inefficiencies and increased CO
2 emissions due to the higher energy consumption and operational strain on the more utilized crane.
To address this issue, it would be necessary to study this load-balancing problem to better optimize (un)loading operations at the rail yard. By redistributing tasks more evenly between the two cranes, we can not only improve operational efficiency but also reduce unnecessary movements and emissions associated with crane operations. Implementing effective load balancing strategies would therefore contribute to achieving sustainability goals while maintaining high performance in terminal operations.
4.2. Balanced Scenario
To test the effect of our performance evaluation contribution on the simulation model, we carried out an in-depth analysis based on the conclusions drawn from the results obtained and made several configurations to change handling priorities and mobilize cranes as long as there were tasks to be performed. This approach not only optimizes operational efficiency but also significantly contributes to reducing carbon emissions by minimizing unnecessary movements and improving resource utilization.
The following figures show the results of load balancing through the simulation system. By ensuring that quay cranes and other handling equipment are effectively utilized, we aim to decrease idle times and unproductive movements.
After analyzing the assignment of the quay cranes, the allocation parameters were modified to promote coordination between the two cranes. Comparing
Figure 8 and
Figure 11, we can see that the turnaround time has been reduced by one working day. In fact, we are able to balance the workload between the quay cranes (
Figure 12). This optimized ship handling and reduced ship turnaround time.
To test the effect of our performance evaluation contribution on the simulation model, we carried out an in-depth analysis based on the conclusions drawn from the results obtained and made several configurations to change handling priorities and mobilize cranes as long as there were tasks to be performed.
The following figures show the results of load balancing through the simulation system.
During this scenario, storage area 17 was very full (
Figure 13). This was due to the acceleration of handling operations thanks to the collaboration between the two quay cranes, which is crucial for reducing CO
2 emissions associated with inefficient handling. The number of containers per ship and the occupancy rate of the storage areas are also determining factors in this equation. By evaluating these different parameters, it becomes possible to determine precisely and appropriately the optimum number of handling equipment required to ensure an efficient workflow and reduce waiting times, thereby contributing to sustainability goals.
Intelligent management of these key variables optimizes available resources, reduces operating costs, and improves overall port productivity. It is therefore essential to take these factors into account when planning operations and allocating resources, to ensure efficient, cost-effective management of port activities. Indeed, to achieve further reduction in ship turnaround times and CO2 emissions, we proposed increasing costs and analyzing the impact to simulate an optimized scenario with load balancing.
4.3. Optimized Scenario
At this level, we aimed to further minimize turnaround times by increasing the number of resources at the sea interface and in the internal transfer zone. In fact, a new quay crane causes an overload in the internal transfer area. Consequently, to preserve the performance of the latter, an adjustment is made to the number of resources. We obtained the results shown in
Figure 14,
Figure 15 and
Figure 16. The simulation system was run with the same configurations as before (
Table 2), to visualize the impact of the latest choices.
Performance metrics for material handling machinery, including dock cranes, are shown in
Figure 14 and
Figure 15. These statistics reveal a significant reduction in working time compared to
Figure 10 and
Figure 12, effectively allowing us to avoid losing half a day of operational efficiency, thereby enhancing the overall productivity of the port operations. In addition, the three quay cranes conformed with the mandated collaboration restrictions, which are essential for optimizing overall performance and minimizing emissions, aligning with our commitment to sustainable port management.
Figure 16 depicts how import/export container flows have changed over time in the storage areas, illustrating the efficiency of the container terminal operations and how our approach can lead to reduced turnaround times. All the equipment was synchronized as soon as the ship reached the maritime interface to handle the different unloading, transfer, and storage activities. This coordination ensured that the import/export vessel had all its containers efficiently moved and emptied, enhancing the terminal’s throughput and contributing to the reduction in unnecessary movements that generate CO
2 emissions.
Indeed, to reduce a ship’s turnaround time in a container terminal, it is essential to optimize port operations to increase the overall efficiency of the process. The aim of our work is to provide a clear vision for the future operation of the container terminal at Algiers Port. The challenge is to anticipate delays, increase shipping company satisfaction, and minimize CO2 emissions by reducing the rate of empty trips.
The turnaround duration and empty travel rate for the three simulated scenarios are contrasted in
Table 3.
Measuring the performance of the maritime interface involves evaluating various indicators, such as average ship turnaround time, number of quay cranes, equipment utilization rate, average container processing time, and operational error rate, all while considering the implications of carbon emissions. This research proposes a technique based on simulation and machine learning (ML) to forecast and shorten vessel stay times and overall working time, thereby contributing to emissions reduction strategies. The outcomes of these predictions provide a medium- to long-term vision for improving port operations, although further assessment and simulation are required to validate these findings.
In our first scenario, we effectively manage the ships predicted by ML, and the quay cranes adhere to the established operational plans. However, we observe a large proportion of empty journeys that do not involve container transport, which extends ship stay times and hinders efficient container evacuation. Addressing this inefficiency is crucial for reducing carbon emissions, as unproductive movements significantly contribute to CO2 output and operational delays.
The second scenario demonstrates a notable decrease in the rate of movements without containers, achieved through the collaboration of two cranes to balance workloads. While this approach optimizes resource allocation, it requires the ship to remain docked longer compared to the optimized scenario, leading to extended operation of the auxiliary engines. These engines burn fuel to generate electricity onboard for various functions, such as cooling containers, powering pumps, and operating onboard cranes for cargo handling [
34]. This strategic coordination results in a reduction in turnaround times by a full day, illustrating the effectiveness of collaborative resource management in minimizing emissions.
In the third scenario, we introduce a third quay crane, further reducing total turnaround time by enhancing loading and unloading processes, albeit at an increased operational cost. This approach significantly reduces ship dwell time at the quay, allowing containers to be evacuated more quickly. Additionally, minimizing ship stay times helps reduce CO
2 emissions as auxiliary engines operate for a shorter duration. According to a study, unloading three ships using two quay cranes generates approximately 4.72 tons of CO
2 emissions, highlighting the potential environmental benefits of deploying additional cranes to accelerate operations [
35].
Overall, the performance of container terminals exhibits variability; our simulations indicate the necessity for enhanced turnaround periods across all zones. By increasing resource allocation and refining operational expenditures, we can achieve significant reductions in turnaround times. An efficient container terminal not only provides a competitive advantage for ports by attracting more shipping lines but also supports regional economic development and sustainable practices by facilitating international trade while adhering to carbon trading policies.