Controlling inventory on electric roads

Electric road systems (ERS) are roads that allow compatible vehicles to be powered by grid electricity while in transit, reducing the need for stopping to recharge electric batteries. We investigate how this technology can affect routing and delivery decisions for hybrid heavy good vehicles (HGVs) travelling on a ERS network to support the demand of a single product faced by a set of retailers in the network. We introduce the Electric Roads Routing Problem, which accounts for the costs of electricity and fuel on a ERS network, consumption that are affected by the battery level of the vehicle in each step of the journey, the routing decisions and the variable weight of the vehicle, which depends on vehicle load and delivery decisions. In particular, we study a stochastic demand version of the problem, formulating a mathematical programming heuristic and proving its effectiveness. We use our model on a realistic instance of the problem, showcasing the different strategies that a vehicle may follow depending on fuel costs in relation to the costs of electricity.


Introduction
In recent years, growing concerns on climate change has seen the introduction of new CO2 emissions targets in many countries. For instance, in the UK, the Government recently established a net-zero emissions target for 2050, in an amendment of the Climate Change Act (2008) [10]. For the transportation sector, one of the largest contributors of greenhouse gas (GHG) emissions, this means a complete transformation is needed in coming years. The adoption of electric vehicles (EVs), coupled with increasing levels of renewable energy production, is seen as a solution without compromising future transportation demands.
However, limitations associated with EVs, such as battery range, are tighter for heavy good vehicles (HGV). HGV are, at the same time, the vehicles causing the greatest environmental impact: in the EU, freight transport by HGVs accounts for about a quarter of all CO2 emissions caused by road transport [27]. Still, some engineering solutions could see HGVs harnessing electric power without relying on large electric batteries that compromise the payload and vehicle's weight and put stress on natural resources needed to manufacture them. These solutions, named as Electric Roads, eRoads, eHighways or Electric Road Systems (ERS) allow compatible vehicles to use power from the electric grid to travel along, reducing or even eliminating the need to stop for recharging. These systems can be classified into three categories, including: overhead catenary cables; conductive power from road; inductive power from road.
In recent years, overhead catenary cables systems have been trialled for HGV use in countries such as Germany [23]. In the UK, the Centre for Sustainable Road Freight has proposed a plan [1] for decarbonising road freight transport in the country. It calls for covering about 65% of the roads travelled by HGVs (7500 km of road) with catenary cables by the late 2030s, with a construction investment estimated at £19.3 billion. HGV vehicles would be equipped with a pantograph system that allow them to connect and disconnect from installed catenary cables during transit, without the need for stopping. While connected, the cables power the vehicle and can charge an electric battery that is used to power the vehicle on conventional roads. To ensure a HGV can continue travelling when the ERS network and the battery is not enough, especially during the transition period, an extra propulsion system (such as a diesel engine) can also be included. An example of such vehicle is the hybrid Scania R 450, used in the first trials in Germany [23].
The decarbonisation of road freight transport by deploying ERS on road networks and using hybrid vehicles poses many interesting research questions in transportation, ranging from routing to network design. In this paper, we explore some of the challenges that emerge from this concept from the perspective of inventory control. Our interest is to study a lot sizing problem where the trade-off costs of fulfilling the demand of a single product are given in terms of the environmental impact of delivery, in the context of HGVs navigating ERS networks. We present our work as a new problem termed the Electric Roads Routing Problem (ERRP). Three types on interrelated inventories are considered in this problem: First, the inventory at a set of retailers aiming to satisfy the demand of certain product. Second, the inventory of such a product on the vehicle delivering it to the retailers. Finally, the battery energy inventory needed to deliver the product to the retailers through a network with on-road charging opportunities. The inventories are inter-related. Obviously, the decisions of delivering product to certain retailer affect the vehicle product load, and consequently the availability of products for other retailers, or the need of the vehicle to visit the depot to load new product. In addition, we also consider that the energy consumption depends on the weight of the vehicle, meaning that the energy inventory is also affected by the product load of the vehicle.
Our article also contributes to the literature on energy and pollution based models in vehicle routing, since we include important features that are relevant for hybrid vehicles that can take advantage of ERS networks. The problem considers the energy requirements of the vehicle and features recharging decisions, which occurs when a vehicle transits an ERS segment of road, and delivery decisions to retailers, considering the impact of weight on energy requirements. In particular, we study a stochastic demand setting of the problem and develop mathematical programming heuristics to achieve nearly optimal solutions.
We contribute to the literature as follows: • We introduce the Electric Roads Routing Problem (ERRP), effectively accounting for battery and fuel requirements of a vehicle while transiting an ERS network to fulfil the demand of retailers.
• We develop a stochastic dynamic programming (SDP) formulation to tackle the ERRP in a general setting where demand is stochastic.
• We introduce a mixed integer linear programming (MILP) heuristic to tackle the stochastic variant of the ERRP, and demostrate the effectiveness of the proposed method on an extensive test bed, contrasting the solutions obtained by the heuristic against the optimal solutions obtained via SDP.
• We test our heuristic on a realistic case study set in the area of Kent (UK), and perform a sensitivity analysis on fuel cost.
The rest of this document is structured as follows. In Section 2 we survey literature on inventory and routing problems and position our contribution. Section 3 describes the problem setting of the ERRP. In Section 4 we introduce a stochastic demand variant and present an SDP formulation. Section 5 presents the stochastic MILP heuristic. A computational study and results proving the effectiveness of the heuristics are provided in Section 6. In section 7 we present a case study of the problem and investigate the effect of the costs of fuel on the solutions found by our model. Finally, our conclusions are drawn in Section 8.

