Shipping optimization systems (SOS) for tramp: stochastic cargo soft time windows

Cargo time windows have been discussed in the shipping literature in several ways and within several contexts. One way considers the hard time windows, where a fixed date is assigned to both the open and close laycan for the cargo loading and discharging ports. According to this way, the cargo is rejected if the ship cannot meet these time windows. Another way develops soft time windows, where the ship for an additional cost or a penalty may violate the cargo laycan. The context in the previous ways includes a tramp deterministic model. In this paper, the soft time windows are considered within a context of a tramp stochastic model, where both the cargo transport demand and the laycan dates are random variables. The objective is a gross-profit-per-day accompanied with realistic shipping elements embedded into decision support systems known as shipping optimization systems (SOS). The chance-constraint programming and the modified version of the Dantzig–Wolfe decomposition principle known as block-angular linear ratio programming solve the problem. A case study demonstrates that using stochastic soft time windows with stochastic cargo transport demand has considerably improved the gross profit-per-day better than trying to arrive on time by varying ship speed or being within a non-stochastic shipping context.

Psaraftis (2017) who gave for his paper the title 'Ship routing and scheduling: the cart before the horse conjecture' triggers the development of this research paper. The title implies the fact that some research assumptions in the area of ship routing and scheduling resembles the situation where the cart is put before the horse, a situation that makes ship owners skeptical about research in this area. One of the main reasons for this situation is that some authors, including the Author of this research paper, assume a hard time window for cargo loading and discharging events. In fact, the ship owners are skeptical not only because of this situation but also because of the research mathematical models where not all shipping elements are represented.
The purpose of this research is not only to formulate a soft time window but also to consider this time and the cargo transport demand as random variables, which has never been discussed before. This consideration enables the routing and scheduling problem to incorporate the cargoes that are expected to be offered in the planning period. Without this consideration, the expected cargo, when offered, might find no space for transport. According to the chance-constraint programming (Charnes and Cooper 1959), the likelihood of the expected cargo to be offered and be transported is based on the probability distribution of the cargo quantity and the least probability the ship owner stipulates he can transport the cargo within its transport demand. This new formulation extends the model of the Shipping Optimization Systems (SOS) (SOS 2021). SOS is a suite of decision support systems developed to support the ship owner in making optimal decisions for cargo-ship-voyage scheduling, ship-to-trade-area allocation, and new-ship appraisal. The cargo-ship-voyage scheduling model uses a stochastic gross-profit-per-day objective accompanied with realistic shipping elements. This objective, due to its per-day criterion, enhances the performance of the sea transport as part of the supply chain. This model is here extended to include the stochastic soft time windows in addition to the stochastic cargo transport demand. The chance-constraint programming and a modified version of the Dantzig-Wolfe Decomposition Principle (Dantzig and Wolfe 1960) known as Block-Angular Linear Ratio programming (El Noshokaty 2014) solve the model.
In "Review of the literature" section, a review of the literature is presented, followed by the mathematical model in "The mathematical model" section and the solution procedure in "The solution procedure" section. "Case study" section demonstrates a case study and "Conclusion" section concludes the findings of this paper.

