Abstract
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 grossprofitperday accompanied with realistic shipping elements embedded into decision support systems known as shipping optimization systems (SOS). The chanceconstraint programming and the modified version of the Dantzig–Wolfe decomposition principle known as blockangular 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 profitperday better than trying to arrive on time by varying ship speed or being within a nonstochastic shipping context.
Introduction
Ship routing and scheduling problems in a trampshipping environment have been discussed and formulated by Operations Research models for many years. The purpose of these problems was to schedule the transport of cargoes to a fleet of cargo ships, where it is to find the cargoes to be carried by each ship and the route to be followed towards the ports of these cargoes. Generally, there is a time window (laycan) for each cargo when it is ready for loading and another time window when it is ready for discharge. Until recently, the research papers have formulated a cargo hard time window constraint where the ship must stick to this time or otherwise the cargo will not be considered for transport by this ship. Then, research papers started to formulate a cargo soft time window constraint where the ship may violate this time for a certain cost or penalty.
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 chanceconstraint 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 cargoshipvoyage scheduling, shiptotradearea allocation, and newship appraisal. The cargoshipvoyage scheduling model uses a stochastic grossprofitperday objective accompanied with realistic shipping elements. This objective, due to its perday 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 chanceconstraint programming and a modified version of the Dantzig–Wolfe Decomposition Principle (Dantzig and Wolfe 1960) known as BlockAngular 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 shipscheduling 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 NonLinear 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 (VRPTWST). In this variant of the classic VRPTW, the service times are random variables. They consider a chanceconstrained program to model the VRPTWST 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 abovementioned research papers:
 (a)The cargo quantity is not considered as random variable, with or without the soft time windows. As a result, the notyetoffered 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 cargoshipvoyage 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 trampshipping problem. Examples of the shipping elements include a grossprofitperday objective, demurrage and dispatch terms, laden and ballast fuel consumptions, passing or (and) bypassing canals, enroute 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 grossprofitperday 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).
 (c)Lightening of shipload via SUMED pipeline in Suez Canal.
 (d)Lightening of shipload via ‘daughtership arrangement’ in Suez Canal or Panama Canal.
 (e)Time charter to be taken as an alternative venture to voyage charter.
 (f)The ship has the option, if equipped enough and if permitted by the ship operator, 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 charteredin 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 enroute 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 abovementioned 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 pickup a notyetoffered 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 deterministicequivalent ones using the ChanceConstraint programming (Charnes and Cooper 1959), as described in “Appendix 2”.
 Step 2: Apply the stateoftheart BlockAngular Linear Ratio Programming algorithm (El Noshokaty 2014). In this algorithm, the problem mathematically takes a blockangular 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 integerprogramming 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 nondemise 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 notyetoffered (unconfirmed). Relevant data on cargo is shown in Table 3. For the notyetoffered 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 deterministicequivalent quantity, freight, and laycan for each notyetoffered cargo as indicated in Table 6. Then, following step 2, SOS applies the BlockAngular 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:
 (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 profitperday 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 notyetoffered cargoes from being represented to see whether softening the laycan in a nonstochastic context has a better or worse effect over the gross profitperday 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 profitperday. 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 profitperday 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 grossprofitperday 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 profitperday better than varying ship speed. This improvement may not be equally achieved in a nonstochastic shipping context.
Using SOS as a decision support system, where the new model is builtin and transparent to the user, enables the ship owner to interact with SOS to perform whatif and sensitivity analysis. The analysis shows the effect of changing different shipping elements on the gross profitperday.
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.‘’
Availability of data and material
Nothing to declare.
References

Charnes A, Cooper W (1959) Chanceconstraint programming. Manag Sci 6(1):1–140

Christiansen M, Fagerholt K (2002) Robust ship scheduling with multiple time windows. Naval Res Logist 49(6):611–625

Christiansen M, Fagerholt K, Ronen D (2004) Ship routing and scheduling: status and perspective. Transp Sci 34(1):1–18

Daniel A (2006) Routing and scheduling with time windows: models and algorithms for tramp sea cargoes and rail carblocks, a PhD thesis, the School of Industrial and Systems Engineering, Georgia Institute of Technology, Atlanta, USA

Dantzig G, Wolfe P (1960) Decomposition principle for linear programs. Oper Res 8(1):101–111

El Noshokaty S (2014) Blockangular linear ratio programmes. Int J Oper Res 19(3):338–357

El Noshokaty S (2017) Shipping optimisation systems (SOS): tramp optimisation perspective. J Ship Trade. https://doi.org/10.1186/s410720170021y

El Noshokaty S (2020) Ship routing and scheduling systems: forecasting, upscaling and viability. Marit Bus Rev. https://doi.org/10.1108/MABR0420200027

Errico F, Desaulniers G, Gendreau M, Rei W, Rousseau L (2018) The vehicle routing problem with hard time windows and stochastic service times. EURO J Transp Logist 7(3):223–251

Fagerholt K (2001) Ship scheduling with soft time windows—an optimisation based approach. Eur J Oper Res 131:559–571

Guan F, Peng Z, Chen C, Gua Z, Yu S (2017) Fleet routing and scheduling problem based on constraints of chance. Adv Mech Eng 9(12):1–12

Keskin M, Tabatabaei R (2019) Electric vehicle routing problem with time windows and stochastic waiting times at recharging stations. In: Proceedings of the 2019 winter simulation conference, Sabanci University, Istanbul, Turkey

Koskosidis Y, Powell W, Solomon M (1992) An optimizationbased heuristic for vehicle routing and scheduling with soft time window constraints. Transp Sci 26(2):69–85

Kritikos M, Ioannou G (2010) The balanced cargo vehicle routing problem with time windows. Int J Prod Econ 123:42–51

Lui M, Zhang C, Wu Q, Meng B (2021) Vehicle routing problem with soft time windows of cargo transport O2O platforms. Int J Simul Model 20(2):351–362

Nhieu L, Ho P, Pham T (2018) The capacitated vehicle routing problem with time windows and split delivery integrated with information management system for cargo delivery service in Ho Chi Minh City: a case study of Rong Thien Logistics Company, conference: international congress on logistics and SCM Systems at Ho Chi Minh City, Vietnam

Psaraftis HN (2017) Ship routing and scheduling: the cart before the horse conjecture. Marit Econ Logist 19(2):66. https://doi.org/10.1057/s412780170080x

Tas D, Dellaert N, Woensel T, Kok T (2013) Vehicle routing problem with stochastic travel times including soft time windows and service costs. Comput Oper Res 40:214–224
Acknowledgements
Nothing to declare.
Funding
Nothing to declare.
Ethics declarations
Competing interests
The author declares that no competing interests.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix 1: SOS Voyager mathematical model
In this model, it is assumed that each ship starts its voyage at homeport (open event) and returns to its homeport (close event). In this model let:
 S={1,2,3,…,s0}S={1,2,3,…,s0} be the set of ships,
 P={1,2,3,…,p0}P={1,2,3,…,p0} be the set of ports of a working trade area,
 Q={1,2,3,…,q0}Q={1,2,3,…,q0} 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∈Qr∈Q has a loading event and a discharging event,
 L={1,2,3,…,l0}L={1,2,3,…,l0} be a set of loading events, one for each cargo,
 D={1,2,3,…,d0}D={1,2,3,…,d0} be a set of discharging events, one for each cargo,
 F = {f} be a oneelement set of open event f.
 G = {g} be a oneelement set of close event g,
 E=L∪DE=L∪D be the set of load and discharge events, combined,
 Ef=E∪FEf=E∪F be the set of open, load, and discharge events, combined,
 Eg=E∪GEg=E∪G be the set of load, discharge, and close events, combined,
 Efg=Ef∪GEfg=Ef∪G be the set of open, load, discharge, and close events, combined.
 p_{i} be port p∈Pp∈P identified at event i∈Efgi∈Efg,
 Z={1,2,3,4}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.
 pkijzpijzk be the gross profit earned by ship k∈Sk∈S on transport link ij while in position z∈Zz∈Z. Gross profit equals freight plus demurrage (based on reversible or irreversible calculation), minus cooling/heating cost of cargo r∈Qr∈Q at i∈Li∈L, minus handling cost of cargo r∈Qr∈Q at i∈Ei∈E, minus dispatch (based on reversible or irreversible calculation), minus port dues of port p∈Pp∈P at i∈Efi∈Ef, where pi≠pjpi≠pj, and minus canal/strait dues and fuel consumption of main engine when sailing transport link ij while in position z∈Zz∈Z, where pi≠pjpi≠pj,
 TkgTgk be voyage close day of ship k∈Sk∈S,
 Tki+Ti+k be the delayed days of ship k∈Sk∈S, when it arrives later than the laycan close date at event i∈Ei∈E,
 Cki+Ci+k be the delayed penalty of ship k∈Sk∈S, when it arrives later than the laycan close date at event i∈Ei∈E,
 TksTsk be voyage slack days of ship k∈Sk∈S, when it arrives earlier than the laycan open date, aggregated for all i∈Ei∈E,
 CksCsk be voyage slack cost per day of ship k∈Sk∈S, when it arrives earlier than the laycan open date,
 CkgCgk be the cost of fuel consumption of auxiliary engine per day plus daily fixed cost of ship k∈Sk∈S,
 Ck0C0k be voyage fixed cost of ship k∈Sk∈S, not considered elsewhere,
 xkijzxijzk be the problem decision variable. It equals 1 if ship k∈Sk∈S sails transport link ij while it is in position z∈Zz∈Z, and it equals zero otherwise. If xkijz=1xijzk=1 and i∈Ei∈E, cargo r∈Qr∈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 xkijz=1xijzk=1 and j∈Ej∈E, cargo r∈Qr∈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 xkijzxijzk. It equals 1 if xkijz=0xijzk=0 for all ships sailing all transport links to pick up cargo r∈Qr∈Q at i∈Li∈L, and it equals zero otherwise. Cargo r∈Qr∈Q at i∈Li∈L is transported by a charteredin ship in this case. Variable y_{i} is introduced to represent the possibility of carrying a cargo at event i by a charteredin 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 charteredin 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 charteredin 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 abovementioned 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∈Ee∈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∈Ll∈L of cargo r∈Qr∈Q to be equal to the flow of transport links towards discharging event d∈Dd∈D of same cargo, given by:
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 enroute bunkering port to only one link (optional):
Flow constraints, which restrict the flow of transport links for ship k∈Sk∈S towards load event l∈Ll∈L of cargo r∈Qr∈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∈Sk∈S towards discharging event d∈Dd∈D of cargo r∈Qr∈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∈Ll∈L of cargo r∈Qr∈Q plus their alternative decision of acquiring a charterin ship, to only one at most, given by:
Capacity constraints
Let:
 w_{i} be weight of cargo r∈Qr∈Q at event i∈Ei∈E, in mt,
 v_{i} be volume of cargo r∈Qr∈Q at event i∈Ei∈E, in cum (if noncontainer),
 n_{i} be number of TEU of cargo r∈Qr∈Q at event i∈Ei∈E (if container),
 WkiWik be the remaining dwt capacity of ship k∈Sk∈S after load or discharge of cargo r∈Qr∈Q at event i∈Ei∈E, in mt,
 Wk0W0k be the min weight remaining on board ship k∈Sk∈S which keeps the ship in laden position,
 VkiVik be the remaining volume capacity of ship k∈Sk∈S after load or discharge of cargo r∈Qr∈Q at event i∈Ei∈E, in cum (if noncontainer),
 NkiNik be the remaining TEU capacity of ship k∈Sk∈S. after load or discharge of cargo r∈Qr∈Q. at event i∈Ei∈E (if container),
 W_{k} be the dead weight capacity of ship k∈Sk∈S,
 V_{k} be the volume capacity of ship k∈Sk∈S (if noncontainer),
 N^{k} be the TEU capacity of ship k∈Sk∈S container),