Literature survey
Our work can be positioned within two main strands of literature: inventory control and routing. Our starting point is of a set of retailers with their own inventory and periodic demand of a single product, with a replenishment plan that depends on the route followed by a single vehicle to deliver the product. In this section we review relevant literature of both strands, pointing out the differences with our approach.
Regarding inventory, this paper deals with a non-stationary stochastic lot sizing problem: it is a single item inventory control problem, defined over a finite time horizon, with stochastic non-stationary demand. The literature in inventory control with stationary demand is vast, but academic research in lot sizing with non-stationary stochastic demand is not. Dynamic lot sizing was first introduced in [35], where an exact solution algorithm is given. In [24], the optimality of (s,S)-type policies for the lot sizing problem under stochastic demand is demonstrated. [7] presents a framework consisting of three control strategies for stochastic demand lot sizing problems: static uncertainty, static-dynamic uncertainty and dynamic uncertainty. In the first one, timing and quantity of orders are fixed at the beginning of the planning horizon. In the static-dynamic uncertainty strategy, order timings are fixed at the beginning of the time horizon, but the quantities are decided at the time of the replenishment, when the current inventory is known. In the third and most flexible strategy, the decision maker observes the inventory at the beginning of each period, deciding in first place if an order should be placed, and the replenishment quantity in case affirmative. This work motivated further studies aimed at determining optimal replenishment plans under these strategies. For instance [29] and [34] focus on the static strategy. For the static-dynamic strategy, [31] presents a MILP formulation, modeling service quality under penalty costs. More recently, [20] provides a model based on piecewise linearisation of the first order loss function and of its complemen-tary. Our work departs from the lot sizing problem literature in two main aspects. First, replenishment timings are constrained by the modeled vehicle supporting retailers: a replenishment is only possible during periods at which the vehicle is situated at a retailer position. Secondly, lot sizing problems model set up and product quantity costs typically using the linear function k + Qc, where k is the set up order cost, Q is the quantity and c the unit procurement cost. In this work, delivering product to a retailer incurs costs in terms of the energy consumption of the vehicle, which takes into account the weight of the vehicle in each period. In this way, our problem considers both unit procurement costs and set up costs using a realistic physics model (see Appendix A), which also depends on road conditions and the electric battery level at any period.
There are studies that aim to incorporate a routing element to the problems as well. The inventory routing problem (IRP) and its variants [8] is perhaps the most well studied problem that combines both inventory and routing elements. In its basic form, the IRP consist of a set of retailers holding inventory of a single product that is depleted on each period by the demand they face. There is a single warehouse, from which each vehicle starts and finishes a route on any single period, visiting retailers along the route. The ERRP shares many features with the IRP, but the key difference is that in each time period the vehicle moves from one node of the road network to an adjacent one, rather than performing a complete route. In this sense, we present the ERRP as a small bucket model [6], in which time intervals are small, treating in detail what happens during them.
Our route modeling strategy not only differentiate our approach from this literature but from the routing literature in general. Since its introduction in [9], the Vehicle Routing Problem (VRP) has been a central framework for routing research, see e.g. [16]. In its basic version, the problem consists of devising a least-cost set of routes on a given network, visiting a set of retailers and with all routes starting and finishing at a single location. Many variants have been studied including other side constraints, such as the capacitated VRP (CVRP) [3] or the VRP with Time Windows (VRPTW) [28].
Common objective functions for the VRP minimise magnitudes that are proportional to distance. The Pollution Routing Problem (PRP) [5], based on the VRP, sets a different approach for the objective by incorporating a comprehensive model, adopted from [4], to estimate energy consumption and GHG emissions of the vehicles. The model considers vehicle parameters related to forces against motion, such as aerodynamics and rolling resistance, and vehicle parameters and decision variables such as cruising speed and the weight of the vehicle to obtain an estimation of the required power in each step of the route. Since then, this approach has been followed in other green logistic studies that are not directly extensions, or variants, of the PRP (e.g., [14], [17]).
Another important aspect in green logistics is on recharging decisions on route. The Green-VRP [13] is introduced as a minimising environmental impact problem for scheduling routes of vehicles with a limited refueling infrastructure: in addition to the required retailer visits, the vehicles may visit refueling nodes when needed. Motivated by this problem, the authors in [26] introduce the Electric-VRPTW (E-VRTPTW), considering as well the time spent for complete battery recharges at stations for EVs and including time windows. Later in [14], the authors extend the E-VRTPTW including a realistic model for energy consumption (as in [5]), to determine more accurately recharging times. Other relevant studies on recharging decisions for EVs are [25], in which partial recharges are allowed or [15], which introduces the idea of time-dependent queuing times at the charging stations. Table 1 classifies the surveyed literature in terms of the main features that differentiate our work. As in the E-VRPTW and related literature, charging decisions are of key importance in the ERRP, but in our case charging opportunities take place when a vehicle transits an ERS road segment, rather than stopping at certain nodes (stations). This is also the case in some previous studies ( [2,12,30]) consisting of finding the best route from an origin to a destination for an EV, albeit the possibility of recharging is only on descending road segments, where regenerative braking can be applied. This sets an important difference: energy recovery is subject to the law of conservation of energy and, unlike in the ERRP, navigating in a close loop will always render less available battery at the end of the loop. Another important difference with this literature is that the ERRP is concerned with serving a set of retailers along the route, rather than on finding a shortest path between a pair of origin and destination nodes. To the best of our knowledge, there are no research studies on green logistic problems featuring recharging decisions on ERS networks.
Classical transportation problems such as the VRP and their variants are mathematically defined on a complete graph, with the abstraction of each arc between two retailers representing the shortest path of a sparsely connected graph representing the original road graph [32]. This is the common case in the literature: the cost weights of the arcs represent distance or any other figure (travel time, energy consumption, fuel, fuel costs, emissions) that, in the context of the problem, is highly correlated with distance. However, for the ERRP and the discussed literature on shortest paths for EVs ( [2,12,30]), the most economical route between two locations depends on the starting battery level of the vehicle (as shown in [2]), making routing decisions dynamic. Therefore, these problems cannot be formulated on a complete graph, since the abstraction of an arc between two retailers representing the amount of discharge (and charge) of the battery cannot be made. The graph structure of the ERRP and these works must represent the original road, allowing for turn-by-turn directions.
Another main difference of our work with respect VRP and green logistics literature is on the nature of demand. In these problems, the demand of each retailer node is fixed. In the ERRP, retailers face dynamic demand periodically, defined over a discrete finite time horizon. Turn-by-turn decisions of the vehicle are taken over the same time dimension, which also tracks the battery level and the load inventory of the vehicle. This allows the vehicle to visit a retailer or transit a particular arc multiple times if needed, unlike in capacitated VRP problems, where visiting each retailer only once preserves the value of load inventory decision variables. The literature regarding transportation problems in which the system changes dynamically as the vehicle visits retailers is scarce. One example of such literature is the Dependent VRP [18], where travelling times depends not only on distance but on time of the day. Another recent example is the Dynamic Bowser Routing Problem [22], where a bowser delivers fuel to construction machinery (assets), which can change location on the graph with each review of the system. Having discussed and motivated our approach by establishing the differences with related literature, we next proceed and describe the problem setup.

