1 Introduction

Fuel transportation constitutes a significant economic activity. According to the US Bureau of Transportation Statistics (2018), 12% of the total weight of shipments in the U.S. involved liquid fuel (Diesel, Gasoline, Kerosene, Ethanol, or other oil fuel) while 50% of this quantity was transported by truck. Moreover, liquid fuels fall into the category of hazardous materials, exposing the population near any transportation activity that involves fuel, to the potential consequences of an accident. A transportation accident involving liquid fuel may result in fire and/or explosion causing fatalities and substantial environmental and economic damages within an extended area around the accident location. For instance, a road tanker carrying petrol in Nigeria in 2012, overturned and caused a severe explosion leading to 200 fatalities (Abbasi et al., 2017).

Planning safe and efficient delivery routes for replenishing petrol stations or other industrial customers with liquid fuel involves various complexities that make dispatching a challenging and effort-demanding task. A major feature of liquid fuel distribution is that the consignments of different types of fuel cannot be carried in the same truck compartments. Hence, in addition to forming delivery routes, the emerging routing problems involve a non-trivial subproblem of assigning orders to vehicle compartments. The emerging loading problem is further complicated by a set of rules, widely used in this industry, for attaining a safe and balanced loading of tank trucks. Moreover, fuel routing decisions aim for the efficient use of the fleet of trucks, assigning multiple trips to each truck on a daily basis. However, the limited number of loading facilities at the depot tends to create queues of delivery trucks waiting to get loaded, especially in periods with demand peaks. The congestion arising at the loading facilities causes long delays that result in poor utilization of the trucks (i.e., fewer trips per truck can be performed). Although the existing studies on fuel delivery problems account for the vehicle compartments loading problem, none of the additional loading considerations pointed out have been incorporated into fuel routing decisions. The work presented in this paper focuses on a real-world liquid fuel delivery problem that incorporates all these special features of the fuel distribution industry.

Unbalanced loading of cargo may cause a lack of en-route stability, possible reduction of the braking system effectiveness, loss of manoeuvrability, and tire overheating (Jacob & Beaumelle, 2010). Balanced loading is therefore deemed as an effective proactive measure for avoiding fuel transportation accidents and their potentially severe consequences. Common approaches for attaining balanced loading in road transportation of containerized cargo involve: (i) keeping the weight borne by each axle of the vehicle below a maximum limit (Novas et al., 2020), and (ii) minimizing the deviation of the center of gravity of the cargo from the center of balance of the truck (Ramos et al., 2018). However, liquid fuel transportation is subject to various additional effects/forces acting on the truck due to fuel oscillation inside the compartments (upon accelerating/decelerating or turning maneuvers). Moreover, a fuel delivery truck that executes a multi-stop route, encounters load changes in quantity and position at every segment of the trip, potentially affecting the en-route stability of the truck.

Dispatchers’ usual practice to account for the balanced loading of liquid fuel is to assign customers’ orders to vehicle compartments so that the load of the truck remains balanced throughout all segments of a delivery route. Only two papers in the literature have incorporated similar issues (Brown et al., 1987; Cornillier et al., 2008a). In Brown et al. (1987), partially loaded trucks must have the rear compartments empty. In Cornillier et al. (2008a), the front compartments of the truck are enforced to get unloaded at the last stop of the route. In that study, each route is constrained to service up to two customers, simplifying substantially the relevant loading problem. In this work, we incorporate a more general loading practice (denoted by MRF) that tends to attain a balanced loading throughout all phases/segments of a trip. In any trip, the assignment of the order items to the vehicle compartments must be arranged so that the middle compartments are unloaded first (so that the weight distributed on the steering axle remains sufficient), followed by the rear (to mitigate the risk of a turn-over) and then the front compartments (Hellenic Ministry of Infrastructure, Transport, and Networks, 2013). Given the physical ranking and position of the vehicle compartments, they are classified into three groups: front, middle, and rear. This classification depends on vehicle dimensions and the axles’ position and it is specified by experts. Rule MRF implies that: (i) a compartment in the rear group can be unloaded only if the middle group compartments have become empty, and (ii) a compartment in the front group can be unloaded only if the middle and the rear compartments have become empty. Henceforth this category of constraints will be called unloading precedence constraints.

Another important challenge of the dispatching process in liquid fuel distribution pertains to managing the actual loading of the trucks from a limited number of loading facilities, incapable to process all trucks simultaneously. Loading the ordered fuel quantities on the trucks is performed on the day of delivery through a given number (\(\xi \)) of loading positions/facilities. The loading process takes place within the time window [\({a}_{0}\), \({b}_{0}\)] of the depot. Henceforth, the loading of a truck is referred to as a loading activity. Each loading facility is capable of providing all types of fuel and therefore each loading activity can be fully processed by a single facility. Van den Bossche et al. (2020) discuss in detail the operational issues that arise for loading/unloading trucks in the yard of a tank terminal. When the number of loading activities exceeds by far the number of available facilities (which is the usual case) a bottleneck arises (spreading congestion of trucks within the depot’s yard). The lack of consideration of this issue might lead to considerable delays with detrimental effects on fleet utilization and increased delivery cost.

Sequencing loading activities may mitigate the inefficiencies induced during the stage of loading trucks. The emerging sequencing problem aims to determine the sequence of the loading activities that will be processed by each of the \(\xi \) facilities within \({[a}_{0}\), \( {b}_{0}]\). Assuming a fixed processing duration of \(\gamma \) minutes per loading activity (i.e., the maximum time required for fully loading any type of truck), \({[a}_{0}\), \({b}_{0}]\) is partitioned to discrete time blocks (named loading slots) \(T=\{\mathrm{1,2},3,..,\left|T\right|\}\). Each loading slot \(\tau \) is identified by start time \(\text{e}_{\tau }\). Hence, the sequencing problem aims to assign each activity to a loading slot under the constraint that up to \(\xi \) activities can be processed in parallel. It is evident that the departure and return time of each vehicle trip depends on the corresponding allocated loading slot. This constraint may affect the number and the size of the trips that can be performed by a vehicle. It is worth mentioning that this type of scheduling constraint may also exist in other industries where the pending shipments in a warehouse exceed (by far) the number of available loading positions (e.g., docking doors). To the knowledge of the authors, Huang et al. (2021) is the only work that discusses the bottleneck arising from processing the trucks at the depot and captures its effect on routing decisions. This work focuses on planning waste collection routes by considering the effect of the truck queues formed at the depot waste processing facilities. Our work is the first one that incorporates the scheduling of the loading activities in a routing problem and studies the potential effect of the number of loading facilities on the total traveled distance.

This paper aims to model and solve a vehicle routing problem for liquid fuel distribution, that incorporates explicitly the following issues: (i) balanced loading of the cargo so that the en-route stability of the truck is maintained throughout all segments of a route, and (ii) managing a large number of daily requests for loading trucks through a limited number of loading facilities at the depot. Henceforth, the emerging vehicle routing problem will be called the Fuel Distribution Problem with Unloading Precedence and Loading Sequence considerations (FDP-UPLS). This paper presents a Mixed Integer Programming (MIP) formulation and an Adaptive Large Neighborhood Search (ALNS) heuristic algorithm with various novel features for addressing real-life instances of the problem. The ALNS algorithm’s novel features involve: (i) a giant-tour heuristic algorithm that determines an initial feasible solution, and (ii) a new ALNS repair operator which rebuilds the missing part of the incumbent solution through an enhanced version of the giant-tour heuristic algorithm. It is proved that the proposed incorporation of the giant-tour heuristic into the ALSN provides high-quality solutions to this hard-constrained routing problem. An additional issue that arises while forming routes with the proposed heuristic, relates to assigning the orders of a given route to the compartments of the corresponding truck so that the unloading precedence constraints are satisfied. A MIP formulation was developed (Appendix B) to address this problem, called the Route Loading Problem. Any instance of this problem encountered in the proposed algorithm is solved by a commercial MIP solver. The performance of the proposed ALNS algorithm has been assessed on a series of benchmark problems. Additional computational experiments on real-life test problems were performed to explore the effect of the unloading precedence constraints on the total traveled distance.

The remainder of the paper consists of 5 sections. Section 2 presents the previous related work and clarifies the contributions of the paper. Section 3 provides the problem statement and the MIP formulation while Sect. 4 presents the proposed algorithm for solving the specific problem. Section 5 discusses the results of the performed computational tests and Sect. 6 provides the conclusions of the paper and states directions for future research.

2 Literature review and contributions

FDP-UPLS falls into the more general category of multi-compartment vehicle routing problems, frequently arising in real life when shipments of incompatible products are transported by the same vehicle. Previous related work on multi-compartment vehicle routing problems can be classified according to whether the following constraints apply (or not): (i) vehicle compartments are dedicated to carrying specific types of products, (ii) vehicle compartments may carry up to one order item, i.e., mixing quantities of different orders for the same product is not allowed (split vs. un-split compartments), and (iii) each customer’s service must be completed through a single truck visit (unsplit vs split customer service) (Coelho & Laporte, 2015). The liquid fuel delivery problems reported in the literature involve: non-dedicated use of vehicle compartments, and (except for Wang et al. (2020)) unsplit service of customers (replenishment of multiple fuels to petrol stations). Depending on whether vehicle compartments are equipped with flow meters or not, the use of compartments is accordingly assumed split or unsplit.

Early work on fuel distribution involved the development of Decision Support Systems for addressing real-world dispatching decisions (Brown & Graves, 1981; Brown et al., 1987). Brown and Graves (1981) addressed a dispatching problem that involved assigning single-order trips to the available vehicles aiming to minimize total cost. An integer programming formulation was developed for the emerging assignment problem. Brown et al. (1987) extend the work of Brown and Graves (1981) by proposing a Decision Support System for designing petrol distribution routes with multiple stops and multiple depots.

More recent literature on fuel distribution problems focuses on modelling and solving single-period or multi-period petrol stations replenishment problems. In the line of the single-period replenishment problems, Avella et al. (2004) deal with a fuel delivery problem in which vehicles may perform multiple trips within a fixed shift duration. The problem involves unsplit customer service and unsplit vehicle compartments. The emerging problem was addressed by a branch and price heuristic. Cornillier et al. (2008a) deal with the replenishment problem for petrol stations that also involves unsplit customers and vehicle compartments. The quantity of fuel that is delivered to each station is treated as a decision variable ranging within given upper and lower bounds. The delivery problem was further constrained by enforcing each vehicle to serve up to two customers per trip and keeping the duration of each route below a given threshold value. It is worth noting that Cornillier et al. (2008a) is the only work on multi-compartment VRPs that incorporates a constraint on the sequence of unloading compartments within route planning. The content of the front compartments of each vehicle is constrained to be unloaded at the last stop of the route. The emerging problem is formulated as a set partitioning problem. Taking advantage of the limited number of stations per route (no more than two), an exact solution approach is provided that determines all subsets of 1–2 stops that can be feasibly loaded on the available vehicles and then solves a matching problem. Cornillier et al. (2009) study the petrol station replenishment problem with time windows and multiple trips per vehicle. The emerging problem is formulated as a set partitioning problem. A heuristic algorithm is developed for constructing and feeding the mathematical formulation with alternative columns (i.e., feasible routes). Wang et al. (2020) address a fuel replenishment problem with split customers and split vehicle compartments. The compartments of any vehicle are assumed identical and each vehicle may perform multiple trips visiting a customer more than once, if necessary. An Adaptive Large Neighborhood Search algorithm is developed. The initial solution is determined by a two-phase constructive procedure that: (i) determines a set of vehicle-independent trips and (ii) assigns each trip to a vehicle. Each ALNS iteration involves standard repair and destroy operators which are further customized to account for multiple visits to customers.