Review of the literature
The research papers, which are related to the subject of this research paper, can be classified into three categories. First category discusses the hard and soft time windows without a stochastic context. The second category discusses the time windows within a stochastic context other than the time windows or the cargo transport demand. The third category discusses the soft time windows within a stochastic context of time windows only.
In the first category, Koskosidis et al. (1992) have addressed the vehicle routing and scheduling problem and presented a formulation based on the treatment of the time window constraints as soft constraints that can be violated at a cost. They heuristically decompose the problem into an assignment/clustering component and a series of routing and scheduling components. Fagerholt (2001) introduced soft time windows to a ship-scheduling model. The motivation for introducing soft time windows instead of hard ones is that by allowing controlled time window violations for some cargoes, it may be possible to obtain better schedules and significant reductions in transportation costs. To control the time window violations, inconvenience costs for servicing cargoes outside their time windows are imposed. Christiansen and Fagerholt (2002) assumed that the ports may be closed for service at night and during weekends, therefore, wide time windows can be regarded as multiple time windows. Christiansen et al. (2004) have presented a review of the routing and scheduling problems and the cargo time windows discussed in these problems. They classified the time windows, in addition to hard time windows, into multiple time windows and soft time windows. Daniel (2006) introduced a new formulation to solve ship routing and scheduling problems with hard time windows. The problem describes a set of products distributed among a set of ports, with each product having a pickup time window, download time window, and a destination port. Within a specific time horizon, it is required to find the schedule for a fleet of ships that maximizes the fleet total gross profit. The problem is modelled as a Mixed Integer Non-Linear Programming (MINLP) problem. Kritikos and Ioannou (2010) and Nhieu et al. (2018) address a variant of the vehicle routing problem with hard time windows. Lui et al. (2021) address the vehicle routing problem with soft time windows.
In the second category, Tas et al. (2013) studied a vehicle routing problem with soft time windows and stochastic travel times. A model is developed that considers both transportation costs (total distance traveled, number of vehicles used and drivers' total expected overtime) and service costs (early and late arrivals). Errico et al. (2018) considered the vehicle routing problem with hard time windows and stochastic service times (VRPTW-ST). In this variant of the classic VRPTW, the service times are random variables. They consider a chance-constrained program to model the VRPTW-ST and provide a new set partitioning formulation. Keskin and Tabatabaei (2019) considered the electric vehicle routing problem with time windows and stochastic waiting times at recharging stations is an extension of the electric vehicle routing problem with time windows where the vehicles may wait in the queue before recharging their battery due to a limited number of available chargers.
In the third category, Guan et al. (2017) designed a linear programming model with chance constraints for the time window of loading cargo. Before the optimization, a survey for the waiting time of ships for berths is carried out in some of the ports with large export volume. The uncertain time window constraints are transformed into deterministic constraints. The model is solved by column generation optimization technique.
The following are some comments on the above-mentioned research papers: (a) The cargo quantity is not considered as random variable, with or without the soft time windows. As a result, the not-yet-offered cargo of a stochastic transport demand is denied representation in the model, leaving the model without a global optimum even though the soft time windows may be stochastic. (b) The ship arrival time is determined apriori according to predetermined feasible cargo-ship-voyage schedules. As a result, the alternatives of ship arrival time at any port may not be exhaustive, leaving the model without a global optimum.
(c) The ship arrival time lacks the necessary shipping elements to represent a real tramp-shipping problem. Examples of the shipping elements include a gross-profitper-day objective, demurrage and dispatch terms, laden and ballast fuel consumptions, passing or (and) bypassing canals, en-route bunkering, and much more others (El Noshokaty 2017, 2020.)

The mathematical model
The paper is using the tramp model developed initially by El Noshokaty (2017), modified by some additional shipping elements by El Noshokaty (2020), which can all be summarized in the following 25 elements: (a) The total quantity of the cargoes to be carried on board a ship must target the maximum possible profit whether the ship is 'full and down' or otherwise. Maximum possible profit is achieved by optimizing the stochastic gross-profit-per-day objective. (b) The rate of loading or (and) discharging of a cargo may be limited to a nominal rate.
The demurrage and dispatch may result if the actual rate is less or greater than the nominal rate, respectively. The demurrage and dispatch may be calculated for the loading and discharging separately (irreversible calculation), or for the loading and discharging combined (reversible calculation). to heat or cool the cargoes while in ship holds. The cost of heating or cooling is added to the total cost. (g) Additional charter party terms such as specifying multiple ships and cargoes in one Contract of Affreightment (COA), with freight specified for each cargo or lump sum freight for all cargoes. (h) A ship may be chartered-in to compete in carrying a certain cargo. (i) The ship has the option, if permitted, to pass or (and) bypass the Suez Canal or (and) the Panama Canal, which ever contributes more to the gross profit per day. (j) A differentiation is made to whether the ship is in laden or ballast condition, so that the sea fuel consumption is calculated accurately. (k) Different open and close ports and dates are specified for each ship. (l) Already booked cargo. If booked, ship name may or may not be specified. If the ship name is specified, booked cargo is assigned to this ship (if the ship name is not specified, booked cargo may be assigned to the ship contributing more to gross profit). (m) Already loaded cargo. If loaded, cargo is assigned to the ship already carrying it. (n) Deadweights other than winter deadweight; namely summer and tropical deadweights.
(o) The total weight, volume, and number of all cargoes carried on board the ship, at any time, must not exceed its deadweight (excluding capacities other than cargo), volume, or (and) TEU capacity. (p) The optimal cargo mix, i.e. choosing the best combination out of different cargoes, is always desired even if the quantity of the cargoes to be carried is less than the capacity of the ship. (q) The ship has the option to carry one cargo or multiple cargoes at the same time.
(r) The date of loading or (and) discharging of a given cargo must be within its loading or (and) discharging time window. (s) The ship starting and ending ports are restricted to the ports indicated by the schedule or the last calling ports. (t) Weather condition as an element affecting ship speed. (u) If the ship arrives before the cargo loading or discharging open date, the ship has to wait until this date. This waiting time is added to the total ship elapsed time. The cost of this waiting time is added to the total cost. (v) The ship starting and ending dates of operation must be within a given schedule date window. (w) The discharged cargo from a ship is checked, holds cleaning wise, whether it is compatible with the new cargo to be loaded on board the same ship. If they are not compatible, a holds cleaning expense is incurred. (x) The en-route bunkering of the ship is allowed when the bunker price from an enroute bunkering port will reduce the operating cost. (y) The actual ship draught is measured according to the weight of the cargoes already loaded on board the ship. This allows the ship, if the actual draught permits, to pass canals and call at ports when tide is low.
The above-mentioned elements are then being modified by the new shipping element developed by this research paper, which is described hereinafter: (z) The probability that the ship arrives to pick-up a not-yet-offered cargo at its laycan is greater than the least probability the ship owner has stipulated he can transport the cargo within its transport demand (see "Appendix 2"). If the ship arrives late than the laycan closing date (cancelation date), a penalty is incurred for the delayed days.
It is strongly emphasized here that item (z) has altered item (r) the way that allows the ship owner to violate the cargo loading or (and) discharging time window against a penalty cost. The penalty cost includes shipper's claims and lost cargo offers. More importantly, the cargo loading or discharging time window, i.e. the cargo laycan, is not any more fixed as indicated by item (r), but is considered in this research paper as a random variable. This means that different probabilistic cargo time windows are considered. The model, after all the modifications brought by the shipping elements and terms mentioned under items (a) to (z) above, is described in "Appendixes 1 and 2".

The solution procedure
The model is solved by performing the following two steps: Step 1: Convert the stochastic constraints to their deterministic-equivalent ones using the Chance-Constraint programming (Charnes and Cooper 1959), as described in "Appendix 2".
Step 2: Apply the state-of-the-art Block-Angular Linear Ratio Programming algorithm (El Noshokaty 2014). In this algorithm, the problem mathematically takes a block-angular form, with a block of objective and constraints assigned to each ship. Then a modified Dantzig-Wolfe Decomposition Principle is applied to each branch point of a modified Mixed Continuous 0-1 integer-programming algorithm.
SOS automates steps 1 and 2 and applies them to the shipping problem that is stored in its database.

Case study
El Kosseir, Safaga, and Sidi Kirear are three oil tankers working as trampers in the crude oil transport. In the last quarter of the year, these tankers are planned to compete in carrying 10 crude oil cargoes by non-demise voyage charter parties. Three of these cargoes are to be transported from Kuwait to USA, another three from Ukraine to China, and four from Venezuela to Latvia. Relevant data on ships is shown in Table 1. For El Kosseir and Sidi Kirear, the open port is Alexandria. For Safaga, the open port is Odessa. For all ships, the close port is the last port of call, the open date is 1/10 (dd/mm), the close date is 31/12, the voyage fixed cost is US$ 1000, and the fixed time is 0.3 days. Relevant data on port is shown in Table 2. Before open date, 7 crude oil cargoes are offered (confirmed) while 3 cargoes are not-yet-offered (unconfirmed). Relevant data on cargo is shown in Table 3. For the not-yet-offered cargoes, the ship owner is anticipating 5 classes of data for cargo quantity and freight as shown in Table 4 and similar classes for cargo laycan as shown in Table 5.
The ship owner consults SOS to find for each ship, at the low speed level (most economic), the cargo mix (no cargo partial shipment is allowed) and the route which gives him the maximum gross profit per day, summed for all ships. Following step 1 of the solution methodology of "The solution procedure" section, SOS converts Tables 4  and 5 to a deterministic-equivalent quantity, freight, and laycan for each not-yetoffered cargo as indicated in Table 6. Then, following step 2, SOS applies the Block-Angular Linear Ratio Programming to the problem to find the optimal solution the ship owner is requesting. According to El Noshokaty 2020, SOS suggests El Kosseir selects 'Crude Oil 10' from Maracaibo to Riga, Safaga selects 'Crude Oil 6' from Maracaibo to Riga, and Sidi Kirear selects 'Crude Oil 2' from Shuaiba to Baltimore (directly), followed by 'Crude Oil 5' and 'Crude Oil 7' from Maracaibo to Riga. Total gross profit per day is $28,149. Upon reviewing this result, the ship owner pinpointed the following observations:    Discharge laycan open-close date 10/11-10/12 30/12-30/1+ 10/11-11/12 Probability in % 10 10 5 (a) Sidi Kirear has a more promising result if compared to the other two ships, (b) Although 'Crude Oil 10' has a good chance to be offered and its quantity is appropriate for El Kosseir, and 'Crude Oil 6' is also appropriate for Safaga, but both have a much less freight rate if compared to 'Crude Oil 1' or 'Crude Oil 4' , (c) 'Crude Oil 1' has an early hard laycan for load or discharge difficult to meet, while 'Crude Oil 4' has a late laycan for discharge in December which makes the voyage time less attractive from the gross profit-per-day objective point of view.
To improve the gross profit per day, the ship owner requested SOS to consider the following actions: (a) Soften the laycan of 'Crude Oil 1' by suggesting a late arrival penalty, to be negotiated later with the shipper, amounting to $2000 per day if the ship arrives late than the cargo laycan close date (cancellation date) for load or discharge. And, a waiting cost amounting to $5000, 7000, 10,000 per day if El Kosseir, Safaga, or Sidi Kirear, respectively, arrives early than the laycan open date for load or discharge. (b) Disregard the not-yet-offered cargoes from being represented to see whether softening the laycan in a non-stochastic context has a better or worse effect over the gross profit-per-day objective. (c) As an alternative action to softening, he requested SOS to perform a speed sensitivity analysis to see whether the hard laycan of 'Crude Oil 1' can be met by accelerating the speed of all ships while trying to maintain or possibly improve the gross profit per day.
For action (a), SOS suggests El Kosseir selects 'Crude Oil 10' from Maracaibo to Riga, Safaga selects 'Crude Oil 1' from Shuaiba to Baltimore (directly) followed by 'Crude Oil 6' from Maracaibo to Riga, and Sidi Kirear selects 'Crude Oil 2' from Shuaiba to Baltimore (directly), followed by 'Crude Oil 5' and 'Crude Oil 7' from Maracaibo to Riga. Total gross profit per day is $34,182. For action (b), SOS suggests El Kosseir selects 'Crude Oil 4' from Odessa to Shanghai (directly), Safaga selects 'Crude Oil 1' from Shuaiba to Baltimore (directly) followed by 'Crude Oil 6' from Maracaibo to Riga, and Sidi Kirear selects 'Crude Oil 2' from Shuaiba to Baltimore (directly), followed by 'Crude Oil 5' and 'Crude Oil 7' from Maracaibo to Riga. Total gross profit per day is $29,709. This action does not permit the promising 'Crude Oil 10' to be transported when offered.
For action (c), at the medium ship speed on all legs, SOS suggests El Kosseir selects 'Crude Oil 10' from Maracaibo to Riga, Safaga selects 'Crude Oil 6' from Maracaibo to Riga, and Sidi Kirear selects 'Crude Oil 2' from Shuaiba to Baltimore (directly), followed by the 'Crude Oil 5' and the 'Crude Oil 7' from Maracaibo to Riga. Total gross profit per day equals $25,419. At the high speed on all legs, SOS suggests El Kosseir selects 'Crude Oil 1' from Shuaiba to Baltimore (directly), followed by 'Crude Oil 10' from Maracaibo to Riga, Safaga selects 'Crude Oil 6' from Maracaibo to Riga, and Sidi Kirear selects 'Crude Oil 2' from Shuaiba to Baltimore (directly), followed by 'Crude Oil 5' and 'Crude Oil 7' from Maracaibo to Riga. Total gross profit per day reported is $28,277.
Upon reviewing the previous analysis, the ship owner decided to go for the stochastic softening of the laycan as a strategy as far as 'Crude Oil 1' maintains a penalty per day around $2000, since it gives him a better gross profit-per-day. But when negotiating the shipper of 'Crude Oil 1' , the $2000 penalty rate was rejected and another ones for $3000-$4000 was imposed for short and long delays, respectively. Again, upon consulting SOS on the new penalty rate, the same result is suggested but for a gross profitper-day of $34,032 and $33,882 for the $3000 and $4000 rates, respectively (instead of $34,182) which means that SOS is not highly sensitive to the change in the penalty rate. Therefore, the ship owner decided to accept the new penalty rate.
In comparison with the results given by El Noshokaty (2020), where the optimal gross profit per day does not exceed $28,149, the ship owner is now in a better position where he can achieve a gross profit per day around $34,000.

Conclusion
A newly modified model for ship routing and scheduling has been presented in this paper which includes stochastic cargo soft time windows, where cargo and laycan date are considered as random variables, with a penalty for a laycan late arrival and a cost for early arrival. The model has a gross-profit-per-day objective accompanied with realistic shipping elements. This objective enhances the performance of the sea transport as part of the supply chain. A case study demonstrates that using stochastic cargo soft time windows and stochastic cargo transport demand has considerably improved the gross profit-per-day better than varying ship speed. This improvement may not be equally achieved in a non-stochastic shipping context.
Using SOS as a decision support system, where the new model is built-in and transparent to the user, enables the ship owner to interact with SOS to perform what-if and sensitivity analysis. The analysis shows the effect of changing different shipping elements on the gross profit-per-day.
Future research work is needed to build probability distributions for different categories of cargo transport demand. This work will encourage researchers to develop more stochastic shipping models. '' S = {1, 2, 3, . . . , s 0 } be the set of ships, P = {1, 2, 3, . . . , p 0 } be the set of ports of a working trade area, Q = {1, 2, 3, . . . , q 0 } be the set of cargoes available for transport between ports of this area. It is assumed that cargoes are compatible with the ship carrying them and can be mixed on board the ship with ship stability maintained. Each cargo r ∈ Q has a loading event and a discharging event, L = 1, 2, 3, . . . , l 0 be a set of loading events, one for each cargo, D = 1, 2, 3, . . . , d 0 be a set of discharging events, one for each cargo, F = {f} be a one-element set of open event f. G = {g} be a one-element set of close event g, E = L ∪ D be the set of load and discharge events, combined, E f = E ∪ F be the set of open, load, and discharge events, combined, E g = E ∪ G be the set of load, discharge, and close events, combined, E fg = E f ∪ G be the set of open, load, discharge, and close events, combined. p i be port p ∈ P identified at event i ∈ E fg , Z = {1, 2, 3, 4} be an index representing two combined positions: 'pass or bypass Suez or Panama Canal' as alternative route position, and 'laden or ballast' as ship load position. Z element of '1' represents ship passing canal while in laden position, '2' represents ship bypassing canal while in laden position, '3' represents ship passing canal while in ballast position, and '4' represents ship bypassing canal while in ballast position. p k ijz be the gross profit earned by ship k ∈ S on transport link ij while in position z ∈ Z . Gross profit equals freight plus demurrage (based on reversible or irreversible calculation), minus cooling/heating cost of cargo r ∈ Q at i ∈ L , minus handling cost of cargo r ∈ Q at i ∈ E , minus dispatch (based on reversible or irreversible calculation), minus port dues of port p ∈ P at i ∈ E f , where p i = p j , and minus canal/strait dues and fuel consumption of main engine when sailing transport link ij while in position z ∈ Z , where p i = p j , T k g be voyage close day of ship k ∈ S, T k i+ be the delayed days of ship k ∈ S , when it arrives later than the laycan close date at event i ∈ E, C k i+ be the delayed penalty of ship k ∈ S , when it arrives later than the laycan close date at event i ∈ E, T k s be voyage slack days of ship k ∈ S , when it arrives earlier than the laycan open date, aggregated for all i ∈ E, C k s be voyage slack cost per day of ship k ∈ S , when it arrives earlier than the laycan open date, C k g be the cost of fuel consumption of auxiliary engine per day plus daily fixed cost of ship k ∈ S, C k 0 be voyage fixed cost of ship k ∈ S , not considered elsewhere, x k ijz be the problem decision variable. It equals 1 if ship k ∈ S sails transport link ij while it is in position z ∈ Z , and it equals zero otherwise. If x k ijz = 1 and i ∈ E , cargo r ∈ Q is loaded on board ship k, where i is its loading port, or discharged from the ship if i is its discharging port. Likewise, if x k ijz = 1 and j ∈ E , cargo r ∈ Q is loaded on board ship k, where j is its loading port, or discharged from the ship if j is its discharging port, y i be another problem decision variable, alternative to x k ijz . It equals 1 if x k ijz = 0 for all ships sailing all transport links to pick up cargo r ∈ Q at i ∈ L , and it equals zero otherwise. Cargo r ∈ Q at i ∈ L is transported by a chartered-in ship in this case. Variable y i is introduced to represent the possibility of carrying a cargo at event i by a chartered-in ship rather than the owned ships, where y i = 1 in this case. If this happens, all the variables representing the possibility of carrying the cargo by the owned ships should equal to zero. For the chartered-in ship, let P i be its voyage gross profit, t i be its voyage time, C i0 be its voyage fixed cost, and t i0 be its voyage fixed time. Each one of these parameters is to have a value ≠ 0 if the chartered-in ship is taken as an alternative and a value = 0 otherwise, It is required to maximize the sum of voyage gross profit per day for all ships, given by:

Subject to:
Flow constraints Using the above-mentioned denotations, the flow constraints can be formulated as follows: -The flow constraints, which restrict the flow of transport links for each ship, originating from open event, to only one link at most, given by: -Flow constraints, which restrict the flow of transport links for each ship towards event e ∈ E to be equal to the flow of transport links outward from this event, given by: -Flow constraints, which restrict the flow of transport links for each ship towards load event l ∈ L of cargo r ∈ Q to be equal to the flow of transport links towards discharging event d ∈ D of same cargo, given by: (2) j∈Eg z∈Z i∈Ef z∈Z x k iez = j∈Eg z∈Z x k ejz , e ∈ E, and k ∈ S, i∈Ef z∈Z x k ilz = i∈E z∈Z x k idz , l ∈ L, d ∈ D, l and d are of same cargo r ∈ Q and, k ∈ S, El Noshokaty J. shipp. trd. (2021) 6:17 -Flow constraints, which prohibit the flow of transport link of each ship in two opposite directions, given by: -Flow constraints, which restricts the flow of transport link of each ship passing by the en-route bunkering port to only one link (optional): -Flow constraints, which restrict the flow of transport links for ship k ∈ S towards load event l ∈ L of cargo r ∈ Q to be equal to one if the cargo is booked and be carried by this ship, given by: -Flow constraints, which restrict the flow of transport links for ship k ∈ S towards discharging event d ∈ D of cargo r ∈ Q to one if the cargo is already carried by this ship, given by: -Flow constraints, which restrict the flow of transport links of all ships towards loading event l ∈ L of cargo r ∈ Q plus their alternative decision of acquiring a charter-in ship, to only one at most, given by:

Capacity constraints
Let: w i be weight of cargo r ∈ Q at event i ∈ E , in mt, v i be volume of cargo r ∈ Q at event i ∈ E , in cum (if non-container), n i be number of TEU of cargo r ∈ Q at event i ∈ E (if container), W k i be the remaining dwt capacity of ship k ∈ S after load or discharge of cargo r ∈ Q at event i ∈ E , in mt, W k 0 be the min weight remaining on board ship k ∈ S which keeps the ship in laden position, V k i be the remaining volume capacity of ship k ∈ S after load or discharge of cargo r ∈ Q at event i ∈ E , in cum (if non-container), N k i be the remaining TEU capacity of ship k ∈ S . after load or discharge of cargo r ∈ Q . at event i ∈ E (if container), i∈Ef j∈Eg z∈Z x k ijz = 1, k ∈ S, where link i,j passes by the en -route bunkering port, i∈Ef z∈Z x k ilz = 1, l ∈ L, l is of same cargo r ∈ Q, and k ∈ S, i∈E z∈Z x k idz = 1, d ∈ D, d is of same cargo r ∈ Q, and k ∈ S, k∈S i∈Ef z∈Z x k ilz + h l y l ≤ 1, l ∈ L, h l = 1 if y l is taken as an alternative decision and h l = 0 otherwise. W k be the dead weight capacity of ship k ∈ S, V k be the volume capacity of ship k ∈ S (if non-container), N k be the TEU capacity of ship k ∈ S container), Using the above-mentioned denotations, the capacity constraints can be formulated as follows: -Load remaining weight constraints which restrict remaining weight on board each ship at end event j ∈ E to be at least equal to remaining weight at start event i ∈ L of any transport link minus weight of cargo r ∈ Q at i ∈ L, given by: Constraints (10) can be re-written as follows: where M is a large number. So W k j ≥ W k i − w i z∈Z x k ijz will hold true only when z∈Z x k ijz = 1.
-Load remaining volume constraints, which restrict remaining volume on board each non-container ship at end event j ∈ E to be at least equal to remaining volume at start event i ∈ L of any transport link minus volume of cargo r ∈ Q at event i ∈ L given by: -Load remaining TEU constraints, which restrict remaining TEU on board each container ship at end event j ∈ E . to be at least equal to remaining TEU at start event i ∈ L of any transport link minus TEU of cargo r ∈ Q at event i ∈ L given by: -Discharge remaining weight constraints, which restrict remaining weight on board each ship at end event j ∈ E to be at least equal to remaining weight at start event i ∈ D of any transport link plus weight of cargo r ∈ Q at event i ∈ D, given by: -Discharge remaining volume constraints, which restrict remaining volume on board each non-container ship at end event j ∈ E to be at least equal to remaining volume at start event i ∈ D of any transport link plus volume of cargo r ∈ Q at event i ∈ D, given by: El Noshokaty J. shipp. trd. (2021) 6:17 -Discharge remaining TEU constraints, which restrict remaining TEU on board each container ship at end event j ∈ E to be at least equal to remaining TEU at start event i ∈ D of any transport link plus TEU of cargo r ∈ Q at event i ∈ D, given by: -Weight capacity constraints, which restrict remaining weight on board each ship after discharge of all cargoes at, end event g ∈ G so that it does not exceed ship dwt capacity, given by: -Volume capacity constraints, which restrict remaining volume on board each non-container, ship after discharge of all cargoes at end event g ∈ G so that it does not exceed ship volume capacity, given by: -TEU capacity constraints, which restrict remaining TEU on board each container ship after discharge of all cargoes at, end event g ∈ G so that it does not exceed ship TEU capacity, given by: -Laden-or-ballast load position constraints which restricts ship load position to either laden or ballast. Ship is assumed to be in laden position on transport link ij if i ∈ L , and is considered so if i ∈ D and remaining weight on board the ship at this event is greater or equal to the min remaining weight W k 0 , which is given by:

