• No results found

Two-Stage Stochastic Programming Column Generation Heuristic

5.4 Master Problem

The problem consists of two sets of nodes. The first set,S+, contains all stations in the BSS, including the depot. The second set,S, contains the subset of stations where bike rebalancing and battery swaps can be performed, i.e. not including the depot. Both sets of stations are indexed by i. Further, the setV consists of service vehicles, indexed by v. Each vehiclev has an associated set of possible routes,Rv, and an associated set of possible patterns,Pv. Routes are indexed byrand patterns are indexed byp. Lastly, the setFdefines the set of possible customer arrival scenarios, indexed bys.

There are five types of quantity parameters describing the first stage decision performed by vehiclevdriving routerwith patternp.QF CLvrp andQCCLvrp denote the quantities of flat and charged bikes loaded onto the vehicle, respectively. Similarly,QF CUvrp andQCCUvrp denote the unloaded quantities of flat and charged bikes.QBvrpstores the number of battery swaps performed by service vehiclevat the start station of routerwith patternp. Note that all routes considered by a vehicle have the same starting station, as the routes are chosen from a vehicle indexed set.

A service vehicle has an inventory consisting ofLBVv batteries,LF Vv flat bikes andLCVv charged bikes at its origin station. The capacity for bikes at each service vehicle isQCVv . Further, the starting station for vehiclevhas an inventory ofLF Sv flat bikes andLCSv upon arrival of vehiclev. Each station has an associated capacityQSv.

Recall that a subproblem, step two of the presented heuristic, is solved for a given combi-nation of route, pattern and scenario. The objective value of the subproblem solution for router, patternpand scenariosis used in the master problem as parameterRrps. This value aims at expressing the benefit of choosing routerand patternpin scenarios. Each scenarioshas probabilityPsof occuring. The binary matrixAirv indicates the first sta-tionifor a vehiclevin a specific router. The matrix is used to determine the next station decision in a given scenario.

The model uses the variables vrps to find the weighted combination of columns that results in the highest total column score, while satisfying the problem constraints. The quantity variables qBv,qvF CL, qCCLv ,qvF CU andqCCUv ensure that the first stage quan-tity decisions are uniquely defined for each vehicle. Further, the first stage next station decisions are defined by the binary variablexivsfor each vehicle in each scenario. Non-anticipativity constraints capture the operational decision xiv, making the decision con-sistent between scenarios. The full notation used in the master problem is summarized in Table 5.1.

Table 5.1:Notation used for modelling the master problem Sets

S+ Set of stations, including the depot

S Set of stations

V Set of vehicles

Rv Set of possible routes for vehiclev

Pv Set of possible quantity patterns for vehiclev F Set of possible customer arrival scenarios Indices

i Stationsi2S+

v Vehiclev2V

r Router2Rv

p Patternp2Pv

s Scenarios2F

Parameters

Aivr 1 if stationiis the start station in routerfor vehiclev, otherwise 0 Rrps Objective value of subproblem for routerwith patternpin scenarios Ps Probability of scenarios

QF CLvrp Number of flat bikes loaded to service vehiclev at the start station for router with patternp

QCCLvrp Number of charged bikes loaded to service vehiclevat the start station for route rwith patternp

QF CUvrp Number of flat bikes unloaded from service vehiclevat the start station for route rwith patternp

QCCUvrp Number of charged bikes unloaded to service vehiclev at the start station for routerwith patternp

QBvrp Number of battery swaps performed by service vehiclevat the start station for routerwith patternp

QCVv Capacity for bikes at service vehiclev

QSv Station capacity at the origin station for service vehiclev LF Vv Load of flat bikes at service vehiclevat its origin station LCVv Load of charged bikes at service vehiclevat its origin station LBVv Load of batteries at service vehiclevat its origin station LF Sv Load of flat bikes at its origin station for service vehiclev LCSv Load of charged bikes at its origin station for service vehiclev Variables

vrps Weighting variable of the allocation of vehicle v to route r with pattern pin scenarios

xivs 1 if vehiclevtravels directly to stationiin scenarios, 0 otherwise

xiv Non-anticipativity variable forxivs, representing the first stage decision of which station to visit next

qF CLv First stage decision of flat bikes loaded to vehiclev qCCLv First stage decision of charged bikes loaded to vehiclev

qF CUv First stage decision of flat bikes unloaded from vehiclev qCCUv First stage decision of charged bikes unloaded from vehiclev qBv First stage decision battery swaps for vehiclev

Objective

The master problem objective finds the combination of columns that has the highest sum of rewards, equal to subproblem objective values. Each scenario is multiplied with the probability that the scenario occurs.

The master problem constraints secure that the first stage decisions are linear combinations of the weighted columns. The decisions must be valid in terms of the current vehicles and stations inventories. Constraints (5.2) - (5.6) capture the quantity variables for each vehicle as a linear function of the pattern quantity parameters in the weighted columns. Further, constraints (5.7) secure that the first stage loading decision is valid for the number of avail-able bike slots at the vehicle. Constraints (5.8) work similarly for the first stage unloading decisions with respect to available locks at the station. The number of battery swaps must be lower than the available flat bikes after rebalancing decisions and lower than the num-ber of charged batteries at the vehicle, secured by (5.9) and (5.10). Constraints (5.11) and (5.12) restrict the number of flat and charged bikes loaded from a station, respectively. The number of unloaded bikes at a station are restricted by Constraints (5.13) and (5.14) in the same manner. Constraints (5.15) capture the next station to visit for a specified vehicle in a specified scenario. These constraints also secure that all columns with nonzero -values in a given scenario must have the same first station. Each vehicle can decide on maximum one station to visit next, secured by (5.16). Further, each station, apart from the depot, may be chosen as the next destination by at most one vehicle. Constraints (5.17) secure this.

Constraints (5.18) are non-anticipativity constraints, and ensure that the first stage next station decision is the same for all scenarios. As an extention to this, Constraints (5.19) ensure that each vehicle chooses a station to visit next. Lastly, constraints (5.20) - (5.22) restrict the feasible values for the decision variables.

X

r2Rv

X

p2Pv

QF CLrpv rpvs=qF CLv v2V, s2F (5.2)

X

xiv =xivs i2S+, v2V, s2F (5.18) X

i2S+

xiv = 1 v2V (5.19)

0 rpvs1 r2Rv, p2Pv, v2V, s2F (5.20)

xivs2{0,1} i2S+, v2V, s2F (5.21)

qF CLv , qCCLv , qvF CU, qCCUv , qvB 0, integer v2V (5.22)