Problem definition and formulation
We present the Electric Roads Routing Problem (ERRP) as a transportation problem in which some road sections feature ERS technology, allowing a single vehicle to be powered by grid electricity while charging its electric battery alongside. The aim of the vehicle is to deliver a single product to a set of retailers facing demand of that product. In this section we first provide the problem definition, and then introduce a SDP formulation.

Problem definition
We consider a graph G = N , A representing a road network, with N as the set of nodes and A the set of arcs as segments of road. A subset of the nodes C ⊆ N represents retailers, and there is a node, denoted as 0, representing a depot. Other nodes in N \ C ∪ {0} represent road intersections or are used to delimit ERS road sections.
We consider a discrete planning horizon of T periods. At each period t, each retailer c ∈ C faces a demand of a single product d c t . A vehicle movement from its current node position to an adjacent one takes one time period. If the origin node is the depot or a retailer, the vehicle can load or deliver some inventory, respectively. Each retailer c ∈ C has an inventory capacity of k c units, and the vehicle has a hold capacity for inventory of K units. For each period, after a possible delivery to a retailer, the demand of all retailers takes place. If a retailer does not hold enough inventory to cover the demand of that period, the unsatisfied demand is considered lost and a penalty cost p per unit is incurred.
The vehicle has an electric battery with an energy capacity of B (in kWh units). When the vehicle traverses an arc (i, j) it requires r ij (M ) = α ij M +β ij kWh from the battery, where M is unladen weight of the vehicle (in kg.) and α ij and β ij are known parameters (see Appendix Appendix A). Parameters s ij account for the energy supplied to the vehicle (in kWh) when it traverses an electrified arc. The level of electric battery of the vehicle is updated after traversing an arc, accounting for the supplied and required electric energy at the time. If the level of battery is not sufficient the vehicle uses fuel (e.g. gasoline) to reach the destination node; the quantity of fuel consumed is computed on the basis of the extra energy required to arrive to the new node, after the battery is depleted. Although recharging opportunities present only on ERS arcs, it would be straightforward to extend the model to include charging stations: spending one or more periods at a charging station node would charge the battery according to the power the station can provide and the granularity of the periods. The cost of a kWh of energy provided by grid electricity or battery and fuel is given by parameters C e and C f respectively, and they are used to derive the transportation costs of the vehicle.
The goal of the ERRP is to find a route for the vehicle, and a replenishment plan for retailers, which minimises the costs of travelling, and the costs of unfulfilled demand over the time horizon.  We consider the simple road network presented in Figure 1 where the depot is located at node 0 and the only retailers of the network are located at nodes 1 and 2, with inventory capacities k 1 = k 2 = 5. Demand is d c t = 1 for c = 1, 2 and t = 1, . . . , T and the penalty cost per unit of lost sales is p = 25. The unladen weight of the vehicle is w = 1, and has a battery capacity of B = 20 and inventory capacity K = 4. Travel costs are C e = 1 and C f = 5. We consider a time horizon of T = 4 periods. The vehicle starts at the depot node in period 1, with no load and no battery. Retailer 1 starts with 3 units of inventory and Retailer 2 with 2 units.
The optimal solution for the problem is presented in Table 2. On the first period, the vehicle starts at the depot and loads 3 units of inventory. Then were required to power the vehicle) and transits to node 1. In period 3, the vehicle delivers 2 units of inventory to Retailer 1 and transits to node 2 using 2 units of battery and 1 of fuel. In period 4 the vehicle delivers inventory to Retailer 2, and the vehicle does not transit to a new node. There are no penalty costs incurred in any periods since the vehicle delivers to both retailers before demands exceeds inventory and enough to cover demand until the end of the time horizon. The optimal solution when (0, 4) is not electrified follows similarly and is presented in Table 3. In this case the path of the vehicle does not transit (0, 4) since the arc is not electrified and travelling costs following the former path would be more expensive.