The second line of research on fuel distribution problems involves multi-period petrol station replenishment problems. In addition to specifying the delivered quantity per product per petrol station and allocating shipments to vehicles, the multi-period replenishment problems aim at determining the time period in which each petrol station will be replenished. Cornillier et al. (2008b) address this problem under the constraint that each vehicle can serve up to two petrol stations per trip. They propose a multiphase heuristic that iteratively addresses the single-period petrol station replenishment problem arising in each time period of the planning horizon. Popović et al. (2012) deal with the multi-period inventory routing problem for replenishing petrol stations (considered as unsplit customers) assuming a homogeneous fleet of trucks. The deliveries to petrol stations involve full-compartment quantities only (i.e., unsplit compartments) while each vehicle is constrained to serve up to three petrol stations per trip. Popović et al. (2012) developed a Variable Neighbourhood Search algorithm for addressing the emerging problem. Vidović et al. (2014) address a similar multi-period inventory routing problem for fuel distribution. Each tank truck of the fleet involves up to four identical (unsplit) compartments. A Variable Neighborhood Search heuristic was developed for solving the emerging problem. Coelho and Laporte (2015) deal with the multi-period petrol station replenishment problem with no restriction on the number of petrol stations serviced per trip. Mathematical formulations are provided for four alternative versions of the problem emerging from combining split vs. unsplit compartments and customers. A branch-and-cut algorithm (applicable to all the variations of the emerging problem) is provided.

Table 1 summarizes the major features of the fuel distribution problems covered by the existing published work. The last row presents (in bold) the features of the FDP-UPLS. To facilitate the comparison with the features of the studies reported in the literature, we mark with bold font the features which are similar to those covered by our work.

Table 1 Overview of the fuel distribution features covered in the existing literature

Based on Table 1, the literature lacks models that take into account explicitly: (i) loading practices to attain balanced loading in every route segment, and (ii) the sequencing implications of the loading activities at the supply depot. The work presented in this paper aims to fill this gap as follows:

  • We provide a refined MIP formulation of the FDP-UPLS in which we explicitly incorporate the unloading sequence rule of compartments (Middle, Rear, Front) and the truck loading sequencing subproblem.

  • We develop an ALNS algorithm for addressing the FDP-UPLS in which we introduce the following novelties:

    • A giant-tour heuristic (GTRS) is developed for determining a starting feasible solution for the proposed problem. The novelty of this heuristic lies in the splitting procedure which implements a label-setting algorithm customized for tackling the special features of the problem (multiple trips per vehicle, sequencing loading operations at the supply depot). It is proven to provide high-quality solutions.

    • A new ALNS (repair) operator that applies the giant-tour heuristic to repair the partially destroyed solution.

  • We assess the effect of the precedence unloading constraints on the traveled distance.

The contribution of this paper to practice is twofold. This is the first work that identifies the significance of the interplay between scheduling the loading activities and the routing decisions. It is worth noting that similar issues may arise in other industries where the number of loading activities exceeds the loading positions (of a warehouse). In addition, our work contributes to practice through the development of a computational tool (the ALNS algorithm) for addressing a routing problem arising in the everyday planning operations of any fuel distribution company. The incorporation of this tool in the relevant decision-making framework will accommodate the dispatchers/planners’ work in producing efficient and safe delivery routes while managing efficiently the truck loading operations at the depot.

3 Mathematical model

3.1 Problem statement and attributes

The FDP-UPLS involves planning delivery routes for servicing a set of liquid fuel orders \(\mathcal{D}\), through a fleet of multi-compartment vehicles \(V\). An order \(i\in \mathcal{D}\) includes quantities from one or more fuel in \(P\) (set of liquid fuels), henceforth referred to as item(s) of order \(i\) and denoted by \({\Pi }_{i}\). More formally, each order item \(r\in {\Pi }_{i}\) is defined by the requested volume quantity \({\pi }_{r}\) of a specific fuel \({p}_{r}\in P\). A major feature of the FDP-UPLS is that the sequence of orders assigned to a truck \(v\) is not sufficient for defining a feasible delivery route. Each route \(\mathcal{R}\) of vehicle \(v\) must be also associated with a feasible assignment of the orders’ quantities to the compartments of \(v\), which is henceforth referred to as a loading plan of \(v\) for executing \(\mathcal{R}\). Given the customer’s consent, the delivered quantity of an order item \(r\) is allowed to be (marginally) lower than the requested quantity \({\pi }_{r}\) (by up to a given maximum proportion \({\beta }_{r}\), e.g. 0.05). This type of service flexibility is meant to facilitate the task of determining feasible loading plans while planning delivery routes. The service time of order \(i\) (denoted by \({s}_{i}\)) is assumed known.

The fleet of trucks \(V\) is heterogeneous and consists of \(m\) types of vehicles, \(M=\{\mathrm{1,2},..,m\}\), ranked in ascending order of their weight capacity (i.e., a vehicle of type \(\vartheta \) has lower weight capacity than a vehicle of type \((\vartheta +1\))). The number of vehicles per type is fixed and known in advance. The set of vehicles of type \(\vartheta \) is denoted by \({V}_{\vartheta }\). Each vehicle \(v\in V\) involves a tank partitioned to a series of (non-identical) compartments \({\rm K}_{v}\), classified in one of the following three categories: Front (\({K}_{v}^{F}\)), Middle (\({K}_{v}^{M}\)), and Rear (\({K}_{v}^{R}\)). We denote with \({Q}_{vc}\) the volume capacity of compartment \(c\) (of vehicle \(v\)). \({B}_{v}\) denotes the net weight capacity of vehicle \(v\). Appendix A provides the notation used throughout the paper.

