## 3 Methods
### Simulation Modeling
#### 3.1.1 Model Description  
We model the proposed problem as a continuous, discrete event simulation model. The product is modeled as a continuous entity, and all other events such as bad weather, vessel, and port operations are modeled as discrete events. A schematic diagram of our developed model is shown in Figure 2 to convey the developed logic clearly. The source, the \"Production plant\", creates a metric ton of the products as a continuous entity according to its production rate. The products created in the Production plant leave the system at the \"Outflow sink\". Our model employs the transporter module in Simio to simulate vessel operations. Two transporter modules in Figure 2 represent vessels with different capacities (large and small). The model attempts to transport all produced products, making the shipment demand proportional to the production volume. Hence, it operates as a push system. The product first flows to (and is stored in) the \"Yard tank,\" which supplies the product to three docks. The movement of the containerized product from the \"Yard tank\" to three docks is approximately modeled using flow paths. Empty vessels initially wait at the waiting area until a dock becomes available and move through the tugging path to any one of the available docks at the origin port (i.e., Port A). The tugging module only allows one vessel movement for either arrival or departure during a specified duration (i.e., three hours). The first berthed vessel is loaded first under the current FAFU vessel priority policy. If there is a sufficient amount of product in the Yard tank, several vessels can be loaded simultaneously. Once a vessel is fully loaded, it can be tugged if a tugging path is available. Otherwise, the vessel waits at the dock until a tugging path becomes available. After going through the tugging path, the vessel departs with the destination information and moves to the destination port through the predefined route. Upon arrival at the destination, the vessel may wait some time to be berthed, following the specified distribution at the destination port. On berthing at the terminal of the destination port, the duration of the operation follows the average estimated time (due to a lack of actual data), which includes tie-up, unloading of products, and departure time. After unloading the  
Figure 2: Schematic diagram of the simulation model for the closed-loop vessel shipping system. products, the empty vessel returns to Port A and waits in the waiting area until there is an available dock at Port A. The unloaded entities at the two destination ports are stored in the \"Virtual tank\" to estimate the amounts of products transported easily and animate the transported volume. A few unique logic conditions, such as resource restriction, vessel selection, and routing requirements, have been incorporated in the developed model. To implement the resource restriction in the system, we employed two resource modules. The \"Dock capacity\" resource size is set to be three, representing the number of docks. It is decremented by one whenever a dock is seized (i.e., berthed) by a vessel and incremented whenever released. Therefore, according to the current available room in the Dock capacity, the model determines if another vessel waiting at the waiting area can be berthed or should wait longer. Similarly, the \"Tug capacity\" resource monitors and allows one vessel in theugging paths at any time. Hence, only one arriving or departing vessel can move through the tugging paths at a time. The predefined vessel ranking in the model determines which vessel is tugged to a dock from the waiting area. The destination assignment for each fully loaded vessel is implemented in the routing logic at each dock by randomly assigning a specific destination port using the current cargo volume shipped to each destination: 85% of the products are transported to Port B and 15% to Port C.  
The vessel waiting times at the Port A waiting area are controllable by managers.