A Stochastic Dynamic Programming formulation
In what follows, we will consider a stochastic variant of the ERRP, in which demand is stochastic. Demand uncertainty affects vehicle load and delivery decisions, and therefore the total weight of the vehicle in each period, which is one of the main factors affecting energy requirements as discussed in [5]. We refer to this variant of the problem as the Stochastic ERRP (S-ERRP). The S-ERRP can be formulated via stochastic dynamic programming (SDP) over a planning horizon of T periods by defining the state space Before defining these components we provide a detailed explanation of the dynamics of the vehicle and the retailers. At the beginning of each period the vehicle can deliver product to a retailer, if the starting node is a retailer node, or load up inventory to the vehicle, if the starting node is the depot node. The total weight of the vehicle for the period is updated after these possible actions. In both cases the quantities are subject to the storage capacity of the retailers k c and the vehicle inventory capacity K. After any possible delivery during the period is accounted for, the demand on each retailer (modeled by random variables d i t for retailer i and period t) takes place. If a retailer does not hold enough inventory to cover the demand of each period, the unsatisfied demand of that period is considered lost and a penalty cost p per unit is incurred. The vehicle finally transits to a new node reaching an adjacent node to the origin one by the end of the period, updating the level of battery for the next period and incurring travelling costs. We next model the S-ERRP by using SDP: • States: States are given by tuples (t, V pos , V inv , V bat , I ret ) where t is the current period associated with the state, V pos is the starting position of the vehicle at time t, V inv is the starting product inventory on hold of the vehicle before any load or delivery of product takes place, V bat the battery level of the vehicle at V pos and I ret is a tuple with the inventory of each retailer before any delivery at time t.
• Actions: An action a ∈ A s , related to state s, is a tuple (V pos , V up , Q ret ) where V pos is the destination node of the vehicle, V up is the inventory loaded up to the vehicle and Q ret is the possible delivery quantity at V pos .
• Transition probabilities: From a state s and action a, the transition probabilities to a new state s , p a s,s are derived directly from the random demand distributions.
• Immediate costs: The immediate costs of a state-action pair (s, a) are given by the costs of travel from V pos to V pos with weight derived from V inv and accounting for the weight that is loaded up or delivered to a retailer, and the expected penalty costs after updating I ret with the possible delivery Q ret at node V pos .
With all components defined, the optimal policy for each state can be derived by applying a backward of forward recursion algorithm on the value function (Eq. 1). However, this approach only allow us to solve small instances of the problem. In the next section, we explore a MILP heuristic for the S-ERRP.