The objective of the FDP-UPLS is to determine delivery routes for the vehicles in \(V\) (multiple trips are allowed) and schedule the corresponding loading activities so that the total traveled distance is minimized and the following constraints are satisfied:

  • Orders’ service is unsplit (i.e., each order is serviced by a single vehicle through a single visit),

  • Any vehicle \(v\) of type \(\vartheta \) (\(v\epsilon {V}_{\vartheta }\)) may perform up to \({\delta }_{\vartheta }\) trips per day (for convenience, the maximum number of trips of \(v\) is denoted by \({\delta }_{v}\) (\({\delta }_{v}={\delta }_{\vartheta }\)),

  • Every loading activity is assigned to a single loading slot in \(T\),

  • Each loading slot can be assigned up to \(\xi \) loading activities,

  • Any delivery route must start and finish (upon the vehicle’s return at the depot) within time window [\({a}_{0},{b}_{0}\)],

  • Vehicle compartments are considered unsplit (no more than one order item can be assigned to each compartment),

  • The quantity assigned to a vehicle compartment should not exceed its volume capacity,

  • The proportion of unmet order quantity should not exceed \({\beta }_{r}\in [\mathrm{0,1})\). The value of parameters \({\beta }_{r}\) is specified in collaboration with the corresponding customer and may vary across customers and fuel types,

  • The sequence of deliveries must respect the unloading precedence constraints (MRF rule).

Despite the consent of customers for a marginal reduction in the ordered quantities, extensively using this practice may affect the level of service of the fuel distribution company. Therefore, minimizing the total unmet orders quantity is treated as a secondary objective of the FDP-UPLS.

Clearly, the MRF rule incorporated into the problem complicates substantially the task of determining feasible loading plans. Example 1 clarifies further the MRF loading rule.

Example 1

Figures 1 and 2 illustrate a feasible and an infeasible loading plan (with respect to the unloading precedence constraint) for a vehicle \(v\) that performs a route visiting customers \({i}_{1}, {i}_{2}\) and \({i}_{3}\) (in this sequence). Any customer’s order involves fuel types \(P=\{A,B\}\) and its items are expressed by tuples indicating the requested quantity and the fuel (A or B). The orders under consideration are the following: \({\Pi }_{{i}_{1}}=\{(2500,A)\), \((2500,B)\}\), \({\Pi }_{{i}_{2}}=\{(2500,A)\), \((7000,B)\}\) and \({\Pi }_{{i}_{3}}=\{(2750,A)\), \(\left(7000,B\right)\}\) respectively (all quantities in L). For convenience, each order item is denoted by \({r}_{{i}_{k}p}\) with \(k\in \{\mathrm{1,2},3\}\) and \(p\in \{A,B\}\). The order item and the corresponding quantity assigned to each compartment are indicated inside the compartments (in both Figures). Volume capacities (in L) are written on top of the compartments.

Fig. 1
figure 1

Illustration of the loading plan 1 and the unloading sequence of the vehicle compartments

Fig. 2
figure 2

Illustration of the loading plan 2 and the unloading sequence of the vehicle compartments

Loading plan 1 is compatible with the unloading precedence constraints MRF. The sequence of unloading compartments is as follows: middle compartments \(\{{c}_{5},{c}_{6}\}\) at the first stop, \({c}_{4}\) from the middle group and compartments {\({c}_{7}\), \({c}_{8}\)} from the rear group at the second stop, and all front compartments {\({c}_{1}\), \({c}_{2}\), \({c}_{3}\)} at the third stop.

However, loading plan 2 (Fig. 2) violates the unloading precedence constraint. Middle compartments {\({c}_{5},\) \({c}_{6}\)} are unloaded at the first stop (customer \({i}_{1}\)). However, the service of \({i}_{2}\) at the second stop involves unloading the middle compartment (\({c}_{4}\)) and the front compartments {\({c}_{1}\), \({c}_{3}\)} while the rear compartments have not been unloaded yet. Thus, the delivery at the second stop breaks the MFR rule.

3.2 Mathematical formulation

The FDP-UPLS is defined on a graph \(G(N,A)\) where \(N\) is the set of nodes representing customers’ locations, the origin \({i}_{0}\) and the destination \({i}_{n+1}\) of the delivery routes (both referring to the depot), and \(A\) is the set of arcs. Each arc \((i,j)\in A\) represents the shortest-distance path that connects nodes \(i\epsilon N\backslash \{{i}_{n+1}\}\) and \(j\epsilon N\backslash \{{i}_{0}\}\) and it is associated to distance \({d}_{ij}\) and travel time \({t}_{ij}\). It is worth mentioning that a vehicle traversing arc \(({i}_{0},{i}_{n+1})\) implies that it remains idle at the depot. The distance and travel time of arc (\({i}_{0},{i}_{n+1}\)) are set equal to zero. Table 2 presents the decision variables of the proposed mathematical formulation. To facilitate the definition of the loading-related decision variables, we denote by \(\Pi \) (\(=\bigcup_{i\in N}{\Pi }_{i}\)) the entire set of order items set by all customers and \(K (=\bigcup_{v\in V}{\rm K}_{v})\) the superset of all vehicles’ compartments.

Table 2 Definition of the decision variables used in the mathematical formulation of FDP-UPLS

The mathematical formulation of the FDP-UPLS is given by (1)–(39).

$$Min \left\{{Z}_{1}+{\mathcalligra{b}}\cdot {Z}_{2}\right\}$$
(1)

where:

$${Z}_{1}=\sum_{v\in V}\sum_{\zeta \in \left\{1,.,{\delta }_{v}\right\}}\sum_{i\in N\backslash \{{i}_{n+1}\}}\sum_{j\in N\backslash \{{i}_{0}\}}{x}_{ijv}^{\zeta }\cdot {d}_{ij}$$
$${Z}_{2}=\sum_{r\in \Pi }{u}_{r}$$

The objective functions \({Z}_{1}\) and \({Z}_{2}\) measure the total ravelled distance of the vehicles and the total unmet orders’ quantity, respectively. They are treated lexicographically (\({Z}_{1}\) is the primary objective and \({Z}_{2}\) the secondary), and they are incorporated in the mathematical model through their weighted sum in which \({Z}_{2}\) is multiplied by a very small positive real number \({\mathcalligra{b}}\in {R}_{+}\).

3.2.1 Routing Constraints

$${\sum }_{v\in V}\sum_{\zeta \in \{1,.,{\delta }_{v}\}}{\sum }_{i\in N\backslash \{{{\text{i}}}_{{\text{n}}+1}\}}{x}_{ijv}^{\zeta }=1 j\in {\rm N}\backslash \{{i}_{0},{i}_{n+1}\},$$
(2)
$${\sum }_{i\in N\backslash \{{i}_{n+1}\}}{x}_{ijv}^{\zeta }-{\sum }_{i\in N\backslash \{{i}_{0}\}}{x}_{jiv}^{\zeta }=0 j\in {\rm N}\backslash \{{i}_{0},{i}_{n+1}\}, v\in {\text{V}}, \zeta \in \{1,.,{\delta }_{v}\}$$
(3)
$${\sum }_{j\in N\backslash \{{i}_{0}\}}{x}_{{i}_{0}jv}^{\zeta }=1 v \; \in \,{\text{V}},\ \zeta \; \in \{1,.,{\delta }_{v}\}$$
(4)
$${\sum }_{j\in N\backslash \{{i}_{n+1}\}}{x}_{j{i}_{n+1}v}^{ \, \zeta }=1 v \quad \in {\text{V}}, \zeta \in \{1,.,{\delta }_{v}\}$$
(5)
$${x}_{{i}_{0}{i}_{n+1}v}^{\zeta +1}\ge {x}_{{i}_{0}{i}_{n+1}v}^{\, \zeta } v\in {\text{V}}, \zeta \quad \in \{1,.,{\delta }_{v}-1\}$$
(6)

Constraint (2) states that each customer order is serviced by exactly one vehicle through a single visit. Constraint (3) implies that if a vehicle \(v\) arrives at a customer \(j\), it has to leave from \(j\) as well. Constraint (4) forces each vehicle to depart from the depot while constraint (5) ensures the return of each vehicle to the depot respectively. Constraint (6) states that if vehicle \(v\) does not perform its \({\zeta }^{th}\) trip (i.e., it traverses arc (\({i}_{0},{i}_{n+1}\)) on its \({\zeta }^{th}\) trip) then it does not perform its \(({\zeta +1)}\)th trip either.

3.2.2 Scheduling Constraints

$${y}_{0v}^{\zeta }+{t}_{{i}_{0}j}-\left(1-{x}_{{i}_{0}jv}^{\zeta }\right){\cdot \mathcal{M}}_{1}\le {y}_{j} j\in {\rm N}\backslash \{{i}_{0},{i}_{n+1}\}, v\in {\text{V}}, \zeta \in \{1,.,{\delta }_{v}\}$$
(7)
$${y}_{j}+({t}_{j{i}_{n+1}}+{s}_{j})-\left(1-{x}_{j{i}_{n+1}v}^{\zeta }\right)\cdot {\mathcal{M}}_{1}\le {y}_{\left(n+1\right)v}^{\zeta } j \quad \in \;{\rm N}\backslash \{{i}_{0},{i}_{n+1}\}, v\in {\text{V}}, \zeta \in \{1,.,{\delta }_{v}\}$$
(8)
$${y}_{i}+\left({t}_{ij}+{s}_{i}\right)-\left(1-{x}_{ijv}^{\zeta }\right){\cdot \mathcal{M}}_{1}\le {y}_{{\text{j}}} i,j \;\in \;{\rm N}\backslash \{{i}_{0},{i}_{n+1}\}, v\in {\text{V}}, \zeta \in \{1,.,{\delta }_{v}\}$$
(9)
$${y}_{0v}^{\zeta +1}-\gamma \ge {y}_{\left(n+1\right)v}^{\zeta } \zeta \;\in \;\{1,.,{\delta }_{v}-1\}, v\in V$$
(10)
$${\sum }_{j\in N\backslash \{{i}_{0},{i}_{n+1}\}}{x}_{{i}_{0}jv}^{\zeta }=\sum_{\uptau \in \mathrm{\rm T}}{\sigma }_{v\tau }^{\zeta } v\;\in\; V, \zeta \in \{1,.,{\delta }_{v}\}$$
(11)
$${y}_{0v}^{\zeta }=\left(\sum_{\tau \in {\rm T}}{\sigma }_{v\tau }^{\zeta }\cdot {\mathcal{e}}_{\tau }\right)+\gamma v \;\in\; V, \zeta \in \{1,.,{\delta }_{v}\}$$
(12)
$${\sum }_{v\in V}\sum_{\zeta \in \{1,.,{\delta }_{v}\}}{\sigma }_{v\tau }^{\zeta }\le \xi \tau \in {\rm T}$$
(13)
$${a}_{0}\le {y}_{0v}^{\zeta }\le {b}_{0} \, v\in {\text{V}}, \zeta \in \{1,.,{\delta }_{v}\}$$
(14)
$${a}_{0}\le {y}_{(n+1)v}^{\zeta }\le {b}_{0}\, v\in {\text{V}}, \zeta \in \{1,.,{\delta }_{v}\}$$
(15)

\({\mathcal{M}}_{1}\) used in constraints (7)–(9) represents a big number (such that the corresponding inequalities hold irrespective of the values of the variables) (Desrochers et al., 1988). Constraint (7) implies that if \(j\) is the first stop of a route of vehicle \(v\), then the earliest service start time of \(j\) occurs at or after the arrival of \(v\) at \(j\). It is worth noting that the arrival time at \(j\) is computed by incrementing the earliest departure time from the origin (\({y}_{0v}^{\zeta }\)) by the travel time on arc (\({i}_{0},j\)). Constraint (8) indicates that if \(j\) is the last stop of a route then the return time at the destination is computed by incrementing the service start time \({y}_{j}\) by the service time duration at customer \(j\) and the travel time for returning back to the depot. Constraint (9) states that if customer \(j\) is visited by \(v\) right after customer \(i\) then the service of \(j\) starts at or after the arrival time of \(v\) at \(j\). Constraint (10) implies that the loading start time of \(v\) on its \({(\zeta +1)}^{th}\) trip (left-hand side) takes place at or after its return at the depot from its previous trip \(\zeta \). Constraint (11) states that any trip performed by vehicle \(v\) must be assigned exactly one loading slot. Constraint (12) implies that departure time of the \({\zeta }^{th}\) trip of vehicle \(v\) may occur only after the relevant loading activity (scheduled at slot \(\tau \)) is completed (i.e., \(\gamma \) minutes later from \({e}_{\tau }\)). The expression within the parenthesis of the left-hand side of (12) represents the loading start time of the truck. Constraint (13) indicates that the maximum number of loading activities assigned at time slot \(\tau \) is \(\xi \) (the number of available loading facilities). Constraints (14) and (15) ensure that the departure time and the return time of any route occur within the depot’s time window [\({a}_{0},{b}_{0}\)] of the depot.

3.2.3 Weight and Volume Capacity Constraints

$${\sum }_{c\in {K}_{v}}{\sum }_{r\in \Pi }{q}_{cr}^{\zeta }\cdot {\rho }_{r}\le {B}_{v} v \; \in\; V, \, \zeta \in \{1,.,{\delta }_{v}\}$$
(16)
$${q}_{cr}^{\zeta } \le {{z}_{cr}^{\zeta }Q}_{vc} r \;\in\; \Pi , v\in V, \, \zeta \in \left\{1,.,{\delta }_{v}\right\},c\in {K}_{v}$$
(17)
$${\pi }_{r}-\sum_{\zeta \in \left\{1,.,{\delta }_{v}\right\}}\sum_{v\in V}\sum_{c\in {K}_{v}}{q}_{cr}^{\, \zeta }\le {u}_{r} r \;\in\; \Pi $$
(18)
$${{\beta }_{r}\cdot {\pi }_{r}\ge u}_{r}\, r \;\in \;\Pi $$
(19)

Constraint (16) implies that the total weight of the order items assigned to trip \(\zeta \) of vehicle \(v\) should not exceed \({B}_{v}\) (note that \({\rho }_{r}\) denotes the specific weight of the fuel involved in order item \(r\)). Given that the specific weight of the liquid fuel are below 1, the weight capacity of the truck is more constraining than the corresponding volume capacity. Hence there is no need to include a similar constraint for the volume capacity of the truck. Constraint (17) ensures that the fuel quantity assigned to compartment \(c\) does not exceed its volume capacity \({Q}_{vc}\). Constraint (18) defines \({u}_{r}\) as the quantity of unmet demand for order item \(r\) (expressed by the difference of the loaded item quantity from \({\pi }_{r}\)). Constraint (19) indicates that the unmet quantity of an order item \(r\) should not exceed \({\beta }_{r}\) (e.g., 0.05) of the item quantity.

3.2.4 Loading Constraints

$$\sum_{v\in V}\sum_{\zeta \in \left\{1,.,{\delta }_{v}\right\}}\sum_{c\in {K}_{v}}{z}_{cr}^{\zeta }\ge 1 r\; \in \; \Pi $$
(20)
$$\sum_{r \;\; \in\; \;\Pi }{z}_{cr}^{\zeta }\le 1 v\in V, \zeta \;\; \in \left\{1,.,{\delta }_{v}\right\}, c\in {K}_{v}$$
(21)
$${\sum }_{j\in {\text{N}}\backslash \{{i}_{0}\}}{x}_{ijv}^{\zeta }\le \sum_{r\in {\Pi }_{i}}\sum_{c\in {\rm K}_{v}}{z}_{cr}^{\zeta } v\;\in \;V, \zeta \in \left\{1,.,{\delta }_{v}\right\}, i\in {\rm N}\backslash \{{i}_{0},{i}_{n+1}\},$$
(22)
$$\left|{K}_{v}\right|\cdot {\sum }_{j\in {\text{N}}\backslash \{{i}_{0}\}}{x}_{ijv}^{\zeta }\ge \sum_{r\,\in {\Pi }_{i}}\sum_{c\in {\rm K}_{v}}{z}_{cr}^{\zeta } v\;\in\; V, \zeta \in \left\{1,.,{\delta }_{v}\right\}, i\in {\rm N}\backslash \{{i}_{0},{i}_{n+1}\},$$
(23)

Constraint (20) ensures that every order item \(r\) is assigned to one or more vehicle compartments. Constraint (21) states that each compartment can be assigned up to one order item (per trip). Constraint (22) implies that if none of the order items of customer \(i\) is assigned to vehicle \(v\) (i.e., the right-hand side is zero) then customer \(i\) is not visited by \(v\) (i.e., left hand side is forced to zero). Constraint (23) implies that if there exists at least one order item of \(i\) assigned to vehicle \(v\) (i.e., right hand side is non-zero) then customer \(i\) must be visited by \(v\) (i.e., \({\sum }_{j\in {\text{N}}\backslash \{{i}_{0}\}}{x}_{ijv}^{\zeta }\) on the left-hand side is forced to value 1). Given that every customer \(i\) is visited exactly once by a single vehicle (constraints 2–5), constraints (22) and (23) in conjunction with (2)–(5), imply that customer \(i\) is visited by vehicle \(v\) (on its \({\zeta }^{th}\) trip) if and only if its order items have been assigned to the vehicle’s compartments.

3.2.5 Combined Routing and Loading Constraints

$$\sum_{j\in {\rm N}\backslash \{{i}_{0}\}}{w}_{{i}_{0}jc}^{\zeta }=\sum_{r\in \Pi }{q}_{cr}^{\zeta }\cdot {\rho }_{r}, \zeta \in \left\{1,.,{\delta }_{v}\right\}, c\in {K}_{v}, v\in V$$
(24)
$${w}_{i{i}_{n+1}c}^{\zeta }=0, i\in {\rm N}\backslash \{{i}_{n+1}\}, \zeta \in \left\{1,.,{\delta }_{v}\right\}, c\in {K}_{v}, v\in V$$
(25)
$$\sum_{i\in N\backslash \{{i}_{n+1}\}}{w}_{ijc}^{\zeta }-\sum_{i\in N\backslash \{{i}_{0}\}}{w}_{jic}^{\zeta }=\sum_{r\in {\Pi }_{j}}{q}_{cr}^{\zeta }{\rho }_{r}, \zeta \in \left\{1,.,{\delta }_{v}\right\}, c\in {K}_{v}, v\in V, j\in {\rm N}\backslash \{{i}_{0},{i}_{n+1}\}$$
(26)
$${w}_{ijc}^{\zeta }\le {f}_{ijc}^{\zeta }\cdot {Q}_{vc}, \left(i,j\right)\in A, c\in {K}_{v}, v\in V, \zeta \in \left\{1,.,{\delta }_{v}\right\}$$
(27)
$${w}_{ijc}^{\zeta }\ge {f}_{ijc}^{\zeta }, \left(i,j\right)\in A, c\in {K}_{v}, v\in V, \zeta \in \left\{1,.,{\delta }_{v}\right\}$$
(28)
$${w}_{ijc}^{\zeta }\le {x}_{ijv}^{\zeta }\cdot {B}_{v}, \left(i,j\right)\in A, c\in {K}_{v}, v\in V, \zeta \in \left\{1,.,{\delta }_{v}\right\}$$
(29)

Constraint (24) define variables \({w}_{{i}_{0}jc}^{\zeta }\) as the weight of the load carried by each compartment of a vehicle \(v\) upon leaving the depot (heading to\(j\)) on its \(\zeta \) trip. Constraint (25) enforces all compartments of a vehicle \(v\) to be empty upon its return to the depot. Constraint (26) implies that the difference of the payload of a vehicle compartment right before entering and after leaving customer \(j\) is equal to the weight of the quantity of order \(j\) assigned to this compartment. Constraints (27) to (29) facilitate the definition of variables\({f}_{ijc}^{\zeta }\). If compartment \(c\) of vehicle \(v\) is non-empty while the vehicle moves from node \(i\) to node \(j\) (i.e., \({w}_{ijc}^{\zeta }>0\)) then constraint (27) forces the corresponding binary variable \({f}_{ijc}^{\zeta }\) to take value 1. It is worth noting that the value of \({Q}_{vc}\) is in litres and therefore it is always higher than the value of the weight of any possible load (in kg) inside the compartment (since the specific weight of the liquid fuel under consideration is below 1). On the other hand, if compartment \(c\) is empty while moving from node \(i\) to node \(j\) (i.e., \({w}_{ijc}^{\zeta }=0\)), then constraint (28) forces \({f}_{ijc}^{\zeta }\) to take value 0. For constraint (28) to hold it is assumed that any load assigned to any compartment \(c\) must be at least 1 kg (which is realistic for the FDP-UPLS). Constraint (29) implies that if a vehicle \(v\) is not traversing arc (\(i,j\)) on its \({\zeta }^{th}\) trip then variables \({w}_{ijc}^{\zeta }\) for \(c\in {K}_{v}\) are forced to zero.

Unloading Precedence Constraints

$${g}_{ijv}^{(F)\zeta }\cdot {B}_{v}\ge \sum_{c\in {K}_{v}^{F}}{w}_{ijc}^{\zeta }\;\;\; \left(i,\,j\right)\in A, v\in V, \zeta \in \left\{1,.,{\delta }_{v}\right\}$$
(30)
$$ g_{ijv}^{\left( F \right)\zeta } \le \mathop \sum \limits_{{c \in K_{v}^{F} }} w_{i\,jc}^{\zeta } \quad \left( {i,j} \right) \in A, \;\;v \in V, \;\;\zeta \in \left\{ {1,.,\delta_{v} } \right\} $$
(31)
$$ g_{ijv}^{\left( M \right)\zeta } \cdot B_{v} \ge \mathop \sum \limits_{{c \in K_{v}^{M} }} w_{ijc}^{\zeta } \quad \left( {i,j} \right) \in A, v \in V, \zeta \in \left\{ {1,.,\delta_{v} } \right\} $$
(32)
$$ g_{ijv}^{\left( M \right)\zeta } \le \mathop \sum \limits_{{c \in K_{v}^{M} }} w_{ijc}^{\zeta } \;\;\; \left( {i,j} \right) \in A, v \in V, \zeta \in \left\{ {1,.,\delta_{v} } \right\} $$
(33)
$$ g_{ijv}^{\left( R \right)\zeta } \cdot B_{v} \ge \mathop \sum \limits_{{c \in K_{v}^{R} }} w_{ijc}^{\zeta } \quad \left( {i,j} \right) \in A, \;\;v \in V,\; \zeta \in \left\{ {1,.,\delta_{v} } \right\} $$
(34)
$$ g_{ijv}^{\left( R \right)\zeta } \le \mathop \sum \limits_{{c \in K_{v}^{R} }} w_{ijc}^{\zeta }\;\;\; \left( \,{i,j} \right) \in A, v \in V, \zeta \in \left\{ {1,.,\delta_{v} } \right\} $$
(35)
$$ g_{{i_{0} jv}}^{\left( M \right)\zeta } \ge g_{{i_{0} jv}}^{\left( R \right)\zeta }\;\;\;j \in N\backslash \left\{ {i_{0} ,i_{n + 1} } \right\}, v \in V, \zeta \in \left\{ {1,.,\delta_{v} } \right\} $$
(36)
$$ g_{{i_{0} jv}}^{\left( R \right)\zeta } \ge g_{{i_{0} jv}}^{\left( F \right)\zeta }\;\;\; j \in N\backslash \left\{ {i_{0} ,i_{n + 1} } \right\}, v \in V, \zeta \in \left\{ {1,.,\delta_{v} } \right\} $$
(37)
$$\left(1-\sum_{\mathcal{k}\in {\rm N}\backslash \{{i}_{0},{i}_{n+1}\}}{f}_{{i}_{0}\mathcal{k}c}^{\zeta }\right){\cdot \mathcal{M}}_{2}+{f}_{ijc}^{\zeta }\ge {g}_{ijv}^{\left(M\right)\zeta } , \left(i,j\right)\in A, v\in V, c\in {K}_{v}^{R}, \zeta \in \left\{1,.,{\delta }_{v}\right\}$$
(38)
$$\left(1-\sum_{\mathcal{k}\in {\rm N}\backslash \{{i}_{0},{i}_{n+1}\}}{f}_{{i}_{0}\mathcal{k}c}^{\zeta }\right){\cdot \mathcal{M}}_{2}+{f}_{ijc}^{\zeta }\ge {g}_{ijv}^{\left(R\right)\zeta }, \left(i,j\right)\in A, v\in V, c\in {K}_{v}^{F}, \zeta \in \left\{1,.,{\delta }_{v}\right\} $$
(39)

Constraints (30) and (31) facilitate the definition of variables\({g}_{ijv}^{(F)\zeta }\). If there exists at least one front compartment of vehicle \(v\) that is not empty (i.e., the right-hand side of (30) is positive) while \(v\) traverses arc (\(i,j\)) then constraint (30) forces \({g}_{ijv}^{(F)\zeta }\) to take value 1. On the other hand, if all front compartments are empty (i.e., the right-hand side of (31) is zero) then constraint (31) forces the corresponding variable \({g}_{ijv}^{(F)\zeta }\) to take value 0. Similarly, constraints (32)–(33) and (34)–(35) facilitate the definition of variables \({g}_{ijv}^{(M)\zeta }\) and \({g}_{ijv}^{(R)\zeta }\) respectively. Constraint (36) implies that (upon leaving the depot) the loading plan for a vehicle \(v\) must comply with the following rule: if the middle group of compartments (at least one) is non-empty (i.e., \({g}_{{i}_{0}jv}^{\left(M\right)\zeta }=1\)) then the rear compartments (at least one) must be non-empty as well (i.e., \({g}_{{i}_{0}jv}^{\left(R\right)\zeta }=1\)). By constraint (36) we avoid a situation in which all rear compartments are empty at the beginning of the trip while the middle compartments are non-empty. Similarly, constraint (37) implies that (upon leaving the depot) the loading plan for vehicle \(v\) must also comply with the following rule: if the rear group of compartments (at least one) is non-empty then the front compartments (at least one) must be non-empty as well. Constraints (38)–(39) enforce the unloading precedence rule. Constraint (38) implies that none of the rear compartments can be unloaded unless all middle compartments have been unloaded first. In more detail, if rear compartment \(c\) is non-empty at the beginning of the trip then the following statement is true: if the middle group of compartments (at least one) is still non-empty (i.e., \({g}_{ijv}^{(M)\zeta }=1\)) when arc (\(i,j\)) is traversed by \(v\) then the rear compartment \(c\) should also be non-empty, i.e., \({f}_{ijc}^{\zeta }\) should take value 1. It is worth noticing that if a rear compartment is non-empty at the beginning of the route then (due to constraint (36)) there should be at least one non-empty middle compartment of vehicle \(v\) as well. Similarly constraint (39) implies that none of the front compartments can be unloaded unless all rear compartments have become empty.

Additional Valid Inequalities

$$\sum_{i\in N\backslash \{{i}_{0},{i}_{n+1}\}}\left(\sum_{j\in N\backslash \{{i}_{0}\}}{x}_{ijv}^{\zeta }\right)\cdot {\mu }_{iv}\le \left|{K}_{v}\right| , v\in V, \zeta \in \left\{1,.,{\delta }_{v}\right\}$$
(40)

where

$${\mu }_{iv}=\sum_{r\in {\Pi }_{i}}\lceil\frac{{\pi }_{r}}{{\text{max}}\{{Q}_{vc}: c\in {K}_{v}\}}\rceil$$
(41)

Constraint (40) implies that the minimum number of compartments needed by the load (of the orders) assigned to vehicle \(v\) should not exceed the number of compartments of \(v\). Note that \({\mu }_{iv}\) expresses the minimum number of compartments of vehicle \(v\) required by the items of order i (\(\left\lceil a \right\rceil\) symbolizes the closest integer that is larger than or equal to \(a\), where \(a\) is a real number). Preliminary tests on small sized test problems (using Cplex 12.6) showed that constraint (40) reduces the computational time for solving the proposed problem.

3.3 Routing implications of sequencing loading activities

We argue that the number of the available loading positions at the depot may affect the travelled distance of the delivery trucks. The intuition behind this statement is that the lower the number of loading facilities, the more routes are needed to service demand within [\({a}_{0},{b}_{0}\)]. Example 2 illustrates this issue.

Example 2

Table 3 presents the order items of six customers, all located in Athens, Greece. The service time at each customer is 40 min and the loading time per truck is 1.5 h. The loading positions of the depot are available from 07:00 AM to 12:00 PM. The fleet consists of four different vehicles (presented in Table 4). The size of the vehicle compartments are provided in Appendix C.

Table 3 Customers and order items of example 2
Table 4 Vehicles Net Weight capacity and number of compartments

The above instance of the FDP-UPLS was solved to optimality with the Cplex 12.6 MIP solver (through Java) for: (i) three loading stations, vs. (ii) two loading stations. Table 5 presents the routes of the optimal solutions determined in these two scenarios. When three loading positions are available, the optimal solution consists of three routes (of two customers each) with total traveled distance of 168.9 km. Each loading activity is assigned to the first loading slot starting at 07:00 (i.e., time slot 07:00–08:30). Departure from the depot takes place right after the loading activity processing terminates (90 min later) at 08:30. The return time of each route takes place only a few minutes before the depot closing time (12:00). In the second scenario where two loading stations are available, the relevant optimal solution involves four routes. The loading activities of two of the routes start at 07:00 (i.e., time slot 07:00–08:30) engaging both loading positions. Any additional loading activity may only be scheduled at the second slot starting at 08:30 (i.e., time slot 08:30–10:00). This practically makes it impossible to sustain a third route with two customers departing at 10:00. This implication leads to an optimal solution where two additional routes of a single customer each are formed. The travelled distance of the solution determined for two loading stations rises to 195.3 km. A detailed description of how the items are loaded on the vehicle compartments for both solutions is provided in Appendix C.

Table 5 Description of the solutions determined in example 2 for 3 vs. 2 loading stations

4 Solution algorithm

Although local search has been proven to be an effective solution methodology for Vehicle Routing Problems, the unloading precedence constraints of the FDP-UPLS tend to impede its performance. The execution of small changes on the incumbent solution would make it difficult to determine feasible neighbours or move the search to other more promising solution areas. Therefore, we turned to the Adaptive Large Neighbourhood Search (ALNS) technique which has the capability to apply substantial rearrangements to the incumbent solution. Starting with an initial solution, the ALNS algorithm iteratively destroys and repairs part of the incumbent solution, searching for improved neighbours. We developed and applied an ALNS algorithm with various novel attributes.

A complex task that comes up many times throughout the iterations of the proposed algorithm, relates to determining a feasible loading plan of a route formed for vehicle \(v\). The emerging problem is referred to as the Route Loading problem. Appendix B provides a MIP formulation of the problem. Any instance of the Route Loading Problem that arises throughout the execution of the proposed algorithm is solved by Cplex 12.6.

4.1 Determining the initial solution

The initial FDP-UPLS solution is determined by a giant-tour heuristic algorithm. This type of heuristic has been used for various vehicle routing problems (Koç et al, 2015; Prins, 2004, 2009; Vidal et al., 2012, 2013). It consists of two phases: (i) it builds a tour that visits all the customers, and (ii) it splits the tour to segments that can be transformed to an FDP-UPLS routes. The splitting procedure is highly refined since it transforms the tour to an acyclic graph on which a Resource Constrained Shortest Path Problem (RCSPP) is defined and solved. The graph is designed such that any solution to the RCSPP corresponds to an FDP-UPLS solution. The novelties of this splitting procedure are on: (i) incorporating the special attributes of the FDP-UPLS (loading sequencing, assigning orders to compartments, unloading precedence constraints, multiple trips per truck) in the RCSPP and (ii) developing a dynamic programming algorithm for solving the emerging RCSPP.

The incorporation of the proposed giant-tour heuristic into the ALNS proved to provide high quality initial solutions to hard constrained instances of the FDP-UPLS. Henceforth, the proposed heuristic that determines an initial feasible solution for the FDP-UPLS is referred to as the Giant-Tour based Routing and Scheduling (GTRS) heuristic.

4.1.1 Giant-tour construction

The giant-tour is formed by an insertion heuristic. The first customer inserted in the tour is the one that lies farthest from the depot. The insertion cost \(c({i}_{k},u, {i}_{k+1})\) of customer \(u\) in a position (\({i}_{k}, {i}_{k+1}\)) of the tour is defined by (42):

$$c\left({i}_{k},u, {i}_{k+1}\right)=({d}_{{i}_{k}u}+{d}_{{ui}_{k+1}}-{d}_{{i}_{k}{i}_{k+1}})\cdot (1+{(-1)}^{{h}_{1}}\cdot {\lambda }^{{h}_{2}})$$
(42)

where \({h}_{1}\) takes randomly value \(0\) or \(1\), \(\lambda \) is a random number in \((\mathrm{0,1})\) and \({h}_{2}\) is an integer number. The second parenthesis comprise a randomization factor that either increases or decreases the insertion cost by a proportion of (\({\lambda }^{{h}_{2}}\)). The higher the value of \({h}_{2}\) the smaller is the random perturbation of the insertion cost value (first parenthesis of (42)). The customer with the minimum insertion cost is selected and inserted in the corresponding position of the tour. The process is repeated until all customers are inserted in the tour.

4.1.2 Splitting procedure

The objective of the splitting procedure is to partition the giant-tour to a series of segments of stops (customers), each one defining a feasible FDP-UPLS route. The major feature of the proposed split procedure is that, among all possible partitions of the tour, it determines the one that results to routes of minimum total distance.

To consider all possible segmentations of the tour \(({i}_{0}, {i}_{1}, {i}_{2}, .. ., {i}_{n}, {i}_{0})\), it is transformed to an acyclic directed graph \(\mathcal{G}(\mathcal{N},\mathcal{A})\), where the nodes \(\mathcal{N}\) correspond to stops \({\{i}_{0}, {i}_{1}, {i}_{2}, .. ., {i}_{n}\}\) of the tour (\({i}_{0}\) is the depot), and \(\mathcal{A}\) includes only arcs of the form (\({i}_{k},{i}_{k+l}\)), each one corresponding to tour segment \(({i}_{k+1}, {i}_{k+2},.. ., {i}_{k+l} )\). It is worth noticing that the set of arcs \(\mathcal{A}\) contains an arc (\({i}_{k},{i}_{k+l}\)) only if the sequence of stops of the corresponding segment \(({i}_{k+1}, {i}_{k+2},.. ., {i}_{k+l} )\) can be feasibly loaded on at least one vehicle type \(\vartheta \in \Theta \). This type of feasibility check is performed by solving the relevant Route Loading Problem. The set of available vehicle types that can be loaded with the orders (\({i}_{k+1}, {i}_{k+2},.. ., {i}_{k+l}\)), is denoted by \({\Theta }_{{i}_{k}{i}_{k+l}}\). The vehicle type \(\vartheta \epsilon {\Theta }_{{i}_{k}{i}_{k+l}}\) with the minimum weight capacity is denoted by \({\vartheta }_{{i}_{k}{i}_{k+l}}\).

An important attribute of the graph \(\mathcal{G}(\mathcal{N},\mathcal{A})\) is that any path from node \({i}_{0}\) to node \({i}_{n}\) corresponds to an alternative segmentation of the giant-tour. By definition, every arc (\({i}_{k},{i}_{k+l}\)) of the path corresponds to a route (denoted by \({R}_{({i}_{k},{i}_{k+l})}\)) formed by the sequence of stops in the relevant tour segment (\({i}_{k+1}, .. ., {i}_{k+l}\)). Given this correspondence between arcs and routes, any path of the graph \(\mathcal{G}(\mathcal{N},\mathcal{A})\) from \({i}_{0}\) to \({i}_{n}\) corresponds to a set of routes that cover all customers exactly once, and the sequence of orders in each of these routes can be feasibly loaded to at least one type of vehicles. Two more conditions must be satisfied so that the emerging routes may define a feasible FDP-UPLS solution: (i) the vehicles (of any type) that are required to execute the routes do not exceed the maximum number of available vehicles per type, and (ii) the relevant loading activities can be feasibly processed by the available loading positions, i.e. each loading activity can be assigned to a loading slot so that the associated route terminates at or before \({b}_{0}\).

To determine paths in \(\mathcal{G}(\mathcal{N},\mathcal{A})\) (from \({i}_{0}\) to \({i}_{n}\)) that are compatible to conditions (i) and (ii) (i.e., the emerging routes comply to conditions (i) and (ii)), we solve a RCSPP from \({i}_{0}\) to \({i}_{n}\) under the assumption that traversing an arc (\({i}_{k},{i}_{k+l}\)) of \(\mathcal{G}(\mathcal{N},\mathcal{A})\) consumes two types of resources: (i) one truck (unit) of type \({\vartheta }_{{i}_{k}{i}_{k+l}}\), and (ii) one unit of a loading slot (for processing the loading activity of \({R}_{({i}_{k},{i}_{k+l})}\)). By assumption, we enforce each route to start as early as possible, so that each truck \(v\) may be available to perform as many trips as possible up to \({\delta }_{v}\). Therefore, traversing an arc (\({i}_{k},{i}_{k+l}\)) of \(\mathcal{G}(\mathcal{N},\mathcal{A})\) involves the consumption of one unit of the earliest available loading slot. Hence, each of the vehicle types and loading slots are treated as separate constrained resources (denoted by \({\mathcal{F}}_{\vartheta }\), \(\vartheta \epsilon \Theta \) and \({{\mathcalligra{h}}}_{\tau }, \tau \in {\rm T}\), respectively) and any feasible solution to the emerging RCSPP is a path from \({i}_{0}\) to \({i}_{n}\) that its total consumption of resource units of \({\mathcal{F}}_{\vartheta }\) for \(\vartheta \epsilon \Theta \) and \({\mathcalligra{H}}_{\tau }\) for \(\tau \in {\rm T}\) does not exceed \((\left|{V}_{\vartheta }\right|\cdot {\delta }_{\vartheta })\) and \(\xi \) respectively.

Based on these assumptions, any solution to the proposed RCSPP from \({i}_{0}\) to \({i}_{n}\) defines a feasible FDP-UPLS solution, given that none of the resource constraints is violated. Hence, associating each arc (\({i}_{k},{i}_{k+l}\)) with the corresponding route distance denoted by \({D}_{({i}_{k},{i}_{k+l})}\) and route duration denoted by\({\mathcal{T}}_{({i}_{k},{i}_{k+l})}\), and solving the RCSPP in \(\mathcal{G}(\mathcal{N},\mathcal{A})\) from \({i}_{0}\) to \({i}_{n}\), results to a feasible FDP-UPLS solution with minimum total distance (among all possible solutions that can be created out of this procedure from tour \(({i}_{0}, {i}_{1}, {i}_{2}, .. ., {i}_{n}, {i}_{0})\)).

Figure 3 represents the directed acyclic graph \(\mathcal{G}\left(\mathcal{N},\mathcal{A}\right)\) emerging from a tour of six customers \(({i}_{0},{i}_{1},{i}_{2},{i}_{3},{i}_{4},{i}_{5},{i}_{6},{i}_{0})\). The tables presented in Fig. 3 indicate the correspondence between the arcs of \(\mathcal{G}(\mathcal{N},\mathcal{A})\) with the routes of FDP-UPLS. We also highlight a path (in yellow bold line) in \(\mathcal{G}(\mathcal{N},\mathcal{A})\) that connects \({i}_{0}\) to \({i}_{6}\) and illustrate how it transforms to an FDP-UPLS solution.

Fig. 3
figure 3

Example illustrating the generation of graph \(\mathcal{G}(\mathcal{N},\mathcal{A})\) of the splitting procedure

A label setting algorithm has been developed for solving the emerging RCSPP. We provide the major features of this routine. Any label associated to node \({i}_{k}\) (denoted by \({{\varvec{\lambda}}}^{({i}_{k})}\)) corresponds to a path from \({i}_{0}\) to \({i}_{k}\) on graph \(\mathcal{G}(\mathcal{N},\mathcal{A})\) and conveys the following information \( \left( {{\mathcalligra{d}}^{{(i_{k} )}} ,\,\varvec{L}^{{(i_{k} )}} ,\,\varvec{\Delta} ^{{(i_{k} )}} ,\,\varvec{E}^{{(i_{k} )}} ,{\mathcalligra{p}}^{{(i_{k} )}} } \right) \) where:

  • \({\mathcalligra{d}}^{({i}_{k})}\) is the path distance,

  • \({{\varvec{L}}}^{({i}_{k})}=({\mathcalligra{l}}_{1}^{\left({i}_{k}\right)},{\mathcalligra{l}}_{2}^{({i}_{k})}, \dots ,{\mathcalligra{l}}_{\left|\Theta \right|}^{({i}_{k})} )\), a vector where each \({\mathcalligra{l}}_{\vartheta }^{({i}_{k})}\) denotes the number of vehicle trips of type ϑ \(\in \Theta \) consumed by the arcs of the path. This vector keeps track of the consumption of resources\({\mathcal{F}}_{\vartheta }\), ϑ \(\in \Theta \)

  • \({\boldsymbol{\Delta }}^{({i}_{k})}=({\mu }_{1}^{\left({i}_{k}\right)}, ..,{\mu }_{\left|{\rm T}\right|}^{\left({i}_{k}\right)}\)), a vector where each element \({\mu }_{\tau }^{\left({i}_{k}\right)}\) denotes the loading slot units of resource \({\mathcal{H}}_{\tau }\) used by the arcs of the path, i.e., \({\mu }_{\tau }^{\left({i}_{k}\right)}\) denotes the number of loading positions used at slot \(\tau \) by the arcs of the path, for τ\(=1,..,\left|{\rm T}\right|\). This vector keeps track of the consumption of resources\({\mathcal{H}}_{\tau }\), for τ\(=1,..,\left|{\rm T}\right|\).

  • \({\boldsymbol{\rm E}}^{({i}_{k})}=({E}_{1}^{\left({i}_{k}\right)},{E}_{2}^{\left({i}_{k}\right)}, \dots , {E}_{\vartheta }^{\left({i}_{k}\right)},..{E}_{\left|\Theta \right|}^{\left({i}_{k}\right)})\) where each \({E}_{\vartheta }^{\left({i}_{k}\right)}\) is the list of release times (\({t}_{{v}_{\vartheta 1}}^{\left({i}_{k}\right)} , \dots ,{t}_{{v}_{\vartheta \left|{V}_{\vartheta }\right|}}^{\left({i}_{k}\right)}\)) of the vehicles\({v}_{\vartheta 1}\),.., \({v}_{\vartheta \left|{V}_{\vartheta }\right|}\) of type\(\vartheta \). A release time of a vehicle \(v\) represents the earliest time that it becomes idle. If a truck has been used by any of the constituent arcs, then the corresponding time is its latest return time at the depot. Otherwise, it coincides with the depot’s opening time\({a}_{0}\). This information is needed for determining and assigning the appropriate earliest loading slot to a truck that is being used on its second or higher rank trip.

  • \({\mathcalligra{p}}^{({i}_{k})}\) is a pointer (used for backtracking).

The set of labels created at node \({i}_{k}\) is denoted by \({\Lambda }^{({i}_{k})}\).

The label setting routine involves \(n\) iterations. Having determined the optimum paths from node \({i}_{0}\) to node \({i}_{k}\) at iteration \(k\) (up to one path per alternative combination of resources \({\mathcal{F}}_{\vartheta }\) and \({\mathcal{H}}_{\tau }\)), the routine proceeds with the determination of the corresponding optimum paths from node \({i}_{0}\) to node \({i}_{k+1}\) at iteration \((k+1)\), for \(k=0,..,n-1\). This is achieved by scanning node \({i}_{k}\), i.e., extending the paths from \({i}_{0}\) to \({i}_{k}\) determined at iteration \(k\) by concatenating arcs (\({i}_{k},{i}_{k+l}\)) \(\epsilon \mathcal{A}\) for \(l=1, ..,n-k\). It is evident that upon completion of the final iteration \(n\), the optimum path from \({i}_{0}\) to \({i}_{n}\) will emerge.

In computational terms, scanning a node \({i}_{k}\) involves processing each of the labels \({{\varvec{\lambda}}}^{({i}_{k})}=\left({\mathcalligra{d}}^{({i}_{k})},{{\varvec{L}}}^{({i}_{k})},{\boldsymbol{\Delta }}^{({i}_{k})},{\boldsymbol{\rm E}}^{({i}_{k})},{\mathcalligra{p}}^{({i}_{k})}\right)\) in \({\Lambda }^{({i}_{k})}\) by performing the following steps:

  • For each outgoing arc (\({i}_{k},{i}_{k+l})\in \mathcal{A}\) we determine: c

    1. (i)

      a vehicle type \({\vartheta }^{\prime}=min\{\vartheta : \left|\Theta \right|\ge \vartheta \ge {\vartheta }_{{i}_{k}{i}_{k+l}} and\, {\mathcalligra{l}}_{\vartheta }<\left|{V}_{\vartheta }\right|\cdot {\delta }_{\vartheta }\}\) (i.e., the minimum capacity type that can be feasibly loaded with the corresponding customers’ order and the vehicles of this type have not yet completed the maximum number of trips)

    2. (ii)

      the vehicle \({v}_{{\vartheta }^{\prime}{\mathcalligra{h}}^{*}}\) of this type \({\vartheta }^{\prime}\) that is released first, i.e., \({t}_{{v}_{{\vartheta }^{\prime}{\mathcalligra{h}}^{*}}}^{\left({i}_{k}\right)}={\text{min}}\{{t}_{{v}_{{\vartheta }^{\prime}{\mathcalligra{h}}}}^{\left({i}_{k}\right)}\epsilon {E}_{{\vartheta }^{\prime}}^{\left({i}_{k}\right)}\}\).

    3. (iii)

      the earliest available loading slot \({\tau }^{\prime}\) right after \({t}_{{v}_{{\vartheta }^{\prime}{\mathcalligra{h}}^{*}}}^{\left({i}_{k}\right)}\) i.e., \({\tau }^{\prime}\) should satisfy the following conditions: \({\tau }^{\prime}\ge \) \({t}_{{v}_{{\vartheta }^{\prime}{\mathcalligra{h}}^{*}}}^{\left({i}_{k}\right)}\), \({\mu }_{{\tau }^{\prime}}^{\left({i}_{k}\right)}<\xi \) and\({\tau }^{\prime}+\gamma +{\mathcal{T}}_{({i}_{k},{i}_{k+l})}\le {b}_{0}\). If no such loading slot \({\tau }^{\prime}\) exists then \({\tau }^{\prime}=-1\) is returned.

  • If \({\tau }^{\prime}\ge 0\) then create a new label \({{\varvec{\lambda}}}^{({i}_{k+l})}=({\mathcalligra{d}}^{({i}_{k+l})},{{\varvec{L}}}^{({i}_{k+l})},{\boldsymbol{\Delta }}^{({i}_{k+l})},{\boldsymbol{\rm E}}^{({i}_{k+l})},{\mathcalligra{p}}^{({i}_{k+l})})\) for node \({i}_{k+l}\) such that:

    1. (i)

      \({\mathcalligra{d}}^{({i}_{k+l})}={\mathcalligra{d}}^{({i}_{k})}+{D}_{\left({i}_{k},{i}_{k+l}\right)}\)

    2. (ii)

      \({{\varvec{L}}}^{({i}_{k+l})}=({\mathcalligra{l}}_{1}^{({i}_{k+l})},{\mathcalligra{l}}_{2}^{({i}_{k+l})},.,{\mathcalligra{l}}_{\vartheta }^{({i}_{k+l})},\dots ,{\mathcalligra{l}}_{\left|\Theta \right|}^{({i}_{k+l})})\), where\({\mathcalligra{l}}_{{\vartheta }^{\prime}}^{({i}_{k+l})}={\mathcalligra{l}}_{{\vartheta }^{\prime}}^{({i}_{k})}+1\), \({\mathcalligra{l}}_{\vartheta }^{({i}_{k+l})}={\mathcalligra{l}}_{\vartheta }^{({i}_{k})}\) for ϑ\(\ne {\vartheta }^{\prime}\).

    3. (iii)

      \({\boldsymbol{\Delta }}^{({i}_{k+l})}=\left({\mu }_{1}^{\left({i}_{k+l}\right)},{\mu }_{2}^{\left({i}_{k+l}\right)},.,{\mu }_{\tau }^{\left({i}_{k+l}\right)},\dots ,{\mu }_{\left|{\rm T}\right|}^{\left({i}_{k+l}\right)}\right)\), where\({\mu }_{{\tau }^{\prime}}^{\left({i}_{k+l}\right)}={\mu }_{{\tau }^{\prime}}^{\left({i}_{k}\right)}+1\), \({\mu }_{\tau }^{\left({i}_{k+l}\right)}={\mu }_{\tau }^{\left({i}_{k}\right)}\) for \(\tau \ne {\tau }^{\prime}\)

    4. (iv)

      \({\boldsymbol{\rm E}}^{({i}_{k+l})}=({E}_{1}^{({i}_{k+l})},{E}_{2}^{({i}_{k+l})},.,\dots ...,{E}_{\left|\Theta \right|}^{({i}_{k+l})})\), where \({E}_{\vartheta }^{({i}_{k+l})}\) are identical to \({E}_{\vartheta }^{{i}_{k}}\) (\({E}_{\vartheta }^{({i}_{k+l})}\equiv {E}_{\vartheta }^{({i}_{k})}\) for ϑ\(\ne {\vartheta }^{\prime}\)) for all \(\vartheta \) apart from \({\vartheta }^{\prime}\) for which \({E}_{{\vartheta }^{\prime}}^{({i}_{k+l})}\)=\(({t}_{{v}_{{\vartheta }^{\prime}1}}^{\left({i}_{k+l}\right)} , \dots ,{t}_{{v}_{{\vartheta }^{\prime}\left|{V}_{{\vartheta }^{\prime}}\right|}}^{\left({i}_{k+l}\right)})\) emerges from \({E}_{{\vartheta ^{\prime}}}^{({i}_{k})}\) as follows:\({t}_{{v}_{{\vartheta }^{\prime}{\mathcalligra{h}}^{*}}}^{\left({i}_{k+l}\right)}={\tau }^{\prime}+\gamma +{\mathcal{T}}_{({i}_{k},{i}_{k+l})}\), and \({t}_{{v}_{{\vartheta }^{\prime}{\mathcalligra{h}}}}^{\left({i}_{k+l}\right)}={t}_{{v}_{{\vartheta }^{\prime}{\mathcalligra{h}}}}^{\left({i}_{k}\right)}\) for all \({\mathcalligra{h}}\ne {{\mathcalligra{h}}}^{*}\)

  • If no other label already exists in \({\Lambda }^{({i}_{k+l})}\) with identical vector of consumed vehicle resources \({{\varvec{L}}}^{({i}_{k+l})}\) then the new label \({{\varvec{\lambda}}}^{(k+l)}\) is added in the list \({\Lambda }^{({i}_{k+l})}\). If however, a label \({{\varvec{\lambda}}}^{*(k+l)}\) with an identical vector of vehicle resources \({{\varvec{L}}}^{({i}_{k+l})}\) already exists in \({\Lambda }^{({i}_{k+l})}\), denoted by \(\left({\mathcalligra{d}}^{\boldsymbol{*}({i}_{k+l})},{{\varvec{L}}}^{\boldsymbol{*}({i}_{k+l})},{\boldsymbol{\Delta }}^{\boldsymbol{*}({i}_{k+l})},{\boldsymbol{\rm E}}^{\boldsymbol{*}({i}_{k+l})},{\mathcalligra{p}}^{\boldsymbol{*}({i}_{k+l})}\right)\), at node \({i}_{k+l}\) then:

  • If \({\mathcalligra{d}}^{({i}_{k+l})}<{\mathcalligra{d}}^{\boldsymbol{*}({i}_{k+l})}\) then the new label \({{\varvec{\lambda}}}^{(k+l)}\) replaces \({{\varvec{\lambda}}}^{*(k+l)}\) in \({\Lambda }^{({i}_{k+l})}\),

  • Otherwise the new label is dismissed.

  • If the new label \({{\varvec{\lambda}}}^{(k+l)}\) is added in \({\Lambda }^{({i}_{k+l})}\) then its pointer \({\mathcalligra{p}}^{({i}_{k+l})}\) is set to point at label \({{\varvec{\lambda}}}^{(k)}\).

After scanning the last node \({i}_{n},\) each of the labels in \({\Lambda }^{({i}_{n})}\) corresponds to a path from \({i}_{0}\) to \({i}_{n}\) which can be directly transformed to a feasible solution for the FDP-UPLS. Hence, we proceed with selecting the label in \({\Lambda }^{({i}_{n})}\) with the lowest value (distance) and turn it to a solution for the FDP-UPLS. The number of labels per node is given by \(\mathcal{y}=\prod_{\vartheta =1}^{\left|\Theta \right|}(\left|{V}_{\vartheta }\right|+1)\). Each label is scanned for at most every arc of the graph \(\mathcal{G}(\mathcal{N},\mathcal{A})\). Moreover, the operation of scanning each label involves: (i) the determination of the minimum capacity available truck type (in \(\mathcal{O}(\left|\Theta \right|)\)) and the determination of the first available slot (in \(\mathcal{O}(\xi \cdot T\)). Hence, the computational complexity of the algorithm is pseudopolynomial (\(\mathcal{O}(\mathcal{y}\cdot \left|\mathcal{A}\right|\cdot {\text{max}}\{\xi \cdot T\), \(\left|\Theta \right|\))).

4.2 Adaptive LNS heuristic

Following the standard structure of the ALNS technique (Ropke & Pisinger, 2006), the proposed heuristic (henceforth referred to as GTRS-ALNS) performs a predetermined number (\(\mathcal{K}\)) of iterations in which part of an incumbent solution \({S}_{inc}\) is destroyed and repaired resulting to a new neighbouring solution \({S}_{new}\). If \({S}_{new}\) has a lower cost than the best determined so far (denoted by \(S_{opt}\)) then \(S_{inc} : = S_{new}\).and \(S_{opt} : = S_{new}\). Otherwise, the acceptance criterion of Simulated Annealing is applied in order to decide whether to accept or reject \({S}_{new}\). If the solution is accepted then it becomes the new incumbent solution (\(S_{inc} : = S_{new}\)). The initial \({S}_{inc}\) is determined by heuristic GTRS. The pseudocode of the algorithm is presented in Fig. 4.

Fig. 4
figure 4

Pseudo code of the ALNS algorithm

In the proposed implementation, four removal (destroy) operators (RO) are used:

  1. (i)

    RO-1: entire routes are removed. A route (called the seed route) is randomly selected and removed from \({S}_{inc}\). Then a neighbourhood of up to a predetermined number (\({N}_{c}\)) of customers is built by selecting and removing routes close to the seed route (proximity between a pair of routes is measured by the average distance between the customers of the routes). The removal of a route modifies the incumbent partial solution by: (i) releasing one unit from the loading slot it engaged, and (ii) rescheduling the remaining routes of the corresponding vehicle to start as early as possible, creating a buffer time for the vehicle to perform an additional trip (if needed).

  2. (ii)

    RO-2 and RO-3 refer to the Random and Worst Removal operators proposed in (Ropke & Pisinger, 2006). In RO-2, \({N}_{c}\) customers are randomly selected and removed. In RO-3, the customers (still present in the partial incumbent solution) are ranked in decreasing order according to metric (43) which represents the travelled distance reduction that will emerge if customer \(i\) is removed from the solution. One customer is then semi-randomly selected from the list (favouring those on the top) and removed from the corresponding route. The process is repeated with the remaining customers until \({N}_{c}\) customers are removed.

    $${\boldsymbol{\Delta }{\varvec{d}}}_{{\varvec{i}}}={\varvec{D}}\left({\varvec{S}}\right)-{\varvec{D}}({{\varvec{S}}}_{-{\varvec{i}}})$$
    (43)

    where \({\varvec{D}}\left({\varvec{S}}\right)\) is the traveled distance of solution \(S\) and \({\varvec{D}}\left({{\varvec{S}}}_{-{\varvec{i}}}\right)\) is the traveled distance of \(S\) without customer \(i\).

  3. (iii)

    RO-4: is the Ropke and Pisinger (2006) implementation of the Shaw removal operator (Shaw, 1998). A customer is randomly selected and a relatedness measure is calculated between the selected customer and any other customer. In total, \({N}_{c}\) customers (including the initial) with the lowest relatedness score are selected and removed from the solution. In our implementation, the relatedness measure between two customers (\(i,j\)) is defined as the weighted sum of their distance the difference of their order size, and the difference of their number of order items. Hence, the proposed operator tends to select customers relatively close to each other with similar order size and number of order items.

The partial solution that emerge from RO-2, RO-3, or RO-4 is repaired by a standard minimum insertion-cost routine. A new repair procedure is applied for the partial solution emerging from RO-1, that involves the application of GTRS for building a set of routes servicing the removed customers (denoted by \({C}_{u}\)) with the remaining available vehicles and the updated list of loading slots. Any vehicle already assigned at least one trip in the partial solution, it is allocated a loading slot that lies after its latest return time at the depot. The partial solution and the routes determined by the GTRS are then concatenated leading to a new solution. It is worth noticing that this combination of RO-1 with the GTRS as a repair operator is a novel feature of the proposed ALNS algorithm.

If \(D\left({S}_{new}\right)\ge D({S}_{opt})\) then \({S}_{new}\) is accepted with probability \({e}^{-(\frac{D\left({S}_{new}\right)-D({S}_{inc})}{T})}\) where \(T\) (called temperature) is a parameter that controls the acceptance probability of a new inferior solution. \(T\) is updated at each iteration, such that \(T=c\cdot T\), with \(0<c<1\). In this work, the initial value of \(T\) is determined so that a solution that 25% away from the incumbent solution is accepted with a probability of 0.4.

Each iteration starts off with selecting one of the four removal operators, through a random-wheel experiment. The selection probabilities of the removal operators evolve throughout the iterations reflecting operators’ performance in identifying improved solutions. In more detail, each removal operator RO-\(k\) (for \(k=1, 2, 3, 4\)) is associated to a selection priority \({\mathcalligra{v}}_{k}\). The priorities \({\mathcalligra{v}}_{k}\) are initialised to some arbitrary value, and every \({\mathcal{K}}_{u}\) iterations, they are updated according to formula (44).

$${\mathcalligra{v}}_{k}=(1-{\mathcalligra{a}}){\mathcalligra{v}}_{k}+{\mathcalligra{a}}\frac{{{\mathcalligra{b}}}_{k}}{{\mathcalligra{n}}_{k}}$$
(44)

where \(\mathcalligra{a}\in (\mathrm{0,1})\) is a weighting factor, \({\mathcalligra{n}}_{k}\) is the number of times within the recent \({\mathcal{K}}_{u}\) iterations that RO-\(k\) was selected, and \({{\mathcalligra{b}}}_{k}\) is a score indicator that its value increases every time RO-\({k}\) is selected, by summing up:

  • \({\mathcalligra{g}}_{1}\) points if the total distance of the resulting \({S}_{new}\) is lower than the total distance of \({S}_{opt}\),

  • \({\mathcalligra{g}}_{2}\) points if \({S}_{new}\) succeeds the acceptance criterion, and

  • \({\mathcalligra{g}}_{3}\) points every time \({S}_{new}\) is rejected.

We assume that \(0<{\mathcalligra{g}}_{3}<{\mathcalligra{g}}_{2}<{\mathcalligra{g}}_{1}\). The selection probabilities that are used in the random-wheel experiment for each RO-\({k}^{\prime}\) are given by \(\frac{{\mathcalligra{v}}_{{k}^{\prime}}}{\sum_{k=1}^{4}{\mathcalligra{v}}_{k}}\) for \({k}^{\prime}=1,..,4\).

5 Computational experiments

A series of experiments were executed to assess the computational performance of the proposed algorithm. Moreover, additional experiments were performed to explore the effect of the unloading precedence constraints on the travelled distance (considered as a proxy for distribution cost). All experiments were performed on an Intel Core 3.60 GHz computer with 64-bit Windows operating system and 16 GB RAM.

5.1 Benchmarking of the algorithm

Given that no benchmark problems exist for the problem addressed in this paper, the performance of the algorithm was assessed on a set of small sized test problems developed by the authors using real-world data. To assess the performance of the proposed algorithm on solving larger instances, we customized the algorithm to address instances of a special case of FDP-UPLS, the Heterogeneous Fixed Fleet Vehicle Routing Problem (HFVRP), and tested its performance on the benchmark problems of Golden et al. (1984) and Tailard (1999) (henceforth denoted GT test problems). Although the HFVRP is a special case of the FDP-UPLS, the relevant experiments would still provide some evidence of the effectiveness of the novel attributes of the GTRS-ALNS.

The small sized problems include 9 customers with 1 up to 3 order items each, serviced by a fleet of three different vehicles (i.e., \(V1, V2, V3\), presented in Table 4 of example 2). Each vehicle is allowed to perform up to two trips. The customers’ location and orders were randomly selected from a database of 400 records of a Greek fuel distribution company. All customers’ premises and the depot are located in Attica Region, Greece. Each test problem was solved by: (i) the MIP Cplex 12.6 solver (the Cplex API was called through a Java application) and (ii) the proposed heuristic algorithm executing 1000 ALNS iterations. The Cplex solver was set to terminate when the running time exceeded 16 h (or 57,600 s). The maximum proportion of permitted ordered quantity reduction (\({\beta }_{r}\)) was set equal to 0.25. On average, the models formed for these test problems involve around 10,300 variables and 23,550 constraints. It is worth noticing that preliminary experiments showed that the model could not be solved (in reasonable time) for test problems with 10 customers or above (the integrality gap was more than 50% after running the solver for 16 h). Moreover it seems that the value of parameter \({\beta }_{r}\) affected severely the computational time of the solver, since the integrality gap remained large even for test problems with nine customers and \({\beta }_{r}\) lower than 0.25.

Moreover, the Cplex 12.6 solver is called to solve the route loading model (many times within the proposed algorithm) for checking the feasibility of any new/revised route. To reduce the computational burden of this time consuming task, we tuned the solver to terminate as soon as a feasible solution was determined. The route loading model was solved to optimality only after a complete problem solution was formed. This approach was followed in all experiments performed for the proposed heuristic algorithm.

Table 6 presents the total distance travelled and the total order quantity reduction in each solution determined by the solver and the GTRS-ALNS. Computational times are reported as well. The third column presents the MIP gap of the solutions returned by the solver when running time exceeded 16 h. The last column of the table provides the % difference of the total distance of the solutions determined. The heuristic algorithm returned the same solution with the solver in eight out of ten instances, while the distance deviation in the remaining two instances was 1.3% for instance 5 and 0.3% for instance 8.

Table 6 Results from the small sized test problems

The changes performed to the algorithm for addressing the HFVRP were straightforward and included: (i) relaxing the route loading problem for checking the capacity feasibility of the routes, and (ii) relaxing the slot allocation constraints for scheduling the loading activities by assuming a large number of loading facilities. The performance of the proposed algorithm was assessed on the GT test problems having 50, 75 and 100 number of orders (i.e., test instances GT-13 up to GT-20). Given that the VRP problem under study does not involve any fixed vehicle costs, the results of the proposed algorithm are compared with those reported in Caceres-Cruz et al. (2014) for RAND-MER which also addresses the HFVRP without fixed vehicle costs. Table 7 depicts the number of vehicles and their capacity per type of vehicles involved in the fleet of each GT test problem.

Table 7 Capacity and number of vehicles per type (A–F) for each GT test problem

The settings of the proposed algorithm that were used for solving the GT test problems are as follows:

  • The initial solution was determined by running the proposed GTRS heuristic 10 times and keeping the best of the solutions determined.

  • 20,000 ALNS iterations were executed.

  • The number of customers removed by the incumbent solution per ALNS iteration were randomly selected between a minimum of 10% and a maximum of 25% of the total number of customers.

Table 8 provides the results (distance, number of routes of the solutions and computational time) determined by the proposed algorithm GTRS-ALNS and the corresponding results of RAND-MER reported in (Caceres-Cruz et al., 2014). In addition, Table 8 presents the distance and the number of routes of the solutions determined by the GTRS (initial phase) of the proposed algorithm. Comparing the results provided by the two algorithms, it is evident that GTRS-ALNS determined slightly improved solutions for GT-14, GT-15, GT-16, GT-17, and GT-19. The solutions determined by GTRS-ALNS for the remaining test problems are slightly inferior to those determined by RAND-MER. In overall the performance of the proposed algorithm on the GT test problems is comparable with the corresponding performance of RAND-MER. Moreover, it seems that the initial solutions determined by GTRS are rather close to the best solutions determined upon termination of the algorithm. In particular, the distance of the initial solutions determined by GTRS alone were just 7.5% (on average) higher from the corresponding values of the best solutions determined upon termination of the GTRS-ALNS. It is also worth noticing that the computational time for the test problems with 75 and 100 orders increases significantly as compared to the computational time needed by RAND-MER (which was run for ten minutes throughout all test problems).

Table 8 Overview of the results of GTRS-ALNS and Rand-MER on the GT benchmark problems

5.2 The effect of unloading precedence constraints

In real world operations, fuel distribution companies are facing decisions regarding the trade-off between distribution cost and safety. Ιt is important for them to be able to quantify the “price of safety”, i.e., the effect of the unloading precedence constraints on the distribution cost, approximated by the total distance traveled by the distribution fleet. In what follows, we are using the GTRS-ALNS algorithm to explore this relationship.

This type of assessment was conducted on two sets of test problems involving 50 and 75 customers, denoted by TP50 and TP75 respectively. Each of the above sets consists of twenty test problems. The types of vehicles and the customers’ orders were derived from actual data provided by a fuel distribution company. The vehicles used were distinguished to three types as indicated in Table 9.

Table 9 Characteristics of vehicle types used in the experiments

The orders (per test problem) were randomly selected from a data set of 1600 actual orders (involving up to three fuel). The remaining features of the test problems were set as follows:

  • The deport remains open from 06:00 to 18:00

  • Ten loading facilities are available

  • Time slots duration are set to 60 min

  • Customer service/delivery times are available, ranging between 25 and 45 min

  • Each vehicle may perform up to two trips per day

The test problems were solved for two alternative compositions of the fleet (Table 10), each one covering on average 75% and 95% of total demand.

Table 10 Fleet Compositions used for the test problems TP-50 and TP-75

Each test problem was solved under two scenarios: with vs without the unloading precedence constraints. The GTRS-ALNS algorithm was customized to solve the relaxed version of the problem (i.e., without the unloading precedence constraints) by relaxing the corresponding constraints in the Route Loading model (Appendix B). Each run included 1000 ALNS iterations removing 5–10% of the customers. Table 11 presents the average total distance and the average number of routes resulting from both types of runs. The last column of Table 11 provides the percentage difference of the total distance of the corresponding solutions determined.

Table 11 Results of experiments on real life test problems

A major finding of these experiments is that (as expected) the total distance increases when the unloading precedence constraints are active in the problem. Although not negligible, the degradation of the solutions is not radical since it slightly exceeds 3% (in terms of the total distance traveled) for TP75 while it remains below 4.5% for TP50. The average number of routes is only marginally increased as well ranging from 0.4 to 0.6 routes on average throughout all experiments. Finally, the different compositions of the distribution fleet do not seem to have a significant effect on the average traveled distance of the solutions.

5.3 Computational time

The real-world test problems that were used to assess the effect of the unloading precedence constraints, were also used to assess the computational time performance of the GTRS-ALSN. Table 12 presents the average computational time of the GTRS (per run) for determining an initial solution and the ALNS (per iteration) for each of the four categories of test problems (Table 10). In addition, the average total computational time of the GTRS-ALNS is provided.

Table 12 Computational Time performance on real life test problems

The worst average computational time per ALNS iteration is around 2.15 s for the test problems TP50 and 7.84 s for the test problem TP75. It is worth noting that the average computational time of the algorithm is significantly higher (per ALNS iteration) when the unloading precedence constraints are active. In overall, the maximum computational time over all runs did not exceed 2.5 h (per test problem). Given that the existing manual route planning task for a Greek Fuel Distribution company lasts for 4–6 h (for a similar amount of orders), we conclude that the total average computational time for the specific real-life test problems was kept at a reasonable level.

6 Concluding remarks

This paper introduces a real-world multi-compartment vehicle routing problem coming from the fuel distribution industry that introduces two new features: (i) the unloading precedence constraints, and (ii) the sequencing of the trucks’ loading activities at the depot’s supply positions. The incorporation of these two feature results to a heavily constrained multi-compartment VRP that we address with an ALNS algorithm. The computational results indicate that the effect of this type of constraints on the total travelled distance is kept at reasonable level reaching up to 4.37%. This work provides three new directions for future research. Solving the subproblem of assigning order items to vehicle compartments (the Route Loading problem) adds a heavy computational burden to the proposed algorithm. It is worth noticing that every ALNS iteration requires 1.7 s on average for addressing the real life test instances, each one involving 75 customers (Table 12). However, the same algorithmic procedure without solving the route loading model (GT test problems) requires on average 0.5 s to solve the GT-20 test problem (involving 100 customers). Developing a fast and efficient heuristic algorithm for addressing the Route Loading problem would reduce substantially the computational time of the proposed algorithm making it applicable to large scale instances of the FDP-UPLS. Moreover, alternative measures for balanced loading issues could be explored, including the weight distribution constraints on the axles of the vehicle and the truck accessibility constraints on customers’ premises. Finally, it is worth noticing that considering slots of equal size for scheduling the loading activities at the depot may underutilise the actual capacity of the loading stations (especially for fleets of trucks with substantially different capacities). This scheduling approach simplifies the task of assigning trucks to loading stations, but it might lead to assigning a (small sized) truck to a loading station for a time period much larger than required. Developing a refined model for scheduling the loading activities at the depot is a major future research direction.