Using the abovementioned 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∈Ej∈E to be at least equal to remaining weight at start event i∈Li∈L of any transport link minus weight of cargo r∈Qr∈Q at i∈L,i∈L, given by:
Constraints (10) can be rewritten as follows:
where M is a large number. So Wkj≥Wki−wi∑z∈ZxkijzWjk≥Wik−wi∑z∈Zxijzk will hold true only when ∑z∈Zxkijz=1∑z∈Zxijzk=1.
Load remaining volume constraints, which restrict remaining volume on board each noncontainer ship at end event j∈Ej∈E to be at least equal to remaining volume at start event i∈Li∈L of any transport link minus volume of cargo r∈Qr∈Q at event i∈Li∈L given by:
Load remaining TEU constraints, which restrict remaining TEU on board each container ship at end event j∈Ej∈E. to be at least equal to remaining TEU at start event i∈Li∈L of any transport link minus TEU of cargo r∈Qr∈Q at event i∈Li∈L given by:
Discharge remaining weight constraints, which restrict remaining weight on board each ship at end event j∈Ej∈E to be at least equal to remaining weight at start event i∈Di∈D of any transport link plus weight of cargo r∈Qr∈Q at event i∈D,i∈D, given by:
Discharge remaining volume constraints, which restrict remaining volume on board each noncontainer ship at end event j∈Ej∈E to be at least equal to remaining volume at start event i∈Di∈D of any transport link plus volume of cargo r∈Qr∈Q at event i∈D,i∈D, given by:
Discharge remaining TEU constraints, which restrict remaining TEU on board each container ship at end event j∈Ej∈E to be at least equal to remaining TEU at start event i∈Di∈D of any transport link plus TEU of cargo r∈Qr∈Q at event i∈D,i∈D, given by:
Weight capacity constraints, which restrict remaining weight on board each ship after discharge of all cargoes at, end event g∈Gg∈G so that it does not exceed ship dwt capacity, given by:
Volume capacity constraints, which restrict remaining volume on board each noncontainer, ship after discharge of all cargoes at end event g∈Gg∈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∈Gg∈G so that it does not exceed ship TEU capacity, given by:
Ladenorballast 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∈Li∈L, and is considered so if i∈Di∈D and remaining weight on board the ship at this event is greater or equal to the min remaining weight Wk0W0k, which is given by:
Time constraints
Let:
 a_{i} be laycan open day of cargo r∈Qr∈Q at event i∈Ei∈E,
 b_{i} be laycan close day of cargo r∈Qr∈Q at event i∈Ei∈E,
 tkitik be the number of days taken to handle cargo r∈Qr∈Q at event i∈Ei∈E by ship k∈Sk∈S plus waiting days at port p∈Pp∈P at event i∈Ei∈E,
 tkijztijzk be the number of days taken to sail the transport link from event i∈Efi∈Ef to event j∈Egj∈Eg by ship k∈Sk∈S while it is in position z∈Zz∈Z, plus waiting days at sea, where pi≠pjpi≠pj,
 TkiTik be the arrival day of ship k∈Sk∈S at event i∈Efgi∈Efg, assuming Tkf=0Tfk=0,
 Tk0T0k be the voyage fixed days of ship k∈Sk∈S, not considered elsewhere,
 T^{k} be the total allowable days of ship k∈Sk∈S,