Time constraints
Let: a i be laycan open day of cargo r ∈ Q at event i ∈ E, b i be laycan close day of cargo r ∈ Q at event i ∈ E, t k i be the number of days taken to handle cargo r ∈ Q at event i ∈ E by ship k ∈ S plus waiting days at port p ∈ P at event i ∈ E, t k ijz be the number of days taken to sail the transport link from event i ∈ E f to event j ∈ E g by ship k ∈ Swhile it is in position z ∈ Z , plus waiting days at sea, where p i = p j , T k i be the arrival day of ship k ∈ S at event i ∈ E fg , assuming T k f = 0, T k 0 be the voyage fixed days of ship k ∈ S , not considered elsewhere, T k be the total allowable days of ship k ∈ S, N k j ≥ N k i + n i z∈Z x k ijz , i ∈ D, j ∈ E, and k ∈ S, where z∈Z x k ijz = 1, (16) W k i ≥ W k , i ∈ D, and k ∈ S, where z=3,4 x k igz = 1, g ∈ G, (17) V k i ≥ V k , i ∈ D, and k ∈ S, where z=3,4 x k igz = 1, g ∈ G, (18) N k i ≥ N k , i ∈ D, and k ∈ S, where z=3,4 x k igz = 1, g ∈ G, (19) W k i ≥ W k 0 , i ∈ D, and k ∈ S, where z=1,2 x k ijz = 1, j ∈ E, mathematical model The new stochastic version of the cargo soft time windows mentioned in "Appendix 1"formula (22) and (23), can be described using the following simple denotations, assuming one ship and one cargo: For either the cargo loading or discharging ports, the arrival time of this ship is unconfirmed and assumed to be a random variable having a known probability distribution. The probability distribution is the marginal distribution of the arrival time. Let: A be the random laycan open date, either for the cargo loading or discharging port, expressed in days, a be the deterministic-equivalent laycan open date, either for the cargo loading or discharging port, expressed in days, B be the random laycan close date, either for the cargo loading or discharging port, expressed in days, b be the deterministic-equivalent laycan close date, either for the cargo loading or discharging port, expressed in days, T b+ be the late days when the ship arrives after B, P a be the least probability the ship owner stipulates the ship arrives after A, P b be the least probability the ship owner stipulates the ship arrives before B + T b+ , y be the ship arrival date, expressed in days.
In the stochastic model, the probability of the ship arriving at date A or after; Prob. y ≥ A , must be greater or equal to P a , as indicated by: Whereas, the probability of the ship arriving at date B + T b+ or before; Prob. y ≤ B + T b+ , must be greater or equal to P b , as indicated by: The stochastic constraint (29) and (30) are considered when the ship arrival time A or B is a random variable and P a or P b is a probability value.
To elaborate more, take constraint (30) as an example. It says: the probability of arriving at or before the laycan close date must be at least equal to P b . If at B = b the descending cumulative probability of ship arrival time has a value just greater or equal to P b, then (30) can be expressed as: (28) z∈Z x k ijz ≤ 1, i ∈ E f , j ∈ E g , k ∈ S, y i = 0, 1, i ∈ L.