##### STYLE SWITCHER

Choose Colour style

Opening Hours : Monday to Sundays - 8am to 5pm

25 Apr

April 25, 2021

## 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 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.

## Introduction

Ship routing and scheduling problems in a tramp-shipping 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 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:

1. (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.
2. (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.
3. (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-profit-per-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 20172020.)

## 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:

1. (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.
2. (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).
3. (c)Lightening of shipload via SUMED pipeline in Suez Canal.
4. (d)Lightening of shipload via ‘daughter-ship arrangement’ in Suez Canal or Panama Canal.
5. (e)Time charter to be taken as an alternative venture to voyage charter.
6. (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.
7. (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.
8. (h)A ship may be chartered-in to compete in carrying a certain cargo.
9. (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.
10. (j)A differentiation is made to whether the ship is in laden or ballast condition, so that the sea fuel consumption is calculated accurately.
11. (k)Different open and close ports and dates are specified for each ship.
12. (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).
15. (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.
16. (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.
17. (q)The ship has the option to carry one cargo or multiple cargoes at the same time.
19. (s)The ship starting and ending ports are restricted to the ports indicated by the schedule or the last calling ports.
20. (t)Weather condition as an element affecting ship speed.
21. (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.
22. (v)The ship starting and ending dates of operation must be within a given schedule date window.
23. (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.
24. (x)The en-route bunkering of the ship is allowed when the bunker price from an en-route bunkering port will reduce the operating cost.
25. (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:

1. (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-yet-offered 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:

1. (a)Sidi Kirear has a more promising result if compared to the other two ships,
2. (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’,
3. (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:

1. (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.
2. (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.
3. (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 profit-per-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.‘’

## Availability of data and material

Nothing to declare.

## References

• Charnes A, Cooper W (1959) Chance-constraint 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 car-blocks, 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) Block-angular 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/s41072-017-0021-y

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

• 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 optimization-based 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/s41278-017-0080-x

• 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.

## Author information

### Contributions

This author read and approved the final manuscript.

### Authors’ Information

The author received higher diplomas and a master’s degree in Operations Research, Statistical methods, and Management Systems from Cairo University and American University in Cairo (AUC), Egypt, and a Ph.D. in Operations Research in shipping from the University of Wales Institute of Science and Technology (UWIST), UK.

The author has a career path in computers and information systems in both business in the National Cash Register (NCR) and education in the Arab Academy for Science and Technology and Maritime Transport (AASTMT), Egypt. He has been teaching—as a visiting professor—at the Central Michigan University (CMU), USA. He has several publications in Operations Research and its applications in shipping of cargo in maritime transport.

The author is now Professor of Information Systems. His primary interest is in developing OR-based information systems in cargo transportation.

### Corresponding author

Correspondence to Said El Noshokaty.

## Ethics declarations

### Competing interests

The author declares that no competing interests.

### 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 rQr∈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 one-element set of open event f.
• G = {g} be a one-element set of close event g,
• E=LDE=L∪D be the set of load and discharge events, combined,
• Ef=EFEf=E∪F be the set of open, load, and discharge events, combined,
• Eg=EGEg=E∪G be the set of load, discharge, and close events, combined,
• Efg=EfGEfg=Ef∪G be the set of open, load, discharge, and close events, combined.
• pi be port pPp∈P identified at event iEfgi∈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 kSk∈S on transport link ij while in position zZz∈Z. Gross profit equals freight plus demurrage (based on reversible or irreversible calculation), minus cooling/heating cost of cargo rQr∈Q at iLi∈L, minus handling cost of cargo rQr∈Q at iEi∈E, minus dispatch (based on reversible or irreversible calculation), minus port dues of port pPp∈P at iEfi∈Ef, where pipjpi≠pj, and minus canal/strait dues and fuel consumption of main engine when sailing transport link ij while in position zZz∈Z, where pipjpi≠pj,
• TkgTgk be voyage close day of ship kSk∈S,
• Tki+Ti+k be the delayed days of ship kSk∈S, when it arrives later than the laycan close date at event iEi∈E,
• Cki+Ci+k be the delayed penalty of ship kSk∈S, when it arrives later than the laycan close date at event iEi∈E,
• TksTsk be voyage slack days of ship kSk∈S, when it arrives earlier than the laycan open date, aggregated for all iEi∈E,
• CksCsk be voyage slack cost per day of ship kSk∈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 kSk∈S,
• Ck0C0k be voyage fixed cost of ship kSk∈S, not considered elsewhere,
• xkijzxijzk be the problem decision variable. It equals 1 if ship kSk∈S sails transport link ij while it is in position zZz∈Z, and it equals zero otherwise. If xkijz=1xijzk=1 and iEi∈E, cargo rQr∈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 jEj∈E, cargo rQr∈Q is loaded on board ship k, where j is its loading port, or discharged from the ship if j is its discharging port,
• yi 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 rQr∈Q at iLi∈L, and it equals zero otherwise. Cargo rQr∈Q at iLi∈L is transported by a chartered-in ship in this case. Variable yi is introduced to represent the possibility of carrying a cargo at event i by a chartered-in ship rather than the owned ships, where yi = 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 Pi be its voyage gross profit, ti be its voyage time, Ci0 be its voyage fixed cost, and ti0 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:

G=kS(iEfjEgzZpkijzxkijziECki+Tki+CksTksCkgTkgCk0)/Tkg+iL(PiyiCi0)/(tiyi+ti0).G=∑k∈S⁡(∑i∈Ef⁡∑j∈Eg⁡∑z∈Z⁡pijzkxijzk−∑i∈E⁡Ci+kTi+k−CskTsk−CgkTgk−C0k)/Tgk+∑i∈L⁡(Piyi−Ci0)/(tiyi+ti0).
(1)

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:

jEgzZxkfjz1,kS,∑j∈Eg⁡∑z∈Z⁡xfjzk≤1,k∈S,
(2)

-Flow constraints, which restrict the flow of transport links for each ship towards event eEe∈E to be equal to the flow of transport links outward from this event, given by:

iEfzZxkiez=jEgzZxkejz,eE,andkS,∑i∈Ef⁡∑z∈Z⁡xiezk=∑j∈Eg⁡∑z∈Z⁡xejzk,e∈E,andk∈S,
(3)

-Flow constraints, which restrict the flow of transport links for each ship towards load event lLl∈L of cargo rQr∈Q to be equal to the flow of transport links towards discharging event dDd∈D of same cargo, given by:

iEfzZxkilz=iEzZxkidz,lL,dD,landdareofsamecargorQand,kS,∑i∈Ef⁡∑z∈Z⁡xilzk=∑i∈E⁡∑z∈Z⁡xidzk,l∈L,d∈D,landdareofsamecargor∈Qand,k∈S,
(4)

-Flow constraints, which prohibit the flow of transport link of each ship in two opposite directions, given by:

zZxkijz+zZxkjiz1,i,jE,andkS,∑z∈Z⁡xijzk+∑z∈Z⁡xjizk≤1,i,j∈E,andk∈S,
(5)

-Flow constraints, which restricts the flow of transport link of each ship passing by the en-route bunkering port to only one link (optional):

(6)

-Flow constraints, which restrict the flow of transport links for ship kSk∈S towards load event lLl∈L of cargo rQr∈Q to be equal to one if the cargo is booked and be carried by this ship, given by:

iEfzZxkilz=1,lL,lisofsamecargorQ,andkS,∑i∈Ef⁡∑z∈Z⁡xilzk=1,l∈L,lisofsamecargor∈Q,andk∈S,
(7)

-Flow constraints, which restrict the flow of transport links for ship kSk∈S towards discharging event dDd∈D of cargo rQr∈Q to one if the cargo is already carried by this ship, given by:

iEzZxkidz=1,dD,disofsamecargorQ,andkS,∑i∈E⁡∑z∈Z⁡xidzk=1,d∈D,disofsamecargor∈Q,andk∈S,
(8)

-Flow constraints, which restrict the flow of transport links of all ships towards loading event lLl∈L of cargo rQr∈Q plus their alternative decision of acquiring a charter-in ship, to only one at most, given by:

kSiEfzZxkilz+hlyl1,lL,hl=1ifylistakenasanalternativedecisionandhl=0otherwise.∑k∈S⁡∑i∈Ef⁡∑z∈Z⁡xilzk+hlyl≤1,l∈L,hl=1ifylistakenasanalternativedecisionandhl=0otherwise.
(9)

Capacity constraints

Let:

• wi be weight of cargo rQr∈Q at event iEi∈E, in mt,
• vi be volume of cargo rQr∈Q at event iEi∈E, in cum (if non-container),
• ni be number of TEU of cargo rQr∈Q at event iEi∈E (if container),
• WkiWik be the remaining dwt capacity of ship kSk∈S after load or discharge of cargo rQr∈Q at event iEi∈E, in mt,
• Wk0W0k be the min weight remaining on board ship kSk∈S which keeps the ship in laden position,
• VkiVik be the remaining volume capacity of ship kSk∈S after load or discharge of cargo rQr∈Q at event iEi∈E, in cum (if non-container),
• NkiNik be the remaining TEU capacity of ship kSk∈S. after load or discharge of cargo rQr∈Q. at event iEi∈E (if container),
• Wk be the dead weight capacity of ship kSk∈S,
• Vk be the volume capacity of ship kSk∈S (if non-container),
• Nk be the TEU capacity of ship kSk∈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 jEj∈E to be at least equal to remaining weight at start event iLi∈L of any transport link minus weight of cargo rQr∈Q at iL,i∈L, given by:

WkjWkiwizZxkijz,iL,jE,andkS,wherezZxkijz=1,Wjk≥Wik−wi∑z∈Z⁡xijzk,i∈L,j∈E,andk∈S,where∑z∈Z⁡xijzk=1,
(10)

Constraints (10) can be re-written as follows:

M(1zZxkijz)+WkjWkiwizZxkijz,iL,jEandkS,M(1−∑z∈Z⁡xijzk)+Wjk≥Wik−wi∑z∈Z⁡xijzk,i∈L,j∈Eandk∈S,

where M is a large number. So WkjWkiwizZxkijzWjk≥Wik−wi∑z∈Zxijzk will hold true only when zZxkijz=1∑z∈Zxijzk=1.

-Load remaining volume constraints, which restrict remaining volume on board each non-container ship at end event jEj∈E to be at least equal to remaining volume at start event iLi∈L of any transport link minus volume of cargo rQr∈Q at event iLi∈L given by:

VkjVkivizZxkijz,iL,jE,andkS,wherezZxkijz=1,Vjk≥Vik−vi∑z∈Z⁡xijzk,i∈L,j∈E,andk∈S,where∑z∈Z⁡xijzk=1,
(11)

-Load remaining TEU constraints, which restrict remaining TEU on board each container ship at end event jEj∈E. to be at least equal to remaining TEU at start event iLi∈L of any transport link minus TEU of cargo rQr∈Q at event iLi∈L given by:

NkjNkinizZxkijz,iL,jE,andkS,wherezZxkijz=1,Njk≥Nik−ni∑z∈Z⁡xijzk,i∈L,j∈E,andk∈S,where∑z∈Z⁡xijzk=1,
(12)

-Discharge remaining weight constraints, which restrict remaining weight on board each ship at end event jEj∈E to be at least equal to remaining weight at start event iDi∈D of any transport link plus weight of cargo rQr∈Q at event iD,i∈D, given by:

WkjWki+wizZxkijz,iD,jE,andkS,wherezZxkijz=1,Wjk≥Wik+wi∑z∈Z⁡xijzk,i∈D,j∈E,andk∈S,where∑z∈Z⁡xijzk=1,
(13)

-Discharge remaining volume constraints, which restrict remaining volume on board each non-container ship at end event jEj∈E to be at least equal to remaining volume at start event iDi∈D of any transport link plus volume of cargo rQr∈Q at event iD,i∈D, given by:

VkjVki+vizZxkijz,iD,jE,andkS,wherezZxkijz=1,Vjk≥Vik+vi∑z∈Z⁡xijzk,i∈D,j∈E,andk∈S,where∑z∈Z⁡xijzk=1,
(14)

-Discharge remaining TEU constraints, which restrict remaining TEU on board each container ship at end event jEj∈E to be at least equal to remaining TEU at start event iDi∈D of any transport link plus TEU of cargo rQr∈Q at event iD,i∈D, given by:

NkjNki+nizZxkijz,iD,jE,andkS,wherezZxkijz=1,Njk≥Nik+ni∑z∈Z⁡xijzk,i∈D,j∈E,andk∈S,where∑z∈Z⁡xijzk=1,
(15)

-Weight capacity constraints, which restrict remaining weight on board each ship after discharge of all cargoes at, end event gGg∈G so that it does not exceed ship dwt capacity, given by:

WkiWk,iD,andkS,wherez=3,4xkigz=1,gG,Wik≥Wk,i∈D,andk∈S,where∑z=3,4xigzk=1,g∈G,
(16)

-Volume capacity constraints, which restrict remaining volume on board each non-container, ship after discharge of all cargoes at end event gGg∈G so that it does not exceed ship volume capacity, given by:

VkiVk,iD,andkS,wherez=3,4xkigz=1,gG,Vik≥Vk,i∈D,andk∈S,where∑z=3,4⁡xigzk=1,g∈G,
(17)

-TEU capacity constraints, which restrict remaining TEU on board each container ship after discharge of all cargoes at, end event gGg∈G so that it does not exceed ship TEU capacity, given by:

NkiNk,iD,andkS,wherez=3,4xkigz=1,gG,Nik≥Nk,i∈D,andk∈S,where∑z=3,4⁡xigzk=1,g∈G,
(18)

-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 iLi∈L, and is considered so if iDi∈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:

WkiWk0,iD,andkS,wherez=1,2xkijz=1,jE,Wik≥W0k,i∈D,andk∈S,where∑z=1,2⁡xijzk=1,j∈E,
(19)

Time constraints

Let:

• ai be laycan open day of cargo rQr∈Q at event iEi∈E,
• bi be laycan close day of cargo rQr∈Q at event iEi∈E,
• tkitik be the number of days taken to handle cargo rQr∈Q at event iEi∈E by ship kSk∈S plus waiting days at port pPp∈P at event iEi∈E,
• tkijztijzk be the number of days taken to sail the transport link from event iEfi∈Ef to event jEgj∈Eg by ship kSk∈S while it is in position zZz∈Z, plus waiting days at sea, where pipjpi≠pj,
• TkiTik be the arrival day of ship kSk∈S at event iEfgi∈Efg, assuming Tkf=0Tfk=0,
• Tk0T0k be the voyage fixed days of ship kSk∈S, not considered elsewhere,
• Tk be the total allowable days of ship kSk∈S,

Using the above-mentioned denotations, the time constraints can be formulated as follows:

-Event arrival time constraints which restrict arrival day at end event jEgj∈Eg to be at least equal to arrival day at start event iEfi∈Ef of any transport link plus handling days of cargo rQr∈Q at iEfi∈Ef, waiting days in port pPp∈P at iEfi∈Ef, sailing days on link ij, and waiting days at sea, given by:

TkjTki+ti+zZtkijzxkijz,iEf,jEg,andkS,wheretkifz=0,andzZxkijz=1,Tjk≥Tik+ti+∑z∈Z⁡tijzkxijzk,i∈Ef,j∈Eg,andk∈S,wheretifzk=0,and∑z∈Z⁡xijzk=1,
(20)

-Event time precedence constraints, which control arrival times, so that arrival day at discharge event dDd∈D succeeds arrival day at load event lLl∈L of cargo rQr∈Q, given by:

TkdTkl,lL,dD,landdareofsamecargorQ,andkS,whereiEzZxkidz=1Tdk≥Tlk,l∈L,d∈D,landdareofsamecargor∈Q,andk∈S,where∑i∈E⁡∑z∈Z⁡xidzk=1
(21)

-Time window constraints, which restrict ship arrival day at event jEj∈E so that it does not violate cargo laycan open and close days at this event, given by:

Tkjaj,jE,andkS,whereiEfzZxkijz=1,Tjk≥aj,j∈E,andk∈S,where∑i∈Ef⁡∑z∈Z⁡xijzk=1,
(22)
Tkjbj+Tkj+,jE,andkS,whereiEfzZxkijz=1,Tjk≤bj+Tj+k,j∈E,andk∈S,where∑i∈Ef⁡∑z∈Z⁡xijzk=1,
(23)

-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:

iEfjEgzZ(tki+tkijz)xkijz+Tks+Tk0=Tkg,kS,∑i∈Ef⁡∑j∈Eg⁡∑z∈Z⁡(tik+tijzk)xijzk+Tsk+T0k=Tgk,k∈S,
(24)

-Allowable closing time constraints, which restrict closing day for each ship to a maximum allowable day, given by:

TkgTk,gG,kS,wherez=3,4xkigz=1andiD,Tgk≤Tk,g∈G,k∈S,where∑z=3,4⁡xigzk=1andi∈D,
(25)

Non-negativity and integrality constraints

-Non-negativity constraints of continuous variables, given by:

Wki,Vki,Nki,Tki0,iEg,kS,Tks0,kS,Wik,Vik,Nik,Tik≥0,i∈Eg,k∈S,Tsk≥0,k∈S,
(26)

-integrality constraints of integer variables, given by:

xkijz=0,1,iEf,jEg,kS,xijzk=0,1,i∈Ef,j∈Eg,k∈S,
(27)
zZxkijz1,iEf,jEg,kS,yi=0,1,iL.∑z∈Z⁡xijzk≤1,i∈Ef,j∈Eg,k∈S,yi=0,1,i∈L.
(28)

### 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 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,
• Tb+ be the late days when the ship arrives after B,
• Pa be the least probability the ship owner stipulates the ship arrives after A,
• Pb be the least probability the ship owner stipulates the ship arrives before B + Tb+,
• 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.{yA}Prob.{y≥A}, must be greater or equal to Pa, as indicated by:

Prob.{yA}Pa,Prob.{y≥A}≥Pa,
(29)

Whereas, the probability of the ship arriving at date B + Tb+ or before; Prob.{yB+Tb+}Prob.{y≤B+Tb+}, must be greater or equal to Pb, as indicated by:

Prob.,{yB+Tb+}PbProb.,{y≤B+Tb+}≥Pb
(30)

The stochastic constraint (29) and (30) are considered when the ship arrival time A or B is a random variable and Pa or Pb 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 Pb. If at B = b the descending cumulative probability of ship arrival time has a value just greater or equal to Pb, then (30) can be expressed as:

yb+Tb+y≤b_+Tb+
(31)

Constraint (31) is the deterministic-equivalent 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 deterministic-equivalent 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 Pb = 0.9. This value falls in second class, which implies a deterministic-equivalent 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 deterministic-equivalent 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/.