Using the abovementioned denotations, the time constraints can be formulated as follows:
Event arrival time constraints which restrict arrival day at end event j∈Egj∈Eg to be at least equal to arrival day at start event i∈Efi∈Ef of any transport link plus handling days of cargo r∈Qr∈Q at i∈Efi∈Ef, waiting days in port p∈Pp∈P at i∈Efi∈Ef, sailing days on link ij, and waiting days at sea, given by:
Event time precedence constraints, which control arrival times, so that arrival day at discharge event d∈Dd∈D succeeds arrival day at load event l∈Ll∈L of cargo r∈Qr∈Q, given by:
Time window constraints, which restrict ship arrival day at event j∈Ej∈E so that it does not violate cargo laycan open and close days at this event, given by:
Closing time constraints which restrict final closing day for each ship so that it equals total cargo handling days and waiting days in port, sailing days and waiting days at sea, waiting days before cargo open day, and voyage fixed days, given by:
Allowable closing time constraints, which restrict closing day for each ship to a maximum allowable day, given by:
Nonnegativity and integrality constraints
Nonnegativity constraints of continuous variables, given by:
integrality constraints of integer variables, given by:
Appendix 2: The new stochastic cargo soft time windows of SOS Voyager 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 deterministicequivalent 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 deterministicequivalent 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}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+Tb+}Prob.{y≤B+Tb+}_{,} 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:
Constraint (31) is the deterministicequivalent constraint to the one given by the deterministic model, where b is the deterministic laycan close date. The difference between them is that b is the confirmed value of the laycan close date, while b in (31) is the deterministicequivalent value of the random laycan close date, as described earlier. To illustrate, assume for discrete arrival time B, Prob. {B < 5 days} = 0.0, Prob. {B = 5 days} = 0.2, Prob. {B = 10 days} = 0.5, Prob. {B = 15 days} = 0.3, and Prob. {B > 15 days} = 0.0. According to the additive rule of the probability theory, the arrival time descending cumulative probability distribution reads: Prob. {B ≥ 5 days} = 0.2 + 0.5 + 0.3 + 0.0 = 1.0, 0.8 ≤ Prob. {B ≥ 10 days} < 1.0, and 0.3 ≤ Prob. {B ≥ 15 days} < 0.8. Now suppose P_{b} = 0.9. This value falls in second class, which implies a deterministicequivalent arrival time value of 10 days (neither 5 nor 15 days), i.e. at b = 10.
Use the same illustration mentioned above to convert cargo quantities in Table 4 and arrival times in Table 5 to deterministicequivalent quantities and arrival times as shown in Table 6.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.