## 4 The Proposed Approach
### The Multi-Agent System (MAS) Proposed  
This section describes the structure of the MAS for the proposed solution. The MAS framework is designed to test the validity of the 2 Stage-Opt solutions simulating the dynamic interactions between different entities within the logistics hub. Thus, the model has two types of agents that are integrated by the MAS: local and global agents. By using a combination of local and global agents, the system can handle the strategic and operational aspects of container transport. The main objective of the global agent is to complete the task assignment at the strategic level. This agent is a transversal agent that takes care of the information flow from the optimisation model. On the other hand, the local agents contribute to dynamic logistical process orchestration at the operational level. Therefore, these agents manage the day-to-day logistics operations, such as loading, unloading, and routing, based on the information on the global agent and the interaction with the other agents. For the proposed model, the local agents are of four types: transport, node, container, and PI-container. These are detailed as follows:  
* Transport agents: These represent the different modes of transportation within the MAS, including both trucks and ships. These agents specify their present state of operation and transport capabilities. To match containers with suitable transport vehicles based on destination compatibility, each transport agent keeps a list of the possible destinations it may serve. Moreover, they dynamically monitor the available space and modify their operations according to the status of the containers, whether they are in transit, arriving for loading, or prepared for unloading. * Node agents: Ports and truck nodes are examples of the physical sites that node agents represent within the logistics hub. To manage the movement and processing of commodities through the system, each node is identified by a status variable that indicates whether the node is occupied, active, or in standby. The nodes are classified according to their type, between ports for ships and docking stations for trucks. * Container agents: These represent individual containers as they arrive through the logistics network. These agents interact with transport and node agents to facilitate the conversion of containers at the PI-hub. * PI-container agents: These are standardised boxes within the hub that contain the products and move around the hub. The PI-container agents actively monitor their status, including whether they are fully loaded, empty, or prepared for transport, and communicate this information to transport agents. These agents continuously update their status to signal readiness for transfer to the appropriate transport vehicles. The global agent contains and runs the initialisation of the optimisation model, as is shown in Figure 3. This model works by precisely describing the restrictions and decision variables that direct the overall operational strategies of the system. These choice factors establish which trucks are assigned to which PI-container groups, making sure that every assignment respects the capacity restrictions and maximises route efficiency. Important operational guidelines are enforced by the constraints in the model, which make sure that every PI-container is assigned uniquely to avoid double-booking, that each container has a designated truck to prevent logistical issues, and that each truck's load does not exceed its capacity to avoid overloading and possible operational failures. The local agents are responsible for applying the information given by the global optimisation model at the local level. Trucks that are outfitted with pre-planned itineraries and cargo assignments find their way to the ports where they will be loaded and then deliver containers to their destination. In this model, ports play a role as nodes, handling container handling and truck arrivals and departures.