Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

There are several transportation systems that can be used to transport containers from one destination to another. Transport over sea is among the various forms of transportation and the one with a greatest growth rate over the last decades. Presently, short sea shipping is responsible for a significant part of all freight moved within the European Union borders. In the last decades containerization has revolutionized cargo shipping. According to Drewry Shipping Consultants (http://www.drewry.co.uk/), today over 70 % of the value of the world international seaborne trade is being moved in containers. The world container fleet expanded at an average annual growth rate of 9 %. A significant part of all freight moved within the European Union travels by sea. EU statistics state that 3800 million tons were transported by ship in 2006 and it is hoped that, in 2018, if the economic crisis overcome, the 5300 million tons mark will be reached. Short sea shipping has several advantages but also has some downsides: the bureaucracy attached to customs and ports; port services costs and efficiency; travel duration; inflexibility of routes; and dependency on environmental factors. Considering some of these downsides, this work intends to minimize the transportation costs reducing the travel duration and the port servicing cost and efficiency. With that purpose, a mixed integer programing (MIP) model that minimizes the total cost distribution was developed.

The motivation and the idea for this work arise from the parallelism between this type of distribution and the distribution problems over land. In this latter type of transportation a well-known problem, the Vehicle Routing and Loading Problem (VRLP) that is an integration of the Vehicle Routing Problem (VRP) and Container Loading Problem (CLP), was first presented by [15]. The routes and the packing of boxes (or pallets) in the trucks are computed considering the Last-In-First-Out (LIFO) strategy and all the constraints related to this two different problems. The study of VRLP only started in 2006 and since then further work has been done. Gendreau et al. [13] and Moura and Oliveira [15] were the first authors to integrate the VRP and CLP and to publish benchmark instances. Moura and Oliveira [15] considered a mathematical formulation to the VRLP with Time Windows and tri-dimensional packing and in this work they presented two heuristic approaches, a hierarchical and a sequential approach. Bearing this in mind, we applied the same concept to short sea distance distribution problems. Nevertheless, the main difference between these two apparently similar problems is in the cargo loading. The routes are more dependent on the loading plans, due to both the vessel and cargo stability and the great amount of time that each vessel spends in a port in order to load and unload the containers. A good loading plan in this case is more crucial to the entire distribution process. The routes are planed depending on: distances, demands and the delivery deadlines of each port. Besides, the mathematical model considers the interconnection between the routes optimization and the containers loading on containerships, in order to reduce overstowing.Footnote 1 According to these, two different kinds of optimization problems must be dealt with, in an integrated manner: the Containership Routing Problem with Deadlines and the Container Stowage Problem. The integration of these two problems was named by [16] as the Container Stowage and Ship Routing Problem (CSSRP).

This paper is structured as follows: Sect. 2 consists of a detailed description of the CSSRP; Sect. 3 is a review of the relevant literature; in Sect. 4 a mixed integer programming model of CSSRP is presented; Sect. 5 is dedicated to the discussion of results, considering some generated problem instances, and the analysis of the model performance; to conclude in Sect. 6, some global remarks are presented.

2 Container Stowage and Ship Routing Problem Description

The containerships are vessels (for now on always just referred to as vessels) specifically constructed to transport containers. The cargo space of the vessel is divided in bays positioned on deck and below the deck of the ship and separated by a hatch cover [18]. Each bay (longitudinal sections) consists of a set of stacks (transversal sections) and tiers (vertical sections of a stack) that are one container wide (Fig. 1). The space related to one stack and tier is usually referred by a slot, which is a single space where containers could be loaded. The vessels have capacity constraints, related to weight, slot dimensions and number of slots. Although there are different types of containers with different dimensions and characteristics, in this work only the containers types considered in our problem are described. Each container has a weight, a destination port and standard dimensions. Those standard dimensions are measured in foot equivalent units and could be TEU (Twenty-foot Equivalent Unit) or FEU (Forty-foot Equivalent Unit). In each slot one 40′ or two 20′ can be loaded. Another type of containers are those that need electric power (refrigerated containers). These particular containers must be loaded in slots that have a power plug. The maximum weight of each container is 24 tons for 20′ and 40 tons for 40′.

Fig. 1
figure 1

General arrangement of cargo positioning (Wilson and Roach [18])

In CSSRP we have an origin port with a set of vessels and containers. The vessels must deliver the containers to other different ports within a given period of time (deadlines), each port has a demand (set of containers) that must be satisfied. In the end of the distribution process, the vessels must return to the port of origin with some empty containers that are loaded in the vessel in each port in the free spaces. This means that in each port the containers (demands) are unloaded and some empty containers are loaded in the same (now empty) slots in order to be returned to the origin port. Two major decisions must be considered: which ports should be visited by each vessel and the visit sequence, and how to stow the containers on board when considering all the placement requirements and LIFO strategy. The goals are to determine the best visiting sequence of ports and to reduce shifting of containers, while minimizing the total distribution cost.

As explained in [16] the short sea shipping main costs are related to the containers handling in the ports. A vessel carrying cargo to several ports may require a large number of shift operations. So the position of the containers on the vessels is crucial to reduce the time spent on a port to unload them. Taking this into account the vessel’s stowage plan influences port handling, because the containers are loaded in vertical stacks located in different sections (bays) and the only way to access them is through the top of the stack. There are different handling operations of the containers:

  1. 1.

    Containers are loaded to be dispatched;

  2. 2.

    Containers are unloaded because they reached their destination;

  3. 3.

    Containers have to be shifted because they block the access to others that have to be unloaded, known as overstow;

  4. 4.

    Containers have to be re-positioned to improve the overall stowage (vessel stability) or to make the next port handling easier, which are known as re-handles

When a shift is performed, the container is always loaded in a different slot and the stowage plan is normally rearranged. Shifting is a time consuming activity, hence the arrangement of containers on board is crucial to achieve operational efficiency and reduce the number of shifts. To reduce the number of shifts, the LIFO strategy is considered when the routes are computed, which is part of the decision making process.

Beyond the costs implicit on a movement, there are other costs that have to be considered:

  1. 1.

    Costs related to ports, for example, taxes and utilization costs;

  2. 2.

    Costs related to vessels, for example the cost of a travel operation that depends on the cost of the fuel/mile and the cost of vessel utilization which depends on the crew member per day.

So, in order to reduce the global short sea distribution cost, an optimal route is computed that minimizes the total distribution costs. The CSSRP has several constraints that have to be considered. The constraints are divided in three groups: related to routes/ports (C1); related to vessels/loading (C2); and those that are related to both (C3).

(C1) The Routing constraints: Deadline constraint: deadline limits can be modeled as linear vehicle routing constraint, where the arrival time of the vessel to a port must be less than or equal to the smallest container deadline of the port demand.

(C2) The Loading and Placement constraints:

  1. 1.

    Vessel capacity constraints: maximal weight and number of containers. Weight limits and the number of slots can be modeled as a linear knapsack constraints, where the number of containers loaded and sum of its weights must be smaller or equal to the vessel capacity;

  2. 2.

    Positioning constraints, related to container placement stability in vessels. Can be modeled as a three-dimensional container loading problem constraints, where containers could be loaded directly on the vessel floor (or on the hatch cover) or above another container(s).

(C3) The Routing and Loading constraints: LIFO strategy, which is directly related to the number of shifts operations and it is used to bind the routing and the loading problem.

The challenge tackled in this study, is to develop a MIP model for the CSSRP that can achieve optimal solutions in a reduced computational time and can be applied to real problems, being the main contribution of the present work.

3 Literature Review

The CSSRP has received little attention in literature. All the approaches we were able to find have only considered the ships’ container stowage problem (CSP), sometimes considering predefined port visiting sequence. Nevertheless, as far as we know the first published work that deals with the Container Stowage Problem (CSP) and the well-known Vehicle Routing Problem (VRP) with deadlines in an integrated way is from [14]. Later on, [16] proposes a MIP model that solves the CSSRP but with some assumptions in order to simplify the model. These simplifications are related to the containers. The distinction between containers (TEUs or FEUs and refrigerated) are not considered. In this model a demand to a given port is addressed like one big container with a defined dimension and a weight, that corresponds to the summation of dimensions and weights of all container’s demand. So, the placement matrix is simplified and reduced. In this present work and with the aim to improve and adapt the model of [16] to real problems, these simplifications are not taken in consideration.

Regarding the ship routing and scheduling, [10] present an optimization-based solution approach for a real vessel’s planning problem which the authors characterized as the Inventory Pickup and Delivery Problem with Time Windows (IPDPTW). The mathematical programming model was solved using the Dantzig–Wolfe decomposition, decomposing the original formulation into a sub-problem for each port and each ship. The linear programming relaxation of the master problem is solved by column generation, where the columns represent the vessel’s routes or port’s visit sequences. In order to make the integer solution optimal, the iterative solution process is embedded in a Branch-and-Bound search. Later on, [1] presented an integrated MIP model to solve the vessel’s scheduling and cargo-routing problems simultaneously. In this work a greedy heuristic, a column generation based algorithm and a two phase algorithm were developed. This approach is able to generate good schedules for vessels. Later on [14] proposes a genetic algorithm approach to improve the flexibility of short sea shipping and to increase its competitiveness with other means of freight transport. A logistic model was developed to manage a fleet of vessels which transport cargo to and from several ports, bearing in mind the cargo loading and delivery deadlines. The results show that the overall efficiency of short sea shipping can be improved.

In the last three decades unlike CSSRP, several works on CSP, also known as the Master Bay Problem (MBP), were published. Considering the description of the CSSRP in Sect. 2, is easily understandable that the CSP is a NP-hard problem [7]. This problem concerns the task of determining the arrangement of containers in a vessel. It can be categorized as an assignment problem where a set of containers with different characteristics and with a given port destination, must be assigned to slots in a vessel aiming to minimize the transportation cost. Since the late 1980s there were several works published about the CSP. To the best of our knowledge [4] was the first author to solve the stack overstowage problem using a dynamic programming algorithm. The goal was the arrangement policy and this approach was widely adopted in later works. Avriel and Penn [5] proposed the whole columns heuristic procedure to find the optimal solution for a stowage problem in a single rectangular bay with only accessibility constraints. This heuristic requires solving a ILP model after some pre-processing of the data. This method was proven to be limited because of the large number of binary variables and constraints needed to the formulation. Later on, [6] developed the suspensory heuristic procedure that achieves very satisfactory results in a short computation time. Nonetheless, the method proved to be very inflexible as far as the implementation of constraints is concerned. Binary linear programming formulations for the CSP with stability constraints, weight constraints, accessibility constraints, etc., can be found in [2, 9, 16] and [3]. In all of these works, the authors concluded that it is impossible to obtain optimal solutions through ILP for these problems with additional constraints. A very recent work that solves the vessel stowing planning, from [11] contradicts this statement. They decompose the problem and present a constraint programing and integer programming model for stowing a set of containers in a single bay section and solve real life problems to optimality in a reasonable computational time.

Several search methods such as Genetic Algorithms (GA), [12, 14], and tabu search [19] have also been applied to CSP. The advantage of using heuristic and meta-heuristic approaches to deal with this kind of problems has been proved with these works. Wilson and Roach [18] and later on [19], presented a two-phase method. In the first stage containers are grouped by their destination using a Branch-and-Bound search algorithm, aiming to reduce overstows and hatch movements at the next port-of-destination. After that, in the second stage, a tabu search algorithm is applied to the generalized solution, trying to move the containers and assigning them to a specific slot, in order to reduce re-handles, bearing in mind the stability constraints. The first time that the CSP was compared and characterized like another well-known problem – the Bin Packing Problem – was by [17]. In this work the CSP is regarded as a bidimensional packing problem, where the bays of the vessels are regarded as bins, the number of slots in each bay is regarded as the capacity of the bins, and containers with different characteristics are treated as items to be packed. A two stage approach was developed: in the first stage two objective functions were considered, one to minimize the number of bays packed by containers and the other to minimize the number of overstows. Then the containers assigned to each bay in the first stage are allocated to special slots in the second stage, applying a tabu search algorithm. Constraints like weight, stability and overstows are considered.

4 The CSSRP Model Formulation

In this section a mixed integer programming model, aimed to guarantee the generation of optimal solutions to the CSSRP is presented. A mathematical model was developed to manage a fleet of vessels which must transport the container’s demands to several ports, bearing in mind the cargo loading and delivery deadlines. The data and variables of the model are described in the following subsections.

4.1 General Model Components

The CSSRP is defined on a direct graph G(P, A) where each port is represented by a node and has a different geographical location. \(P = \left \{1,\ldots,p\right \}\) represents the set of ports and \(A = \left \{(i,j): i,j \in P,i\neq j\right \}\) the set of arcs in G. The length of each arc d ij corresponds to the distance between port i and j in miles. For the distribution process, a vessel’s fleet is available and represented by a set \(V = \left \{1,\ldots,v\right \}\). For the sake of simplicity, it is assumed that the navigation speed \(\left (vel_{k}\right )\) is constant throughout all the arcs.

There are costs associated with ports and vessel’s (Sect. 2). u ik is the visiting cost (in euros) of port i by vessel k. This cost includes the tax and ports utilization costs, like for example, tugs and cranes. Let us assume that the initial port for vessel departure is port one and the visiting cost in this port is also considered. The costs related to the vessels are:

  • c k is the traveling operation cost of vessel k (per miles, in euros) which depends on the cost of fuel per mile;

  • uc k a vessel utilization cost (per day, in euros), which depends on the crew member number.

Each vessel k is characterized by its weight capacity Wmax k and the vessels capacity in number of containers Cmax k .

In order to fulfill the capacity constraints of the vessels, another set of data related to the containers, must be presented. First we consider that all the containers have standard dimensions (TEU and FEU). Second, we consider that there are two types of containers: the normal containers and the refrigerated containers. The initial port has a set of containers that must be delivered to other ports-of-destination. Each port-of-destination has a demand \(td_{i} = dt_{i} + df_{i} + drt_{i} + drf_{i}\), composed of one or more types of containers, where \(dt_{i},df_{i},drt_{i},drf_{i}\) are the number of normal containers of 20′ and 40′, refrigerated containers of 20′ and 40′, respectively. Also, for each port the demands’ total weight given by \(w_{i} = wt_{i} + wf_{i} + wrt_{i} + wrf_{i}\), where, \(wt_{i},wf_{i},wrt_{i},wrf_{i}\) is the weight of all normal containers of 20′ and 40′, refrigerated containers of 20′ and 40′, for port i, respectively.

Moreover, the demand of each port is characterized by a delivery deadline dl i . For simplicity’s sake, all containers with the same destination have the same deadline that will be equal to the smallest containers’ deadline for that port. In order to fulfill this constraint an estimation of the service time ts ik of vessel k in port i must be considered and tt ijk it’s the required time that vessel k needs to transverse the arc (i, j), in days, given by (1):

$$\displaystyle{ \frac{d_{ij}} {vel_{k} \times 24} }$$
(1)

The last set of data is related to the vessel loading and slots. As mentioned in Sect. 2 and due to the irregular configuration of the cargo space in a vessel, the bays \(B = \left \{1,\ldots,b\right \}\) are defined by a matrix posM kbcs of slots (Fig. 2). The matrix has a set of rows (tier or cell) \(C = \left \{1,\ldots,c\right \}\) and a set of columns (stacks) \(S = \left \{1,\ldots,s\right \}\) Each cell of the matrix has assigned a value (0 or 1) that indicates if it is a vessels’ slot or not. These slots can load one container of 40′ or up to two containers of 20′. Another matrix refM kbcs is used only to indicate the slots with electrical power (slots with value equal to 1), as mentioned before in Sect. 2, these slots are the only place where the refrigerated containers can be loaded (Fig. 3).

Fig. 2
figure 2

Placement matrix

Fig. 3
figure 3

Plugs location matrix

These slots can be occupied by one 40′ or two 20′ refrigerated containers, because there are two plugs available in each slot. It should be noted that, the normal containers can also be loaded in slots with plugs, as long as there aren’t sufficient refrigerated containers to occupy them.

There is a cost related to the container’s movement (load or unload) represented by mc, this cost is incurred for the handling operations of one single container.

4.2 Loading Rule

As in the three dimensional container loading problem (3D-CLP), there are several different ways to place the containers in vessels. In the 3D-CLP the boxes could be placed in the containers on the walls and layer building schemes, the boxes of the same type are arranged in rows or columns to fill one side or the floor of the container free space [8]. There are other ways to fill the containers, by homogeneous blocks, where each block consists of a set of equal box types, single columns or rows, etc.

In this problem, a loading rule was defined in order to reduce the overstows and related shift movements. This rule fills the bays row by row (stacks) from left to right and from bottom to top of each column (cells). Figure 4, shows the load rule application for a vessel where A and B represents the set of containers to delivery in port A and B.

Fig. 4
figure 4

Loading rule

This way the containers with a farthest destination are placed on the lowest part of the stack. This rule is achieved due to the order in which the indexes in the bays’ matrixes positioning (posM kbcs ) are defined (see, Sect. 4.1) and the way in which the model is developed (see C3 – Loading and placement constraints, from 15 to 25 in Sect. 4.3). However there are some exceptions. Those are related to the refrigerated containers. In this case the containers are loaded in the existing plugged slots disregarding the loading rule.

4.3 The MIP Model

Several decisions and auxiliary variables were considered, some of them exclusively related to the routing problem, others to the container stowage problem:

  1. 1.

    x ijk indicates if the vessel k traverses arc (i, j), or not.

  2. 2.

    s ij gives us the arrival time of vessel k to port i.

  3. 3.

    \(t_{kibcs},f_{kibcs},rt_{kibcs},rf_{kibcs}\), these variables indicate if a type of container with destination port i is placed in slot (b, c, s) of vessel k or not. Those variables are related to the 20′ containers t kibcs , rt kibcs vary between 0 and 2, because in one slot it could be loaded up to two containers of 20′. On the other hand, the variables related to 40′ containers \(f_{kibcs},rf_{kibcs}\) vary between 0 and 1, because up to one container of 40′ could be loaded in a slot.

Considering all the general model components, the objective function of the model is defined as:

$$\displaystyle{ Min\sum _{k\in V }\sum _{i\in P}\sum _{j\in P,j\neq i}x_{ijk}\left (d_{ij}c_{k} + u_{jk} + td_{j}mc\right ) +\sum _{k\in V }uc_{k}s_{1k} }$$
(2)

The CSSRP model minimizes the total route cost (2). This objective function is related to several constraints divided in three groups (as presented in Sect. 2):

C1 – Routing constraints:

$$\displaystyle{ \sum _{i\in P,i\neq j}x_{ijk} \leq 1,\quad \forall j\neq 1 \in P,\forall k \in V }$$
(3)
$$\displaystyle{ \sum _{j\in P,j\neq i}x_{ijk} \leq 1,\quad \forall i\neq 1 \in P,\forall k \in V }$$
(4)
$$\displaystyle{ \sum _{i\in P,i\neq j}x_{ijk} - x_{jik} = 0,\quad \forall k \in V,\forall j \in P }$$
(5)
$$\displaystyle{ \sum _{j\in P}x_{1jk} \leq 1,\quad \forall k \in V }$$
(6)
$$\displaystyle{ \sum _{k\in V }x_{ijk} \leq 1,\quad \forall i,j \in P }$$
(7)
$$\displaystyle{ s_{ik} + ts_{ik} + tt_{ijk} \leq s_{jk} + M\left (1 - x_{ijk}\right ),\quad \forall k \in V,\forall i,j\neq i \in P }$$
(8)
$$\displaystyle{ s_{ik} \leq dl_{i},\quad \forall k \in V,\quad \forall i \in P }$$
(9)

This first set of constraints is related to the routing problem. Constraints (3), (4) and (5) are the flow conservation constraints. Equations (3) and (4) ensures that every port is visited only by one vessel. Equation (5) ensures that if a vessel arrives to a port it also leaves the same port. Equation (6) ensures that if a vessel is used, it must begin its route in port one and Eq. (7) ensures that each port is visited only by one vessel. Constraint C1 (Sect. 2), is achieved with Eqs. (8) and (9). These ensure the feasibility of time scheduling defining the vessel setup time and the deadline constraint for serving a port, respectively. Constraint (8) guarantees that the port’s service does not begin before the vessel’s arrival to the port. This constraint uses a large multiplier (Big-M value) and in order to create valid inequalities we set M = S 1 max, where S 1 max is the maximum time needed to visit all ports. Constraint (9), guarantees that each container deadline is not violated.

C2 – The Loading and Placement constraints: 

The following sets of constraints are related to positioning and loading constraints (C2, Sect. 2).

$$\displaystyle{ \sum _{i\in P}\sum _{j\in P,j\neq i}x_{ijk} \times w_{j} \leq Wmax_{k},\quad \forall k \in V }$$
(10)
$$\displaystyle{ \sum _{i\in P}\sum _{j\in P,j\neq i}x_{ijk} \times td_{j} \leq Cmax_{k},\quad \forall k \in V }$$
(11)
$$\displaystyle{ \sum _{k\in V }\sum _{b\in B}\sum _{c\in C}\sum _{s\in S}t_{kibcs} \leq dt_{i},\quad \forall i \in P }$$
(12)
$$\displaystyle{ \sum _{k\in V }\sum _{b\in B}\sum _{c\in C}\sum _{s\in S}f_{kibcs} \leq df_{i},\quad \forall i \in P }$$
(13)
$$\displaystyle{ \sum _{k\in V }\sum _{b\in B}\sum _{c\in C}\sum _{s\in S}rt_{kibcs} \leq drt_{i},\quad \forall i \in P }$$
(14)
$$\displaystyle{ \sum _{k\in V }\sum _{b\in B}\sum _{c\in C}\sum _{s\in S}rf_{kibcs} \leq drf_{i},\quad \forall i \in P }$$
(15)

Equations (10) and (11) are related to the vessels capacity. The first one states that the total demand on a route cannot exceed the vessel capacity in terms of weight and the second one in terms of number of containers. Equations (12), (13), (14) and (15), ensures that all demands are satisfied. Another set of constrains are related to containers’ position on vessels. As mentioned before, there are two different matrixes, one related to the possible loading positing in a vessel and the other that indicates the slots with plugs.

$$\displaystyle{ t_{kibcs} + 2 \times posM_{kbcs} \leq 2,\quad \forall k \in V,\forall i \in P,\forall b \in B,\forall c \in C,\forall s \in S }$$
(16)
$$\displaystyle{ f_{kibcs} + posM_{kbcs} \leq 1,\quad \forall k \in V,\forall i \in P,\forall b \in B,\forall c \in C,\forall s \in S }$$
(17)
$$\displaystyle{ rt_{kibcs} + refM_{kbcs} \leq 2,\quad \forall k \in V,\forall i \in P,\forall b \in B,\forall c \in C,\forall s \in S }$$
(18)
$$\displaystyle{ rf_{kibcs} + refM_{kbcs} \leq 1,\quad \forall k \in V,\forall i \in P,\forall b \in B,\forall c \in C,\forall s \in S }$$
(19)
$$\displaystyle{ \sum _{i\in P}\left (t_{kibcs} + 2 \times f_{kibcs}\right ) \leq 2,\quad \forall k \in V,\forall b \in B,\forall c \in C,\forall s \in S }$$
(20)
$$\displaystyle{ \sum _{i\in P}\left (rt_{kibcs} + 2 \times rf_{kibcs}\right ) \leq 2,\quad \forall k \in V,\forall b \in B,\forall c \in C,\forall s \in S }$$
(21)
$$\displaystyle{ \sum _{i\in P}\left (t_{kibcs} + 2 \times rf_{kibcs}\right ) \leq 2,\quad \forall k \in V,\forall b \in B,\forall c \in C,\forall s \in S }$$
(22)
$$\displaystyle{ \sum _{i\in P}\left (t_{kibcs} + rt_{kibcs}\right ) \leq 2,\quad \forall k \in V,\forall b \in B,\forall c \in C,\forall s \in S }$$
(23)
$$\displaystyle{ \sum _{i\in P}\left (rt_{kibcs} + 2 \times f_{kibcs}\right ) \leq 2,\quad \forall k \in V,\forall b \in B,\forall c \in C,\forall s \in S }$$
(24)
$$\displaystyle{ \sum _{i\in P}\left (f_{kibcs} + rf_{kibcs}\right ) \leq 1,\quad \forall k \in V,\forall b \in B,\forall c \in C,\forall s \in S }$$
(25)
$$\displaystyle{ \sum _{i\in P}\left (rt_{kibcs} + t_{kibcs} + 2f_{kibcs} + 2posM_{kbcs}\right ) \geq }$$
(26)
$$\displaystyle{ \sum _{i\in P}\left (rt_{kibas} + t_{kibas} + 2f_{kibas} + 2posM_{kbas}\right ), }$$
(27)
$$\displaystyle{ \forall k \in V,\forall b \in B,\forall c,a < c \in C,\forall s \in S }$$
(28)

For this reason a set of constrains, from (16) to (28), are needed in order to guarantee that the refrigerated containers are assigned only to slots with power supply ((18) and (19)) and also that in each one of these slots only one 40′ or up to two 20′ refrigerated containers can be placed (21). On the other hand, the normal containers can be placed in any slot in the vessel and each slot can have one 40′ container or up to two 20′ containers ((16) and (17)). The other set of constraints (20), (22), (23), (24) and (25) ensures that in any slot, it only could be loaded one 40′ container or one or two 20′ container, or it could be empty. Those constraints together with constraint (28), ensures the containers placement stability in vessels. These sets of constraints, give us the possible relative position between adjacent slots in the same stack. It guaranties that all the containers are fully supported. Nevertheless, it can never be placed any type of container in a slot if the slot below is empty or not fully occupied (Fig. 5).

Fig. 5
figure 5

Infeasible loading example

C3 – Routing and Loading constraints:

$$\displaystyle{ \sum _{i\in P,i\neq j}x_{ijk}\times d_{j} =\sum _{b\in B}\sum _{c\in C}\sum _{s\in S}\left (t_{kjbcs} + f_{kjbcs} + rt_{kjbcs} + rf_{kjbcs}\right )\quad \forall k \in V,\forall j \in P }$$
(29)

The two problems (route planning and container stowage) are integrated through Eq. (29), that binds the container loading variables to the vehicle routing problem variables, i.e., if a vessel visits a given port then the port’s demand must be placed inside that vessel. To guarantee the LIFO strategy and to minimize the number of shifts (Routing and Loading Constraint – C3, Sect. 2), the loading rule (Sect. 4.2) is applied.

5 Computational Results

The main goal of this approach is to solve the short sea shipping distribution problem using an exact method that can achieve an optimal solution in a reasonable computational time. According to [11], a reasonable computation time for real problem solving applications are 15 minutes. The main idea is to apply this model to real-life problems taking in consideration that in the short sea distribution the average number of ports per route is five [14]. With this perspective, available data from real ships and ports was used. The problem instances and the model results are described in the following sections.

5.1 Problem Instances

The problem instances were developed based on the available data of a short sea distribution problem presented in [16], which considers two vessels and five ports and a homogeneous demand distribution per port. This means that the number of containers and weight for each port is similar and in some cases equal. These problem instances that we from now on call basic problems, were also developed taking into account [14] work. The scenarios utilized in [14] were collected in Porto Maritimo de Viana do Castelo, Portugal. In our problem instances, two different vessels were used. One of them also used in [16] and [14], the AXE that has a capacity of 348 TEUs, has 8 bays defined as a 9*8 matrix (cells*stacks). The other vessel with a greater capacity that could achieve 5000 TEUs with a maximum bay size under deck of 69 TEUs. This vessel has 32 bays defined as a 14*15 matrix. Usually in short sea distribution, these kinds of vessels are not used, only the smaller types of vessels with around 348 TEUs. But we wanted to test the model with bigger vessels, in order to study its behavior when the number of slots is considerably increased.

It was considered that the fuel consumption and the velocity of the vessels are constant independently of the quantity and weight of the cargo. To prove the robustness of the model larger instances were generated, increasing the number of ports and using two vessels. In general, each port demand could not exceed the maximum capacity of the vessel in order to avoid the split of a port’s demand between vessels. Also as in [16] it is assumed that all port tariffs are the same and some costs, such as insurance costs and others, were neglected. These cost simplifications only imply changes in the objective function value. Then, in order to study the model behavior another set of instances were developed. The idea is to study the effect of the demand quantities and the containers deadline variation, in terms of CPU time and optimal solutions. For this reason, in all instances, the quantity of containers per type in each demand varies upon: at least 50 % for the 20′ normal containers; at least 35 % for the 40′ normal containers; between 0 % and 10 % for the 20′ refrigerator containers and between 0 % and 5 % for the 40′ refrigerator containers. The problem instances were solved by CPLEX software, and the experiments were run on an Intel CORE i7 vPro 2.2 GHz with 8 Gb of memory.

5.2 Model Results and Sensibility Analyses

For each type of vessel, keeping the same demand distribution per port and the same type of deadlines, like in the basic problems, 10 problem instances were tested. The difference between those instances are the number of ports and the number of vessels. The results achieved are presented in Table 1.

Table 1 Problem instances results

For the instances with one vessel, except for 15 ports, the model always achieved an optimal solution. All the CPU times are very small, except for the 15 ports and 2 vessels problem instance (almost 2 hours). For the problems with one vessel, increasing the number of ports results in a small increase in the computation time. However there is a more significant rise in the computational time when, for the same number of ports the number of vessels is increased. This was expected due to the number of variables related to the containers’ positioning. In order to give an idea of the model size relevance to the difficulty of solving some of the instances, for the smallest and biggest problems the numbers of constraints and variables are presented in Table 2:

Table 2 Problem size

As can be seen in Table 2, there is a large increase in the number of constraints and variables in the instances of Panamax vessel with 15 ports and 2 vessels. This implies an incredible increase of the computational time. This is the reason why the results of Panamax vessel instances with 15 ports are not presented. Taking into account the majority of the tested instances we can conclude that the integrality GAP decreases with the increase of the number of ports. The opposite behavior happens when varying the number of vessels, in particular for 15 ports. Nevertheless, and according to the problems sizes (Table 2), with the results achieved it is proven that this model can be applied to real problems of short sea distribution (characterized by a reduced number of ports and small vessels), due to the small computational time needed to achieve an optimal solution.

As mentioned before, a sensibility analyses was performed with different instances. Our intent was to explore the effect of varying the quantities of the demands and deadlines. So, in order to prove the robustness and behavior of the model, three different scenarios only for 5 ports problem instances, were tested.

SA2: Varying the demand distribution per port: The behavior of the model and the effect of varying the demand distribution per port was studied (Table 3). As in [16], three types of demands’ distribution were considered: weak heterogeneous and strong heterogeneous. As explained before, in the so called basic problems, the load distribution is based on real data and the container’s number and weight is very similar sometimes equal, between each port. On the other hand, a weak heterogeneous distribution happens when there are more significant differences between them. Furthermore, strong heterogeneous is when differences between the demands of each port are very significant, for example: a demand from one port could be composed by only 10 containers and for another by 1200.

Table 3 Computational results varying the demands and deadlines

SA3: Varying the deadlines: Another test was made in order to see the behavior of the model according to different types of deadlines. In this case, narrow and wide deadlines were tested using the basic problems load distribution (Table 3). A deadline is called narrow, when it is almost the same amount of time required to traverse the arc. On the other hand, when a deadline is called wide it is because those values are large enough that it makes it so (for some or for the majority of the ports) there are no deadline constraints.

These two data types could be critical because, for example, if the demand to a given port is equal to or very close to the vessel capacity, that vessel will visit only that port, making the problem potentially easier to solve due to the decrease in the number of possible route/loading combinations. The effects on the CPU time and optimal solutions, on varying the demands distribution and deadlines are presented in Table 3. The results obtained when the optimal solution is achieved, problem instances with one vessel, denotes a relationship between the type of demand and the computational time needed to solve the problem. For strong heterogeneous distribution the computational time is always smaller than considering the other two load distributions. Moreover, for problems with two vessels, the highest computational time is always associated with basic problems distribution. Related to the deadlines variation and for the problem instances with one vessel, the optimal solution was always achieved. In these cases and for wide deadlines the computational time is always longer than the computational time of the basic problems. But decreasing the size of the deadlines (narrow deadlines) it could be seen that the computational time decreases and in a significant way compared to the wide deadlines. We think that this fact can be explained with the same arguments presented above for the demands variation. Namely, if a port has a deadline that is equal to the travel time that the vessels needs to get there, so this port must be the next port to visit independently if it is the farthest port or not. On the other hand, with wide deadlines and in the problem instance with one AXE vessel, it could be seen that the optimal solution was significantly reduced. This could be explained due to the fact of the size of deadlines be such as, that this constraint no longer exists and the route is the shortest one. Another curiosity is related to the problem instance with two Panamax vessels. In this case, unlike previously, the model only achieved the optimal solution with the narrow deadlines.

6 Conclusions

In this work a Mixed Integer Programing model to solve the short sea distribution problem named as container stowage and ship routing problem (CSSRP), was presented. This problem can be approached like the integration of two well-known NP-Hard problems: the Vehicle Routing Problem and the 3-Dimensional Loading Problem. However in CSSRP the demands have deadlines and the containers placement locations are fixed. Besides, in CSSRP it must be decided where to load the demands to a given port in order to reduce the unloading time and the number of shifts movements. The CSSRP is also a NP-hard problem. Despite the complexity of the problem and of the presented model, the results obtained for the set of problems tested prove that this model can be applied to solve real life short sea shipping problems. It was proven that the model in the most instances reaches an optimal integer solution, without unnecessary movements of cargo (shifts) during the trips, within a very short computational time. In addition, the results showed that the computational time to get the optimal solution, besides depending on number of ports to visit and number of vessels, also depends on the type of demands distribution and deadlines. The developed approach in this work shows that the solutions quality of the short sea shipping problem can be solved and improved by having an integrated perspective of the two above mentioned problems (the VRP problem and the CSP problem).