A stochastic MILP heuristic
In this section, we present a mixed-integer linear programming (MILP) heuristic for the S-ERRP. A summary of the symbols used in this model is presented in Appendix Appendix B. We define the adjacency matrix of graph G with the binary parameters δ ij . We also denote N and C as the cardinals of N and C, the number of nodes and retailers.
In the S-ERRP, the demand faced by each retailer i and period t is a random variable denoted as d i t . As a result, the lost sales of each retailer and period are stochastic variables that depend on the deliveries given, and become a central aspect when formulating stochastic programming models in inventory control. Given a random variable ω and a scalar q, the first order loss function is defined as In a stochastic lot sizing setting, it expresses the expected value of the exceeding demand, given starting inventory at hand q, when demand follows ω. Reciprocally, the complementary first order loss function expresses the expected level of inventory after demand: In what follows, we follow a policy considering that replenishment periods and replenishment quantity decisions for all retailers are fixed at the beginning of the planning horizon, before demand random variables for any period are realised. In practical terms this means that the route the vehicle follows is decided beforehand as well, and since the replenishment quantities Q i t are fixed, the load of the vehicle and energy requirements can be calculated at the beginning of the planning horizon.
The objective function minimises the total carbon emissions emitted during the time horizon and the cost of lost sales at the retailers: The first term of the objective function accounts for the emissions caused by powering the vehicle on transited ERS roads. The second and third term account for the emissions related to the used battery and the used fuel respectively. The last term accounts for the penalty cost of the expected lost sales.
We follow introducing constraints related to the movement of the vehicle, product inventory and energy use of the vehicle. The first set of Eqs. (5-10) deal with the movement of the vehicle over the time horizon. At each period of the planning horizon, the vehicle is situated at one and only one of the nodes i ∈ N . We model this by considering binary variables V i t , being equal to one if the vehicle is present at node i ∈ N at the beginning of period t, and T ij t as a binary variable set to one if the vehicle transits from node i to node j during period t. Eqs. 5 reflects the fact that the vehicle is, at any point in time, at one and only one node of graph G. Eqs. 6 ensures that for each period the vehicle transits to a new node from where it starts. Eqs. 7-9 link transit T ij t and position V i t variables. Eqs. 10 ensures that the vehicle only transits valid arcs, observing the adjacency matrix of the graph.
The second set of Eqs. (11)(12)(13)(14)(15)(16)(17)(18) are regarding with product inventory levels: Eqs. 11 ensure the vehicle can only load inventory to the vehicle while visiting the depot node, and only up to the vehicle capacity K. Eqs. 12 ensure the vehicle can only deliver inventory in one period if it is visiting a retailer node, and up to their capacity. The transition of inventory levels of the vehicle are tracked by Eqs. 13 and 14, ensuring the total cargo does not exceed the capacity of the vehicle. Eqs. 15 approximate expected lost sales [I i t ] − for each retailer and period using the loss function using the random variables d i The idea of the approximation is to calculate the lost sales of a single period comprising the demand of periods 1, . . . , t with an starting inventory of the starting inventory s i , and all deliveries up to period t, plus the losses until period t − 1 (see Lemma 5 from [22]), but also accounting for a reduction of the starting inventory of the expected exceeding capacity deliveries of periods 1, . . . , t. Similarly, Eqs. 16 approximate expected inventory of each retailer and period [I i t ] + . The loss function and the complementary loss function are not linear. We follow the approach of [21] to linearise these functions to be able to use them in our stochastic programming. model. Eqs. 17 are used to calculate the expected inventory that would exceed the capacity of each retailer when a delivery is made. It follows from the fact that in a lost sales setting shortages are reset at the end of each period and Q i t and s i are constants (Lemma 6 from [22]).
Finally, Eqs. 18 update the total weight of the vehicle at the end of each period, after a possible delivery or load up of inventory. [ [ The set of Eqs. (19)(20)(21)(22) track the battery level inventory over the time horizon, which is used to derive the energy used from battery and fuel for each period. The variables E b t represent the energy used by the vehicle (in kWh) from its battery on the travel performed during period t. In contrast, variables E f t represent the mechanical energy the vehicle needs to finish traversing an arc when the battery has been depleted. In order to determine these variables, we define further auxiliary variables and parameters. First of all, variables b u t represent the unconstrained battery level of the vehicle, calculated in Eqs. 19 from the actual level of battery of the previous period, b t−1 , plus and minus supplied and required energy from the total mass of the vehicle W t−1 at the beginning of the period. Expanding this equation, the product of a binary and a continuous variable appear, T ij t−1 W t−1 , which are linearised in our model considering L t variables, the weight of the vehicle at the end of period t, are bounded between zero and the maximum weight of the vehicle W . In Eqs. 20, variables b t are calculated as the b u t bounded between 0 and B, representing the actual level of battery for each period. Eqs. 21 calculate battery usage in each period, considering that if the battery was charged traversing a ERS arc, the battery consumed during that period should be zero. In Eqs. 22, if b u t < 0, the interpretation is that during period t the battery was depleted and −b u t kWh were still needed to complete travelling the arc on battery. Dividing by the corresponding battery energy losses factor λ, we obtain E f t variables as the required mechanical energy to complete the travel when battery is not sufficient.
The MILP model consists of the objective function 4 subject to the constraints set in Eqs. (5-27) With the aim of investigating the effectiveness of the MILP heuristic designed for the ERRP we present the following computational study. Our goal is to compare the cost of the optimal plan obtained by the heuristic against the optimal cost obtained via SDP.
To ensure that the state space of the SDP implementation is finite, we introduce the following assumptions in relation to inventory and battery state variables. Please note that this is done without loss of generality, and for the sake of comparability, as these assumptions are not required in the MILP model. First, the stochastic demand faced by retailers is expressed using finite discrete random variables. Both retailers and vehicle product inventory are discretised by using the same units. Second, the battery of the vehicle needs to be also discretised, and as a consequence, the required energy will be expressed in terms of these battery levels. Equation A.3 is used to round values to the closest battery level unit, but this constraint cannot be captured in a MILP model. We will therefore rely on Constraint Programming [19] to model and solve these instances.
All our experiments have been carried out on a PC Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz with 32 GB of RAM, using IBM ILOG CPLEX Studio 12.7 with a time limit of 10 minutes and default constraint programming settings otherwise. The design of the experiments is described in Section 6.1, and the results obtained are presented and discussed in Section 6.2.

Design of experiments
The experiments are designed over a time horizon comprising T = 9 periods, on four road networks depicted as the graphs in Figure 2. Road network T1 has been generated for this study, while the other three were used in the computational study of [22]. On each road network, we consider six sets of retailers chosen randomly. The demand at the retailers follow normalised Poisson distributions truncated to a maximum value of 8 units. We use 10 segments for the piecewise linearisation of the loss functions associated with the stochastic demand. The inventory capacity of each retailer is 8 units while the capacity of the vehicle is 10 units.
The test bed comprises 432 instances, the full factorial of the values considered for the following parameters: road networks, sets of retailer nodes, initial inventory level of retailers, unit penalty costs (in monetary units (MU)) and demand patterns faced by retailers over the planning horizon, as Poisson distribution described by their mean parameters. The possible values considered are described in Table 4. For our tests we consider a vehicle with a Gross Vehicle Weight (GVW) of 22 tonnes (t) with a maximum payload of 10t. The capacity of the battery is 150 kWh. The cost of one kWh of energy from ERS or battery is taken as 1 MU (C e = 1), while one kWh of fuel costs 3 MU (C f = 3). Regarding the battery of the vehicle, we consider 20 possible levels for the state of charge.
As mentioned at the beginning of this Section we must ensure that operations of charge and discharge of battery are closed for the state space considered. To this end we introduce new parameters: which account for required energy, expressed in battery level units, of each arc and vehicle weight possible. Equation 19 is changed accordingly:

Results and discussion
The results of our computational study are summarised in Table 5, which shows the mean, median and standard deviation of the percentage error of the solutions obtained by the MILP heuristic when compared with the optimal solution obtained by the SDP formulation, when pivoting all the parameters considered in our test bed. Overall, the heuristic obtains solutions which costs are 3.72% above the optimal. It is worth noticing that whereas the optimal solution is achieved by reviewing the state of the system on every period, after the demand at the retailers is realised, being able to adapt decisions, our heuristic focuses on an static uncertainty strategy [7], providing a fixed policy set at the beginning of the planning horizon. Our future work includes investigating the performance of our heuristic on a receding horizon setting: in this setting the MILP heuristic is used over periods t, . . . , T (starting with t = 1) but only decisions on period t are considered. After the demand is observed the state of the system is updated (inventory level of retailers and vehicle load, position of the vehicle on the graph and level of battery of the battery). The same process is successively repeated over periods t+1, . . . , T until reaching the end of the time horizon. This approach has proven to considerably improve cost performances of lot sizing problem policies such as the one considered in our heuristic [11].

Case study
In this section we investigate how the relation of the costs of electricity and fuel, and the penalty costs, affect the plan provided by the MILP heuristic. Our new experiments are set up in the region of Kent, in the United Kingdom, creating a realistic instance of the problem, and provide an example of how the delivery quantities and the order of visits to retailers can impact the costs of transportation and reduce the usage of fuel on a ERS network. Figure 3 shows a map of the region, highlighting the major roads used by HGVs and the graph representation of these roads, in splits of around 5 km between adjacent nodes, making a total of 52 nodes. The depot location is situated at the port of Dover, and we consider five retailer locations situated in densely populated areas of Kent. The electrified stretches of road are marked in blue, and they provide 200 kW of power. The HGV considered has a GVW of 17t, with a load capacity of 5t, and it is equipped with a 200 kWh battery. Each retailer has a stocking capacity of 2000 kg of product.
The time horizon for our experiments is 25 periods. All five retailers face demand on each period that follow independent normal distributions N (50, 2). We consider two configurations of initial inventory: (I1) all retailers start with 500 kg. of product and (I2) Canterbury and Sittingbourne are out of stock, while the remaining retailers start with 800 kg. The kWh cost of electricity is C e = 1, and consider three values for the cost of fuel C f = {3, 6, 10}. We also consider two values for the stockout penalty cost p = {0.1, 0.5}. In all 12 instances the vehicle starts at period 1 at the depot location, with a depleted electric battery and no loaded inventory. We run CPLEX solver with default settings and a time limit of 1 hour. Table 6 summarises the solutions reached by the MILP heuristic for the 12 instances, showing the quantities that the vehicle delivers to each retailer and a sketch of the route followed by indicating the order in which the depot and set of retailers are visited. Some trends can be observed in the solutions. First of all, the vehicle load decreases with lower penalty costs and higher fuel costs, to the limiting case of not delivering to any retailers in instances 3 and 9.
Fuel costs can also have an impact on the routes taken. In I2 instances, Canterbury starts with no inventory and it is usually visited before other retailers (instances 8, 10, 11). However, when fuel costs are high, the vehicle either does not deliver (instance 9), or starts visiting Folkestone and Ashford (instance 12) a route that allows for more battery charging and less fuel usage.

Conclusions
In this paper we have dealt with a transportation problem related to emerging technology which allows to charge electric vehicles as they travel, introduced as the Electric Roads Routing Problem, and provided a heuristic for dealing with uncertainty of demand at retailers of the product delivered. The effectiveness of the heuristic was demonstrated by carrying out experiments on an extensive test bed focusing different demand distributions patterns over the time horizon, set of retailer nodes, initial inventory at retailer nodes and on a range of values for the penalty cost. The results show that the heuristic achieves solutions that, overall, are only 3.72% over the optimal solutions. We tested the heuristic on a realistic case study and showcased how the costs of fuel could impact the routes chosen on a ERS network when delivering to retailers. Future research may investigate the benefit brought by a receding horizon setting and dynamic cut generation strategies as in [33] to enhance scalability.

Appendix A. Energy consumption model
Travelling costs, either in terms of emissions or economic costs of fuel and electricity usage, are directly related to the energy requirements (kWh) necessary to power a vehicle. To estimate these values we use a simple physics model derived from [4] and in line with the followed approach by [5].
At any given time, the mechanical power P of a vehicle, as a function of its acceleration a (m/s 2 ) and velocity v (m/s) can be estimated as follows: where M is the mass of the vehicle (kg.), θ is the road angle in degrees, C d is a drag coefficient specific for the vehicle, A its frontal area (m 2 ), g is the gravitational constant (9.81m/s 2 ) and C r the rolling resistance of the wheels of the vehicle with the road surface.
For our purposes, we assume the vehicles transit each arc (i, j) with slope θ = θ ij cruising at constant speed v ij and therefore, the acceleration is zero, a = 0. We simply denote the mechanical power on node (i, j) as The electric power, and ultimately the battery power that is needed to maintain constant speed v ij , depend on multiple factors. As in [14] we estimate the battery power required to sustain v ij in arc (i, j) accounting for engine and battery efficiency with a single parameter λ, obtaining P b ij = λp ij . Finally, the energy required to traverse (i, j) using electric battery, expressed in Joules, can be obtained by multiplying the required power from the battery by the time in seconds spent transiting the arc, d ij /v ij , and we express it as a function of the weight of the vehicle M : where α ij = λd ij g(sinθ ij + C r cosθ ij ) and β ij = λd ij 0.5C d Aρv 2 ij are arc constants.
In absence of battery energy, the vehicle uses fuel to continue its trip. An estimation of fuel usage and emissions is given in [4]. Given the engine power output P of the vehicle, the fuel rate is calculated as where k is the engine friction, N is the engine speed, V the engine displacement, the drivetrain efficiency of the vehicle, P a is the amount of engine power related with engine running losses and vehicle accessories such as air conditioner, η is a measure of efficiency for diesel engines and U is a factor that depend on N and other constants.
For the scope of this problem, where travelling speeds are relatively similar on different road segments, we follow a pragmatic approach and approximate fuel directly from the power output P , or equally, as a linear transformation of the mechanical energy needed to traverse a specific arc.