# Multi-Agent Simulation Approach for Modular Integrated Construction Supply Chain
## 3 Proposed Agent-Based Model
### Model Implementation Using AnyLogic
#### 3.4.2 Model Implementation
In this step, a vehicle from the fleet is assigned to transport the components. This involves allocating an appropriate transport vehicle based on availability and suitability for the delivery task. Following this, the process moves to the \"Delivering\" step, which represents the actual \begin{table}
\begin{tabular}{p{56.9 pt} p{142.3 pt} p{142.3 pt}} \hline \hline
**Agent** & **Properties and Parameters** & **Behaviors and Functions** \\ \hline Supplier & Parameter: Number of vehicles assigned, capacity, ComponentsInStorage, ProductionRate. & Process: Fabrication of prefabricated components (see Figure 6b), Inventory modeling using system dynamics (see Figure 6c). Function: ProductionTime() for component production duration, ProduceComponents() to manage the production of components, ManageInventory() to manage inventory levels and storage, ScheduleTransport() to schedule transport of components to factories. \\ \hline Transporter \(T_{1}\) & Parameter: Associated supplier and factory. & Process: State chart (see Figure 6d). Function: TransportComponents() to manage transport of components from suppliers to factories, UpdateStatus() to update transport status and availability. \\ \hline Transporter \(T_{2}\) & Parameter: Associated factory and construction site. & Process: State chart (see Figure 6e). Functions: TransportModules() to manage transport of modules from factories to construction sites, UpdateStatus() to update transport status and availability. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: _Cont._transportation of the components from the supplier to the MiC factory. The components are loaded onto the vehicle and transported to their destination. After the components are delivered, the process proceeds to the \"Release Vehicle\" step. At this stage, the vehicle is released and made available for future transportation tasks. This step marks the completion of the delivery process. The final step in the process is the \"Sink\". This represents the stage where the order is considered complete, and the system is ready to handle new orders. The purpose of this step is to close the current order loop. Storage Process in Supplier Agent:  
The diagram in Figure 6c illustrates the storage process related to the supplier agent. This specific process focuses on managing the storage of prefabricated components before they are delivered to the MiC factories. The process begins with the \"Production Rate\" element, which controls the rate at which prefabricated components are produced. This element ensures that components are manufactured at a consistent rate. The production rate is influenced by the \"Capacity\" of the production facility, which defines the maximum output that the facility can handle at any given time. Once produced, the components are stored in the \"Components\" storage. This element represents the inventory of prefabricated components that are ready for dispatch to MiC factories. The \"Components In Storage\" variable tracks the number of components currently held in storage. Figure 6: Process of each agent: (**a**) Fabrication of integrated modules by the MiC Factory agent, (**b**) Fabrication of prefabricated components by the Supplier agent, (**c**) Inventory process by the Supplier agent, (**d**) State chart for the transport process of the transporter \(T_{1}\) agent, (**e**) State chart for the transport process of the transporter \(T_{2}\) agent. Statechart for Transporter \(T_{1}\) Agent:  
The statechart diagram in Figure 6d represents the various states and transitions of the transporter \(T_{1}\) agent. Transporter \(T_{1}\) is responsible for moving prefabricated components from suppliers to MiC factories. The initial state in the statechart marks the starting point of the process. Transporter \(T_{1}\) begins in the atSupplier state, where it is initially located at the supplier's facility. In this state, transporter \(T_{1}\) is waiting to receive an order and be assigned a task. Upon receiving an order, transporter \(T_{1}\) transitions to the loading state.