1 Introduction

Over the past few years, sharing economy has generated a series of sharing systems, where the sharing bikes plays the most important role in public services for urban smart cities (Corcoran et al., 2014; Evan et al., 2021; He et al., 2017). For the fact that each user can rent and return the bikes at any station with a limited cost to meet daily commuting needs, the size of domestic bike-sharing market has reached 22 billion yuan by 2020 (Financial Times, 2020). Especially since the COVID-19 pandemic, it has changed humans travel choice. And the demand for sharing bikes has been motivated due to its capability of providing short-distance travels and avoiding gatherings (Elaine, 2021). As the data of Hello Bike platform in China said that, the demand for sharing bikes among the office buildings and subway stations was increased by 70% on the day Wuhan city unblocked, compared with the previous two days. Also, the overall cycling volume in Wuhan has been increased by more than 10 times compared to the day the city was locked (010f.com, 2020). According to a report by the New York City Department of Transportation, Citi Bike system has added 3700 bikes in 2020 for better response to travel demand, and the number of rides in the final four months of 2020 has exceeded it in the year of 2019 (Chen, 2021).

According to an analysis report on sharing bikes, based on the total 8 million investment of sharing bikes after the epidemic, the carbon emission of the bike sharing system has been reduced by 1.636 million tons in one year (Fang, 2021). Moreover, as reported by the International Energy Agency (IEA), carbon emissions in China's transportation sector account for about 15% of the country's terminal emissions (Paper.cn, 2021). Sharing bike can replace high-emission automobiles to fill the gap between public transportation hubs and destinations, and realize low-carbon travel in the last mile to effectively reduce carbon emissions by 667,000 tons (Ye et al., 2021). Therefore, sharing bikes becomes an effective option to create a low-carbon transportation system, for better response to the dual-carbon target of China (JRJ.com, 2021).

However, the demand surges of sharing bikes have led to such problems that need to be regulated, as disorderly parking and uneven distribution of used vehicles (Feng, 2022). According to recent survey of a large tourist city in China, partial of sharing bikes are disorderly parked by users at their destinations, far away from designated areas, and even parked on motorways or sidewalks, causing urban traffic congestion and inconvenience for people to travel. Additionally, in densely populated areas such as shop** malls, stations, and schools, the number of parked bikes has exceeded the parking space capacity, while some streets only have a few bikes that cannot meet the travel demand in time (Zhang, 2022). It is demonstrated that there exist more than 8000 bikes to be removed and almost 2000 vehicles to be reallocated in the small regions within one day (hbspcar.com, 2021). Therefore, the demand surge and exacerbated mismatch of sharing bikes brings about a challenge in urban operations optimization.

In order to effectively solve such problems of sharing bikes, the government has assumed part of the subsidy cost. That is, sanitation workers are subsidized to assist bike-sharing companies to replace the bikes in a regular manner, to promote the sustainable development of urban transportation (Jiang, 2019). As the main beneficiary of sharing system, the platform is also assigned with the primary responsibility to allocate the bikes reasonably for low-carbon travel and improved resource utilization (Liu, 2021; Zhu, 2017). A bike-sharing platform Qingju in China said that it will use its intelligent scheduling system as ‘Qingju Intelligent Control Center’ to predict the bike demand for users and monitor the current number of vehicles at each station, to deal with the problem of vehicle supply and demand siltation (sohu.com, 2020). Furthermore, the visualization of vehicle distribution starts to be implemented by platforms in major city, allowing users to have an effective perception of vehicle quantities in the stations (Fan et al., 2021). As platform Hellobike said that its ‘Hello Brain Intelligent Scheduling System’ can use the algorithms and artificial intelligence to predict the supply and demand of vehicles at a certain station, based on its attributes, historical usage data and weather factors. Thus, its intelligent system has reached the coverage about 50% in selected cities, and each sharing bike can be used by at least one more person during one day (hbspcar.com, 2021). Consequently, faced with disorderly parking and uneven distribution of used vehicles, an intelligent scheduling becomes a significant method to effectively reallocate the sharing bikes among multiple locations and optimize the resource configuration for sustainable urban transportation.

Aforementioned studies focused on bike-sharing system mainly dealt with the location strategies and travel routes of bikes under environmental constraints (Farham et al., 2018; Lin & Ku, 2014). Based on the deterministic demand of sharing bikes in a network with multiple stations, the location strategies can be defined for minimum operational cost, while the travel routes can be determined for less environmental impacts (Ge et al., 2021; Maximilian & Grit, 2018). Considering the demand surges, disorderly parking and uneven distribution of sharing bikes in the practical network, this study provided an intelligent algorithm that is designed to find out the optimal schedules for bikes to be reallocated and the delivery routes for bikes to be transferred among multiple locations. Furthermore, it has been demonstrated that the combination of prediction and optimization models can be utilized for optimal operation decisions, where the prediction model provided the key parameters for the optimization model (Elmachtoub & Grigas, 2021). This study develops a predict-then-optimize method, where a data-driven robust optimization model with a machine learning method is used to determine the optimal reallocation schedules for sharing bikes based on data in the practical network. Having the number of predicted bikes in multiple locations, an exact branch-and-price algorithm is utilized to find the optimal delivery routes for bikes to be transferred. Therefore, the predict-then-optimize method proposed in this study aims to overcome the challenges that demand surges and matching difficulty of sharing bikes bring to the operators, and achieve the optimal resource configuration for the sustainable bike-sharing system.

The rest of this paper can be organized as follows: Sect. 2 states the literature review of existing problems and methodologies relative to the bike-sharing system. Section 3 illustrates a simplified example of the bike-sharing network before and after optimization. Section 4 develops a predict-then-optimize method to design the vehicle reallocation schedules and delivering routes for the bike-sharing system. Section 5 gives a data-driven study of bike-sharing system in a major city in China. Section 6 summarizes the conclusion

2 Literature review

In response to demand surges and exacerbated mismatch of sharing bikes in urban transportation network, how to reallocate the sharing bikes with reduced operational cost and reasonable resource configuration becomes an important issue in this study. Considering multiple components of this problem, relative researches about the bike-sharing system can be described as follows:

2.1 Sharing bikes and resource allocation

Recently the sustainable development of smart cities puts forward the requirements for economic and environmental benefits in the urban transportation, where the sharing bikes have been widely used in daily lives for its quick response to travel demand and less carbon emissions (Fricker & Gast, 2016; Han et al., 2021; Rong et al., 2021). It has been demonstrated that the utilization and spread of sharing bikes have improved the operational efficiency for urban transportation, increases the passenger satisfaction for on-demand services and reduced the road congestion for effective operations (Cao et al., 2017). Moreover, the response to travel demand and less carbon emissions have been considered in network optimization to minimize the total transportation cost, while a given budget fluctuated with quality uncertainty has been studied to maximize the satisfaction of sharing bikes (Caggiani et al., 2019; Chang et al., 2017). However, demand surges of sharing bikes have brought about serious challenge to effective resource allocation and caused such problems as disorderly parking and uneven distribution of bikes in practical transportation network (Feng, 2022; hbspcar.com, 2021). The spatial distribution of resources with point-to-point sharing has been considered in research, where effective vehicle allocation schedules were needed to improve the operational efficiency (Balseiro et al., 2021; Benjaafar & Hu, 2020). In this study, an optimal reallocation schedules of bikes should be designed to achieve the reasonable resource allocation and satisfy the increasing demand in the bike-sharing system.

2.2 Location and routing problems of sharing bikes

In the past few years, researches of bike-sharing system mainly focused on location decisions and delivery routes to assign vehicles as a location routing problem (LRP) for maximum operational profits and minimum environmental impacts (Farham et al., 2018; Lin & Ku, 2014; Okan, 2021). As an extension of traditional vehicle routing problem, the LRP was set to be an NP-hard problem, and the studies about sharing bikes often tried to minimize the transportation cost under deterministic demand of bikes (Çăgrı et al., 2018). Additionally, the variations of LRP have been proposed not only to determine the location decisions for bikes to be charged, but also to deliver the sharing bikes with time window constraints (Ge et al., 2021; Maximilian & Grit, 2018). Considering the complexity of bike-sharing system in practical network, aforementioned researches tried to coordinate the supply and demand of bikes and address the location and routing problems with synchronization constraints (Levin et al., 2019; Li et al., 2020). However, such problems as disorderly parking and uneven distribution caused by demand surges of bikes strengthens the difficulty for operators to achieve effective transportation resource allocation, compared with traditional LRP. (Lu et al., 2017; Pu & Zhan, 2021). Consequently, demand surges need to be considered in the bike-sharing system to find the optimal reallocation schedules for less operational cost and improved resource allocation.

2.3 Reallocation schedules for sharing bikes with demand surges

Development of urban population, economy and tourism provide the urban operations with increasing commuting demand for last mile, the reallocation schedules of sharing bikes have been studied in more researches, while the demands are supposed to be deterministic or in a Poisson process (Boyacı et al., 2015; Nourinejad et al., 2015; Sattrawut et al., 2016). Recently, the reallocation schedules of vehicles faced with demand uncertainty have been considered in the bike-sharing system to minimize the long-term operational cost with more demand satisfaction (He et al., 2017; Lu et al., 2017). It has been demonstrated that there exist two types of approaches to deal with the problems with indeterministic factors in vehicle routing problem, as the stochastic optimization assumes that the truthful distribution of indeterministic factors is known in advance, while the robust optimization only requires uncertain data in an indeterminate set and considers the optimum in the worst case (Alizadeh et al., 2016; Hu et al., 2017; Moallemi et al, 2020; Pelletier et al., 2019). For the first approach, few researchers developed a stochastic optimization model to satisfy random passenger demand, the probability distribution of which is known in advance (An & Lo, 2016; Grossi & Nan, 2019). For the second, Sharonet al. (2019) firstly considered the reallocation of vehicles in the bike-sharing system to rebalance the inventory levels of different stations, and developed a robust-guided local search algorithm to solve the model. Differentiated from previous researches, this study combines the utilization of robust optimization model to find the reallocation schedules of bike-sharing system with demand surges, and an optimization algorithm to assign the bikes to multiple locations with minimum delivery cost and enhanced transportation efficiency.

Table 1 shows the characteristics of problem features and solution methods in the relevant literature.

Table 1 Characteristics the bike-sharing reallocation in relevant literature

2.4 Data-driven predict then optimize

Relative to the optimization problem in bike-sharing system proposed in this study, some researches have discussed the prediction and optimization problems in the transportation network (Bhuiyan et al., 2020; Wen et al., 2019). As the prediction model can be utilized with optimization model to find the optimal operation decisions, and the prediction model can provide the expected factors for next optimization model when solving the stochastic optimization problems (Tsai et al., 2020; Elmachtoub & Grigas, 2021). The robust optimization model used in this study is set to be the prediction model for finding the expected reallocation schedules of sharing bikes for routing optimization problem. As an extension of robust optimization model, distributionally robust optimization (DRO) model was proposed, where the probability of a failure scenario is assumed to be unknown, but there existed an ambiguity set that minimized the expected cost in the worst case (Cheng et al., 2018). Also, the vehicle reallocation problem in the bike-sharing system has been discussed by researchers to realize dynamic matching of vehicle supply and demand by using a stochastic dynamic programming and a DRO model (He et al., 2020; Lu & Cheng, 2021). Furthermore, the operation decision generated by intelligent algorithm and based on data has been demonstrated its effectiveness in the optimization problems (Araz et al., 2020; Choi et al., 2018; Mišić & Perakis, 2020). Karsten et al. (2021) has tested the performance of a hybrid algorithm based on machine learning to predict the supply and demand of market in the bike-sharing system and optimize the reallocation decisions of sharing bikes. Consequently, a predict-then-optimize method combining a data-driven DRO model with machine learning and a branch-and-price algorithm is proposed in this study to solve the reallocation and routing problems of bike-sharing system.

3 Problem statement

Compared with traditional researches for network optimization in bike-sharing system, the bikes are considered with demand surges in our proposed problem, where the sharing bikes can be pre-allocated to optimize the bike resource allocation and the delivery routes of sharing bikes to multiple locations can be designed to minimize the total transportation cost. To describe the bike-sharing network with demand surges, this section illustrates two types of network structure as non-optimized and optimized network, as shown in Figs. 1 and 2, where each network is composed of one depot and five locations (i.e., a railway station, a subway station, a school, a bus station and an intersection with traffic lights). In Fig. 1, sharing bikes in each location is confronted with three times of demand surges represented by different colors and owning to a series of events. For example, the breakdowns or delays of subways can induce the crowds of stations, which results in the increase of unmatched passengers. Also, the crowds at bus stations mainly focus on the morning and evening peaks, compared with the other time periods during working days (Bruno et al., 2020). Due to the multiple times of demand surges, a whole planning horizon can be divided into multiple time periods for service. As shown in Fig. 1, there exist multi-period one-to-one delivery service in the non-optimized network, responding to multiple times of practical demand surges.

Fig. 1
figure 1

Schedules to satisfy the demand surges in non-optimized network

Fig. 2
figure 2

Schedules to satisfy the expected demands in optimized network

In Fig. 1, the three times of demand surges result in three types of passengers to be matched in the bike-sharing network. All the demand of each location can be satisfied by its own available bikes, the depot, and another location nearest to it. For example, the number of available bikes at railway station is only one, while the demand surge in the first time period caused three passengers to be matched and there are extra two passengers need to be matched by the depot. Similarly, the demand surges in the second and three time period at railway station can be satisfied by the depot. Differentiated from that, there exist five and two available bikes at school and bus station. The demand surge at school is one and two in the first and second time period, both of which can be matched by its available bikes. There are two available bikes to be left as school in the third period. Meanwhile, the demand surge at bus station in the first time period is three, which exceeds its available number two, and the extra two can be matched by the depot. In the third time period, the demand surge at bus station is two that can be satisfied by its nearest school with the remaining available bikes. Considering the multiple one-to-one delivery service in the network, there exist 5, 4 and 4 bikes to be delivered in the three time periods, and no less than 3 delivery routes to be generated in each time period. Therefore, the demand surges with uneven distribution of sharing bikes and the multiple one-to-one service have induced the reduced operational efficiency and increased transportation cost. To solve this issue, a “predict-then-optimize” methodology is proposed in this study to transfer the multiple one-to-one service to a one-to-many service, as shown in Fig. 2.

In Fig. 2, the optimal reallocation schedules of sharing bikes to each station can be predicted through a data-driven robust optimization model. For example, the demand of sharing bikes in the whole planning is predicted to be 4, 4, 3, 4, and 5, respectively for the five stations. Based on the expected number of bikes assigned to each station in the planning horizon, the delivery routes of bikes from the depot to multiple stations can be determined by a branch-and-price algorithm. It can be seen that the sharing bikes of railway station, subway station and school can be delivered by a truck departure from the depot, while the bikes of bus station and intersection with traffic lights can be delivered in another route. Compared with practical demand surges in the non-optimized network, there exist two passengers not matched at the railway and bus stations in the whole planning horizon. However, the total number of delivery routes to assign bikes are reduced to 2 and the transportation cost can be minimized through the effective resource allocation. Consequently, the predict-then-optimize method composed of a data-driven robust optimization model and a branch-and-price algorithm in this study can improve the operational efficiency of bike-sharing network with demand surges.

4 Predict-then-optimize method

The location decisions and routing problems in aforementioned studies were commonly solved by exact or heuristic algorithms under deterministic demand (Levin et al., 2019; Lin & Ku, 2014; Maximilian & Grit, 2018). However, as the demand surges in the bike-sharing system have caused uneven resource distribution, reallocation schedules of vehicles with under indeterministic demand surges should be considered to minimize the long-term operational cost (Caggiani et al., 2019; He et al., 2017). Differentiated from previous researches, this study develops a predict-then-optimize method, where a data-driven DRO model with a machine learning method is used to determine the optimal reallocation schedules of bike-sharing system with demand surges based on data in the practical network. Based on the number of predicted bikes in multiple locations, an exact branch-and-price algorithm is utilized to find the optimal delivery routes for bikes to assign the bikes to multiple locations with minimum delivery cost and enhanced transportation efficiency.

4.1 Data-driven DRO model

The stochastic optimization and robust optimization models have been demonstrated to effectively deal with the vehicle routing problem with indeterministic factors, as the first requires the truthful distribution of indeterministic factors, while the second only considers the optimum in the worst case (Hu et al., 2017; Moallemi et al, 2020; Pelletier et al., 2019). Combining the advantages of both the approaches, the DRO model can find the optimal objective under the worst distribution of indeterministic factors generated from the data (Cheng et al., 2018; He et al., 2020; Lu & Cheng, 2021). Therefore, the data-driven DRO model is utilized in this section to find the optimal reallocation schedules of sharing bikes in our proposed problem.

This section considers that an operator allocates sharing vehicles from I supply depots to J demand nodes with supply surplus due to the wide information. Let xij denote the number of vehicles allocated from depot i to node j. bij can be defined as the fixed cost of allocating a vehicle from depot i to node j. Qi represents the capacity of sharing vehicles from depot i. Suppose there exist S scenarios of historical demand data with a collection \({\hat{\varvec{d}}}_{s} = \left\{ {\hat{d}_{1} ,\hat{d}_{2} ,...,\hat{d}_{j} } \right\}\) in each scenario s ϵ S. And if the uncertain demand has been realized, one of which can be rewarded with revenue aj for node j. Considering the settings of statistic demands, the notations used for robust mathematical models are shown in Table 2.

Table 2 Notations and definitions in the data-driven robust optimization models

4.1.1 Distributionally robust optimization (DRO) model

The distributionally robust optimization (DRO) model generally featured in the uncertainty set based on scenario trees and the specifying ways for event-wise adaptation of decision variables (Bertsimas et al., 2021). In this formulation, resource decision variables f(s) satisfies event-wise static adaptation A(C) shown as follows:

$$ A\left( C \right) = \left\{ {f:S \mapsto {\mathbb{R}}\left| \begin{gathered} f\left( s \right) = f^{\xi } ,\xi = H_{C} \left( s \right) \hfill \\ {\text{for some }}f^{\xi } \in {\mathbb{R}} \, \hfill \\ \end{gathered} \right.} \right\} $$
(1)

In Eq. (1), ξ denote a subset of S scenarios, \(\xi \subseteq S\), while C defines a collection composed of mutually exclusive and collectively exhaustive (MECE) scenarios. Correspondingly, the rule \(S \mapsto C\left| {\xi = H_{C} \left( s \right)} \right.\) maps s to the only subset ξ is in C that contains the scenario s.

Meanwhile, f(ds) should be event-wise static affinely adaptive of Ā (C, J) (Bertsimas & Goyal, 2012), which can be stated as Eq. (2).

$$ \overline{A}\left( {C,J} \right) = \left\{ {f:S \times {\mathbb{R}}^{J} \left| \begin{gathered} {\mathbf{f}}({\varvec{d}}_{s} ) = f_{0} \left( s \right) + \sum\limits_{j \in J} {f_{j} \left( s \right) \cdot d_{j} } ,s \in S \hfill \\ {\text{for some }}f_{0} ,f_{j} \in A\left( C \right),j \in J \, \hfill \\ \end{gathered} \right.} \right\} $$
(2)

The uncertainty set Zs in scenario s can be constructed around the historical demand samples as Eq. (3).

$$ Z_{s} = \left\{ {{\varvec{d}}_{s} \in \left[ {\underline{{\varvec{d}}} ,\overline{{\varvec{d}}} } \right]\begin{array}{*{20}c} {} \\ \end{array} \left| {\begin{array}{*{20}c} {} \\ \end{array} \left\| {{\varvec{d}} - {\hat{\varvec{d}}}_{s} } \right\|} \right. \le \tau } \right\},s \in S $$
(3)

where τ ensures that ds should be constructed as a τ-neighborhood around the demand samples \({\hat{\varvec{d}}}_{s}\).

Therefore, the sample robust model with a DRO framework can be established

$$ \mathop {\min }\limits_{{{\mathbf{x}},f}} \begin{array}{*{20}c} {} \\ \end{array} \left\{ {\sum\limits_{i \in I} {\sum\limits_{j \in J} {\left( {b_{ij} - a_{j} } \right) \cdot x_{ij} } } + \mathop {\sup }\limits_{{P \in {\mathcal{F}}}} E_{P} \left[ {\sum\limits_{j \in J} {a_{j} \cdot f_{j} \left( {\tilde{s},{\varvec{d}}_{s} } \right)} } \right]} \right\} $$
(4)
$$ f_{j} ({\varvec{d}}_{s} ) \ge 0,\forall j \in J,{\varvec{d}}_{s} \in Z_{s} ,s \in S $$
(5)
$$ f_{j} \left( {{\varvec{d}}_{s} } \right) \in \overline{A}\left( {C,J} \right),\forall j \in J $$
(6)
$$ f_{j} ({\varvec{d}}_{s} ) \ge \sum\limits_{i \in I} {x_{ij} } - d_{j} ,\forall j \in J,{\varvec{d}}_{s} \in Z_{s} ,s \in S $$
(7)
$$ \sum\limits_{j \in J} {x_{ij} } \le Q_{i} ,\forall i \in I $$
(8)
$$ x_{ij} \ge 0,\forall i \in I,j \in J $$
(9)

where the ambiguity set ℱ for each scenario s is given as follows:

$$ {\mathcal{F}} = \left\{ {P \in P_{0} \left( {{\mathbb{R}}^{J} \times S} \right)\left| \begin{gathered} \left( {{\varvec{d}}_{s} ,\tilde{s}} \right) \sim P \hfill \\ P\left[ {{\varvec{d}}_{s} \in Z_{{\tilde{s}}} |\tilde{s} = s} \right] = 1,\forall s \in S \hfill \\ P\left[ {\tilde{s} = s} \right] = u_{s} ,\forall s \in S \hfill \\ \end{gathered} \right.} \right. $$
(10)

Additionally, partial of the objective (4) can be expressed by the followings:

$$ E_{P} \left[ {\sum\limits_{j \in J} {a_{j} \cdot f_{j} \left( {\tilde{s},{\varvec{d}}} \right)} } \right] = \sum\limits_{s \in S} {u_{s} \cdot \left[ {\sum\limits_{j \in J} {a_{j} \cdot f_{j} \left( {s,{\varvec{d}}} \right)} } \right]} $$
(11)

where \(\tilde{s}\) denotes a random scenario scalar related to demand samples. The weight of scenario s is μs, which can be set as 1/S in this model. While, it can be determined by machine learning-based algorithms (Bui et al., 2020; Maxwell et al., 2018).

4.1.2 Machine learning-based DRO (ML-DRO) model

The decision tree consists of directed edges and multiple nodes, which can be divided into the internal nodes and leaf nodes. Each internal node represents a type of attribute, and the leaf node presents a class corresponding to the decision result (Kourou et al., 2015; Sangai et al., 2019). The root node contains all the samples of datasets, while the sample set of each node will be divided into sub-nodes through an attribute division. The construction of a decision tree can be seen as the consecutive process of attribute divisions for the datasets, where the outputs from the divisions are determined with one more node added (Yacine & Pourghasemi, 2019; Tao et al., 2020). Furthermore, based on the multiple attribute divisions of the datasets, the decision tree has been treated as a kind of classification and regression method, which can be used to deal with the discrete data with an objective of categorical data and the continuous data with an output of real numbers (Hao et al., 2019).

In this section, the decision tree regression model is considered to determine the outputs according to the side information as the feature vector of the inputs, where the least square method (LSM) is utilized to achieve the attribute division. Suppose R and Y denote the input and output variables. The datasets can be represented as D = {(r1, y1), (r2, y2), …, (ri, yi), …, (rN, yN)}, where ri = (ri1, ri2, …, rin), n is the number of feature vector and N is the sample size. For the input variable with the jth feature vector rj and its value s, the division rule on the basis of LSM can be stated as follows:

$$ \mathop {\min }\limits_{j,s} \left[ {\sum\limits_{{{\mathbf{r}}_{i} \in R_{1} \left( {j,s} \right)}} {\left( {{\mathbf{y}}_{i} - {\hat{\mathbf{c}}}_{1} } \right)^{2} } + \sum\limits_{{{\mathbf{r}}_{i} \in R_{2} \left( {j,s} \right)}} {\left( {{\mathbf{y}}_{i} - {\hat{\mathbf{c}}}_{2} } \right)^{2} } } \right] $$
(12)
$$ T_{1} \left( {j,s} \right) = \left\{ {{\mathbf{r}}\left| {{\mathbf{r}}^{j} \le s} \right.} \right\} $$
(13)
$$ T_{2} \left( {j,s} \right) = \left\{ {{\mathbf{r}}\left| {{\mathbf{r}}^{j} > s} \right.} \right\} $$
(14)
$$ {\hat{\mathbf{c}}}_{1} = \frac{1}{{\left| {T_{1} } \right|}}\sum\limits_{{{\mathbf{r}}_{i} \in T_{1} \left( {j,s} \right)}} {{\mathbf{y}}_{i} } $$
(15)
$$ {\hat{\mathbf{c}}}_{2} = \frac{1}{{\left| {T_{2} } \right|}}\sum\limits_{{{\mathbf{r}}_{i} \in T_{2} \left( {j,s} \right)}} {{\mathbf{y}}_{i} } $$
(16)

where T1 and T2 define the two divided areas that can be obtained by the Eq. (12), which aims to find the j and s with minimum sum values of squared errors. c1 and c2 present the fixed output values in the two divided areas, corresponding to the sample average. Consequently, the establishment of a decision tree regression can be described as the following specific steps:

  • Step 1 Input the datasets D and obtain an initial area;

  • Step 2 Traverse all the features in the current area and select the minimum value s of a jth feature as the cutting point through the process from Eqs. (12)–(16);

  • Step 3 Divide the current area into two subareas T1 and T2 by using the optimal segmentation variable j and segmentation point s;

  • Step 4 Determine the corresponding outputs (i.e., sample sets) of each area T;

  • Step 5 Repeat Step 2 to 4 for each T respectively, until the stop conditions.

  • Step 6 Divide the initial area into M subareas as T1, T2, …, TM, and obtain a decision tree.

Therefore, the decision tree regression can provide the affine function from the feature vector to the outputs (i.e., from the side information of the data to the objective results). Considering the DRO model in Sect. 4.1, the construction of its ambiguity sets is based on the scenarios of datasets with only objective results. However, the decision tree regression-based DRO model proposed in this section can deal with the datasets composed of objective results and corresponding side information. The scenarios of the DRO model can be determined through the affine map** from the side information to the objective results, and then the dataset with homologous features can be added into the one scenario. The weight μs of each scenario s refers to the ratio from its sample size to the data size. And the ambiguity sets of the tree regression-based DRO model can be constructed as follows:

$$ Z_{s} = \left\{ {{\varvec{d}}_{s} \in \left[ {\underline{{\varvec{d}}} \left( s \right),\overline{{\varvec{d}}} \left( s \right)} \right]\begin{array}{*{20}c} {} \\ \end{array} \left| {\begin{array}{*{20}c} {} \\ \end{array} \left( {{\varvec{d}} - {\hat{\varvec{d}}}_{s} } \right)^{2} } \right. \le \tau } \right\} $$
(17)
$$ E\left( {{\varvec{d}}_{s} } \right) = e_{s} $$
(18)
$$ E\left( \tau \right) = \varphi_{s} $$
(19)

where E(ds) represents the expected demand, E(τ) denotes the expected precision of the demand. \(\underline{{\varvec{d}}} \left( s \right)\) and \(\overline{{\varvec{d}}} \left( s \right)\) is lower and upper bound of each scenario. e(s) and φ(s) present the mean and variance of each scenario s.

4.2 Branch-and-price

4.2.1 Arc-flow model

Based on the optimal reallocation schedules generated by ML-DRO model in Sect. 4.1, the branch-and-price algorithm is utilized to determine the delivery routes for bikes to be assigned to multiple locations with the expected number of bikes. Considering the on-demand deliveries with time constraints, a vehicle routing problem with time windows is formulated in this section for determining the best allocated orders and finding the optimal routings with minimum transportation cost. Given a graph G = (V, A) in the transportation network, V denotes the set of a depot 0 and a number of demand nodes J, where J = V\0. A represents the set of arcs in the graph G. Table 3 shows specific definitions of the arc-flow model.

Table 3 Notations and definitions in the arc-flow model

Formulation of the optimal delivery network with time windows can represented as a following mixed integer programming (MIP) model, where the objective of minimum transportation cost is shown in Eq. (20). Constraints (33)(37) denote the route constraints, time constraints, capacity constraints and binary constraints, separately.

$$ \min \sum\limits_{k \in K} {\sum\limits_{m,n \in V,m \ne n} {c_{mn} \cdot y_{mn}^{k} } } $$
(20)

Route constraints:

$$ \sum\limits_{n \in J} {y_{0n}^{k} } = 1,\forall k \in K $$
(21)
$$ \sum\limits_{n \in J} {y_{n0}^{k} } = 1,\forall k \in K $$
(22)
$$ \sum\limits_{m \in V} {\sum\limits_{k \in K} {y_{mn}^{k} } } = 1,\forall n \in J,m \ne n $$
(23)
$$ \sum\limits_{n \in J} {y_{mn}^{k} } - \sum\limits_{n \in J} {y_{nm}^{k} } = 0,\forall m \in V,m \ne n,k \in K $$
(24)
$$ \sum\limits_{m,n \in R,m \ne n} {y_{mn}^{k} } \le \left| R \right| - 1,\forall R \subseteq J,R \ne \emptyset ,k \in K $$
(25)

Constraint (21) and (22) ensure that each truck k should depart from the depot 0 to visit node n, while return to the depot after service. Constraint (23) denotes that each node n can just be visited once by one truck k. Constraint (24) guarantees that the truck k should leave after visiting node j. Constraint (25) eliminates the subtours in the path served by truck k.

Time constraints:

$$ r_{m}^{k} + t_{mn} - r_{n}^{k} \le \left( {1 - y_{mn}^{k} } \right) \cdot M,\forall m,n \in V,m \ne n,k \in K $$
(26)
$$ e_{m} \le r_{m}^{k} \le l_{m} ,\forall m \in V,k \in K $$
(27)

Constraint (26) ensures the arrival of node n by truck k departure from node m, where M denotes a very large number. Constraint (27) presents that the arrival time at node m by truck k should between the earliest and latest time window of that node.

Capacity constraints:

$$ \sum\limits_{m,n \in V,m \ne n} {y_{mn}^{k} \cdot t_{mn} } \le T,\forall k \in K $$
(28)
$$ \sum\limits_{m \in J,n \in V,m \ne n} {d_{m} \cdot y_{mn}^{k} } \le Q^{\prime},\forall k \in K $$
(29)

Constraint (28) implies that the total time spent in visiting the nodes must be no more than the maximum enroute time of truck k. Constraint (29) stipulates that the total demand of visited nodes should never exceed the transport capacity of each truck k.

Binary constraints:

$$ y_{0n}^{k} \in \left\{ {0,1} \right\},\forall n \in J,k \in K $$
(30)
$$ y_{n0}^{k} \in \left\{ {0,1} \right\},\forall n \in J,k \in K $$
(31)
$$ y_{mn}^{k} \in \left\{ {0,1} \right\},\forall m,n \in V,m \ne n,k \in K $$
(32)

4.2.2 Column generation

As for the formulated arc-flow model generated based on the proposed problem, the column generation algorithm was demonstrated to be an effective solution approach based on the DW decomposition theory (Liu et al., 2018; Sattrawut et al., 2016). The column generation firstly relaxes the integer constraints in the master problem (MP) as a linear master programming problem, then considers just a partial of variables in the MP and obtains the optimal solution by dealing with the restricted master problem (RMP). A dual RMP and a pricing subproblem (Gendreau et al., 2016; Wang et al., 2021) can be used to add the remaining variables into the RMP and find the optimal solution in each iteration until that there is no variable to be added. Therefore, the optimal solution of the RMP will be updated and finally can also be treated as the best result of the MP. The MP can be represented by the path-flow model (i.e., set-covering model). The MP can be presented as follows:

Let δk denote whether the kth path served by truck k is selected. αjk defines whether the node j has been visited in the path k. Ck is the total length of the kpath. Φk presents the set of feasible routes in the formulation. So, the path-flow (i.e., set-covering model) can be formulated as follows.

$$ \mathop {\min }\limits_{{\delta_{k} \in \Phi }} \begin{array}{*{20}c} {} \\ \end{array} C_{k} \cdot \delta_{k} $$
(33)

Subject to:

$$ \sum\limits_{{\delta_{k} \in \Phi }} {\alpha_{j}^{k} \cdot \delta_{k} } \ge 1,\forall j \in J $$
(34)
$$ \sum\limits_{{\delta_{k} \in \Phi }} {\delta_{k} } \le \overline{K} $$
(35)
$$ \delta_{k} \in \left\{ {0,1} \right\},\forall \delta_{k} \in \Phi $$
(36)

where the objective (33) minimizes the total length of all routes in the network. Constraint (34) implies that each node j should be visited at least once. Constraint (35) ensures that the total number of routes should be no more than the maximum number of trucks.

Based on the master problem (MP) stated above, a linear relaxing process of the MP model is adopted in this section and a linear programming (LMP) model can be obtained by adding the constraint (37) to replace the constraint (36) as follows:

$$ \delta_{k} \ge {0},\forall \delta_{k} \in \Phi $$
(37)

Then, suppose Φ1 is a subset of Φ, and the restricted linear programming (RLMP) model can be formulated as followings:

$$ \mathop {\min }\limits_{{\delta_{k} \in \Phi_{1} }} \begin{array}{*{20}c} {} \\ \end{array} C_{k} \cdot \delta_{k} $$
(38)

Subject to:

$$ \sum\limits_{{\delta_{k} \in \Phi_{1} }} {\alpha_{j}^{k} \cdot \delta_{k} } \ge 1,\forall j \in J $$
(39)
$$ \sum\limits_{{\delta_{k} \in \Phi_{1} }} {\delta_{k} } \le \overline{K} $$
(40)
$$ \delta_{k} \ge 0,\forall \delta_{k} \in \Phi_{1} $$
(41)

Obviously, the dual problem (DP) of the RLMIP can be represented as follows:

$$ \max \begin{array}{*{20}c} {} \\ \end{array} \sum\limits_{j \in J} {\lambda_{j} } { + }\overline{K} \cdot \lambda_{0} $$
(42)

Subject to:

$$ \sum\limits_{j \in J} {\alpha_{j}^{k} \cdot \lambda_{j} } + \lambda_{0} \le C_{k} $$
(43)
$$ \lambda_{j} \ge 0,\forall j \in J $$
(44)
$$ \lambda_{0} \ge 0 $$
(45)

where λj and λ0 denote the dual variables of constraint (39) and (40), separately. Also, the reduced cost σ can be expressed as followings:

$$ \sigma = C_{k} - \sum\limits_{j \in J} {\alpha_{j}^{k} \cdot \lambda_{j}^{ * } } + \lambda_{0}^{ * } < 0 $$
(46)

where λ*j and λ*0 denote the dual variable results of DP in each iteration.

Due to the path-flow model, the pricing problem can be set as an elementary shortest path problem with time window constraints (ESPPTC), which can be solved by a label setting algorithm based on dynamic programming (Luo et al., 2017; Reihaneh & Ghoniem, 2019). Dijkstra algorithm is a shortest path approach based on greedy strategy (Liu et al., 2020), which aims to find the current optimal solutions in each iteration. During the iteration, each node can be set with a series of candidate temporary labels that record the current possible shortest routes and the previous nodes, separately. While the minimum temporary label of each node can be extracted from the candidates and exchanged as the permanent label, which records the current shortest path and can be seen as the current optimal solution.

Considering both the cost and time window constraints in the formulations, the Dijkstra algorithm used in this section tries to find the shortest path for each node and provides the candidate solutions to be added in the RLMP. In the graph of arc-flow model, let Tjk and Cjk denote the total time and cost spent from depot 0 to node j in the kth path, separately. Each node j will be set with a label of (Tjk, Cjk) that can be calculated and updated as followings:

$$ T_{{0}}^{k} = 0,\forall k \in K $$
(47)
$$ C_{{0}}^{k} = 0,\forall k \in K $$
(48)
$$ T_{j}^{k} = \max \left\{ {e_{j} ,T_{j - 1}^{k} + t_{{j - 1\begin{array}{*{20}c} {} \\ \end{array} j}} } \right\},\forall j \in J,k \in K $$
(49)
$$ C_{j}^{k} = C_{j - 1}^{k} + c_{{j - 1\begin{array}{*{20}c} {} \\ \end{array} j}} ,\forall j \in J,k \in K $$
(50)

where Eqs. (47) and (48) present the initial state at the depot. Equation (49) guarantees that the updated Tjk should be no earlier than ej, which is the earliest time window of node j. Furthermore, in order to reduce the calculative time complexity, a pareto dominating rule is used to select the most effective path at node j with the updated label (Rabbani et al., 2018a, 2018b). For example, suppose there exist two routes named route 1 (R1) and route 2 (R2), both of which have visited node j with labels (Tj1, Cj1) and (Tj2, Cj2), separately. The dominating rule can be defined as if and only if Tj1 ≥ Tj2, Cj1 ≥ Cj2, we can say that R2 dominates R1, and R1 will be deleted as the invalid route. In addition, for each node j, let Ω defines the set of permanent labels obtained, Π is the accumulation set of treated permanent labels, and Ρ denotes the set of candidate labels. The label setting algorithm can be shown in Algorithm 1.

figure a

4.2.3 Branch-and-price algorithm

The branch-and-price algorithm can be defined as the combination of column generation, pricing problem and branch and bound (Li et al., 2019; Wang et al., 2021). The generation column process provides the optimal candidate solutions by solving a LMP, and the solutions can be treated as the lower bounds of the branch and bound in the iterations. While dealing with the LMP, the generation of candidate solutions can be seen as a ESPPTC with label setting. Furthermore, the branch and bound has established a linked tree to generate various feasible LMPs in each iteration and a Breadth-First-Search (BFS) strategy is adopted for finding out the optimal solutions in some orders (Hernandez et al., 2016; Li et al., 2020; Tilk et al., 2018). Consequently, the branch and price used in this paper can be specifically represented as Algorithm 2.

figure b

5 Case analysis

5.1 Algorithm comparison and analysis

The predicted results generated by the robust optimization process will provide the expected demands for each location that should be satisfied in the next delivery routing optimization solved by a branch-and-price algorithm. To test the performance of branch-and-price shown in Sect. 4.2, an algorithm comparison among the branch-and-price (BP) algorithm, particle swarm optimization (PSO) algorithm (Ding et al., 2018), tabu search (TS) algorithm (Goeke, 2019), genetic algorithm (GA) (Xue et al., 2021) is introduced in this section. There are 15 datasets of instances collected from the “VRPTW instances” of the NEO groupFootnote 1 that have been used in recent operations researches (Wen et al., 2010). Characteristics of the instances can be shown in Table 4, where each instance consists of the number of locations (No. of locations) with various demands, the number of experimental datasets (No. of datasets), and the side information with different levels of service time as Side 1, 2 and 3.

Table 4 Description of instance

Based on the different scales of instances shown in Table 4, the BP algorithm is compared with other three algorithms to demonstrate its effectiveness in solving the instances with limited locations. Parameters used in the comparison can be set as follows: the capacity of each truck is 100 in the optimized network, for which the maximum planning enroute time T is 80 unites. Unit operational cost of each truck is 30, respectively, while the unit travel cost is 0.5. For each algorithm, the objective (Obj) of minimum transportation cost and the computational times (CT) of each instance can be obtained. The algorithms are performed by Python 3.6 and on a laptop with an Intel(R) Core (TM) i5-10210U 2.11 GHz CPU and 16.0 GB RAM. All the algorithms will be executed 10 times for finding the optimal solutions. The calculated results of 15 instances for the four algorithms are shown in Table 5.

Table 5 Result comparison of the four algorithms

In Table 5, the calculated results of the t-test and p-value demonstrate the significant difference among our proposed branch-and-price algorithm and the other adopted PSO, TS and GA methodologies. The result comparison of the four approaches can be effectively summarized as the followings. To minimize the transportation cost, the branch and price algorithm outperforms than the other three methods in the fifteen cases. For example, the average Objective values of branch and price algorithm is 145.39, which is lower than that of PSO, TS and GA methodology as 153.20, 155.93 and 158.86. Moreover, it can be obviously seen that the branch and price algorithm is superior to others in terms of minimum computational times due to the fact that its average value is 1.04 s, which is minimum compared with 9.24 s, 9.14 s and 9.30 s of other algorithms respectively. Therefore, the branch and price algorithm used in our study performs better than other introduced PSO, TS and GA approaches to find out the best solutions for the proposed network optimization with sharing bikes.

5.2 Date source

In order to demonstrate the effectiveness and applicability of our proposed models and algorithms, a case study of a real transportation network in a major city is analyzed in this section. Figure 3 shows the distribution of the network, which composed of a depot with a number of sharing vehicles and ten positions (P1, P2, …, P10) to be allocated. Those positions were extracted among quantities of areas to be the strongest demanding locations for sharing vehicles. A series of trucks can be used to transport the sharing vehicles from the depot to the positions, While the demand of each position is largely uncertain and unknown. This paper uses the datasets, “Big data of urban management”, from “2021 Digital China Innovation Contest”.Footnote 2 The specific characteristics of the datasets collected in the network can be shown in Table 6.

Fig. 3
figure 3

Spatial distribution of the depot and allocated positions

Table 6 Characteristics of the datasets

In Table 6, there are a total of 170 datasets, including the demands of the ten positions, and the side information as weekday (W-day), weekend (W-end), morning peak (MP), evening peak (EP), weather, extreme weather (Extreme), and emergency, all of which can have an impact on the demand of sharing vehicles for each position. Specifically, the values of the “W-day” range from 1 to 5 and represents Monday to Friday. The sets {0, 1, 2} of “W-end” define the weekday, Saturday and Sunday, separately. Additionally, if the dataset belongs to a “MP” or “EP”, the value will be set as 1, if not, that is set 0. The weather can be divided into three categories as sunny, foggy and rainy, and valued as {1, 2, 3}. Similarly, the set {0, 1} describes whether the dataset belongs to a “Extreme” or “Emergency”. If so, the value will be set as 1, if not, that is set 0. In this paper, we consider 120 datasets as the training sets and the remaining 50 datasets as the testing sets. The former can be used in the optimization process to find the optimal expected solutions. While the latter can be utilized to test the performance of proposed models and algorithms, and reflect the difference between expected plans and the real ones. Figure 4 shows the distribution of practical demand surges in the 50 testing sets as follows:

Fig. 4
figure 4

Distribution of demand surges in real network

In Fig. 4, the demand range of P1 achieves the minimum value, then P10, P6 and P9 have the second minimum demand ranges. While for the other positions, the ranges of demand surges change in a larger extent, which have been more than the mean values. Similarly, the demand surge with 25 to 75 percentages is in a smaller fluctuation at P1, while achieves the maximum fluctuation at P2. Additionally, the median line can be seen closed to the mean value in P1, P6 and P8, where the distribution of demand surges is relatively centralized. The mean value of the demand surges in each position is {34, 39, 35, 25, 34, 33, 29, 28, 26, 23}, which can be utilized in the comparison with expected demands obtained by the proposed models.

5.3 Reallocation schedules of bike-sharing system

Based on the datasets shown above and the robust optimization models in Sect. 4, the expected demands of each position with minimum operational cost will be obtained and provides the demand constraints for the VRPTW to find the optimal routings with minimum transportation cost. In this section, another two optimization models based on data are utilized to test the performance of our data-driven models. The sample average approximation (SAA) model refers to represent random variables with sample data sets, and the random programming problems can be transformed into deterministic problems (Cao et al., 2020). The sample robust (SR) model considers the robust stochastic model with a scenario-tree-based linear optimization (Bertsimas et al., 2019). Considering the demand uncertainty with wide information, four approaches as SAA, SR, DRO and ML-DRO models are used in this section to determine the expected demands for strong positions with minimum operational costs. Relative parameters utilized in this section are set as follows: the capacity of vehicles in the depot is 200, fixed cost for each position to allocate a vehicle is {2.0, 2.4, 5.0, 2.5, 3.2, 2.7, 2.8, 3.0, 4.0, 4.5}, the unit revenue of the positions is {6.0, 5.0, 5.8, 5.2, 7.0, 5.6, 5.0, 5.3, 5.1, 5.0}, and the epsilon of the uncertainty set is 0.20. The models are operated by a Rsome solver (Chen et al., 2020) adopted in Python and the optimal results are shown in Table 7 and Fig. 6, where the objective values are treated as revenues that is the opposite of objective as costs in those models and the running time can be presented as follows:

Table 7 Result comparison of the four approaches

From Table 7 and Fig. 5, it can be seen that the revenue of the SAA model gets the lowest value 389.74 among the four approaches. The revenue of SR and DRO model is close to each other around the value 406. It means that the two models can obtain similar allocation schedules based on the provided data. The ML-DRO model obtains the maximum revenue 555.25 compared with another three approaches, and increased by 42.47%, 36.48% and 36.49%, separately. In addition, the running times of the models are enhanced from 0.36 to 1.37 s of the SAA, SR and DRO approaches, while it is reduced to the minimum value 0.12 s of the ML-DRO approach. It can be seen that the running times of DRO model is larger than that of SR model. However, when considering the machine learning used in DRO model, the running times is reduced to the minimum value and the ML-DRO has been demonstrated its superior performance. Therefore, the ML-DRO model can be selected as the most effective approach for determine the expected demands with maximum revenues and minimum running times. On the other hand, we compare the expected demands obtained by the four models with the demands in real occasions as shown in Fig. 7, where the demands can be seen as the average of the 50 testing datasets.

Fig. 5
figure 5

Result comparison among the four models

As shown in Fig. 6, it is obviously that the distribution of expected demands for SR and DRO models are overlapped and covered with largely similarity. For the positions as P3, P9 and P10, the expected demand for each model is quite different from each other, compared with other positions. Additionally, there exist two coincides between expected and real demand. One is the demand in P1 of ML-DRO model, the other is the demand in P2 of SR and DRO model. Moreover, the expected demand of ML-DRO model is closest to the real ones in P1, P3, P4, P5, P8, P9. While in P2, P6, P7 and P10, expected demand of SR and DRO model has great similarity with real demand. The average of the difference between expected demands and real demands in each model can calculated as {6.2, 6.7, 6.7, 5.3}. Consequently, the expected values generated by the ML-DRO model have the maximum proximity to the reality, and the approach has been demonstrated its best performance in dealing with the demand uncertainty.

Fig. 6
figure 6

Illustration of the demand comparison

5.4 Delivery results by branch-and-price

Based on the expected demands generated by robust optimization shown above, delivery routes to assign sharing bikes from depot to multiple locations with minimum transportation cost can be obtained through the branch-and-price algorithm utilized in this study to improve the operational efficiency.

Additionally, previous studies have provided that there exist three main factors to construct the sustainability of a network, as economic, environment, and social issues simultaneously (Farrokhi-Asl et al., 2020; Rabbani et al., 2018a, 2018b). For the social issue, it has considered in the model proposed in Sect. 4.2, where the constraint (28) that implies the total time spent in a delivery route must be no more than a threshold reflects the reasonable allocation of human resources. For the economic issue, the minimum transportation distances are captured in this study, and the minimum transportation cost can be obtained based on the distances and unit travel cost. Similar to (Yoshinori, 2016; Zhang et al., 2014), the minimum transportation cost has been treated as the objective for a sustainable network. For the environment issue, (Farrokhi-Asl et al., 2020; Rabbani et al., 2018a, 2018b) proposed that the carbon emission objective was closely related to the average loading rate of used transportation resource, and less carbon emissions can promote sustainable development of transportation network. Therefore, the objectives as average loading rate (ALR) and transportation cost (TS) in this section can be calculated to discover the sustainability incorporated in our proposed network.

The parameters used in the branch-and-price algorithm can be listed as follows: the capacity Qʹ of each truck is 100 and 200 in the initial and optimized network, for which the maximum planning enroute time T is 100 unites. Unit operational cost of each truck is 20 and 50, respectively, while the unit travel cost is 0.4 and 0.6. Unit revenue of a satisfied demand is 3 in the original network (Wang et al., 2018). Table 8 shows the result comparison in the initial and optimized network solved by the SAA, SR, DRO and ML-DRO models, where the demand surge (Demand), average loading rate (ALR), operational cost of trucks (OC), transportation cost (TS), the revenue, the profit and the gaps between initial and optimized network can be stated as followings:

Table 8 Result comparison in the network before and after optimization

As shown in Table 8, multiple results of demand, average lading rate, operational cost of trucks and transportation cost in SR and DRO models can be seen with a higher similarity, which indicates that the performance of the two models are equally supervised in dealing the network. The gaps of demand are ranged from 23 to 30 in the four models, where the SR and DRO models achieve the minimum demand gaps to the reality. Moreover, compared with the calculated revenue in the initial network, the revenue of SAA, SR and DRO model is reduced by 336.36, 319.29, 319.30, while the revenue of ML-DRO model achieves the minimum reduced value 170.85. Based on the decreased travel routes of the proposed models, the operational costs are reduced from 340 to 100 in the optimized network. Furthermore, Fig. 7 illustrates the results of transportation cost, average loading rate and profit between the initial and optimal network, which can be shown as follows:

Fig. 7
figure 7

Result comparison in the initial and optimized network

In Fig. 7, the average loading rate of the four proposed models has been increased by 52.00%, 53.80%, 53.80% and 53.30%. Compared with that in the initial network, the gaps of the SR and DRO models achieve the maximum value with increased resource configuration. Also, improved loading rate of transportation resources can reduce the carbon emissions and achieve the environmental objective of a sustainable network. The transportation cost is reduced from 314.8 to 161.1that is the same for all the proposed models, which presents that the transportation efficiency has been enhanced and the reduced cost of the network indicates the economic objective for network sustainability. Although the revenue of the four models is no more than the initial network due to the difference of expected demands, the operational and transportation costs is greatly reduced by the network optimization. Furthermore, the profits of the proposed models are enhanced from 71.3 to 128.64, 145.71, 145.70 and 294.15 in the models, where the profit gap of ML-DRO model obtains the maximum value 222.85. Consequently, the total costs of the optimal network have been reduced, while the optimal delivery routes generated by the branch-and-price algorithm can effectively improve the resource allocation, transportation efficiency and promote the sustainable development of the bike-sharing network.

On the other hand, the optimal routes for visiting the positions can be obtained and the service areas of each truck departure from the depot can be obtained. Also, the optimal transportation cost, operational cost and CPU_Times of the network generated from the robust models separately can be found out and shown in Table 9.

Table 9 Result comparison for the four models

In Table 9, there exist two routes to allocate the sharing vehicles to satisfy all the positions for each model, while the overlaps and crisscross among the service areas are obviously seen with unavailable trips. For example, the first route (i.e., Depot → P7 → P6 → P5 → P2 → Depot) and the second route (i.e., Depot → P10 → P9 → P8 → P4 → P3 → P1 → Depot) for SR model are largely of crisscross, which reduces the transportation efficiency and the truck configuration. However, there exist no overlap and crisscross in the optimal routes for ML-DRO model, where one route (i.e., Depot → P6 → P3 → P2 → P1 → Depot) and the other route (i.e., Depot → P10 → P9 → P8 → P7 → P5 → P4 → Depot) are independent. Therefore, the ML-DRO model can be treated as the most effective model that induces the best resource configuration with optimal demand prediction.

6 Conclusion

Sharing bikes becomes an effective option to create a low-carbon transportation system and better response to the dual-carbon target of China. However, the demand surges of sharing bikes since the pandemic have led to such problems as disorderly parking and uneven distribution of used vehicles. To promote the sustainable development of bike-sharing system with demand surges, a predict-then-optimize method is developed in this study to achieve the network optimization, where the sharing bikes can be pre-allocated to optimize the bike resource allocation and the delivery routes of sharing bikes to multiple locations can be designed to minimize the total transportation cost. The optimal reallocation schedules of bikes through a data-driven DRO model can provide the expected number of bikes assigned to multiple locations. Having the predicted demand of sharing bikes for each location in the bike-sharing network, a branch-and-price algorithm is introduced to find out the best routes to deliver the bikes with minimum operational cost and improved transportation efficiency. Specifically, a data-driven study of a realistic bike-sharing network in a major city in China is implemented to verify the effectiveness of our proposed methodologies in optimizing the bike-sharing system.

The calculated results show that the predicted vehicle demands with side information are clearly close to the real data sets through the data-driven robust optimization models, among which the ML-DRO model obtains the maximum operational revenue value 555.25, compared with the SAA, SR, DRO models as 389.74, 406.81, 406.80. In addition, the result comparison in the network before and after optimization shows that the transportation cost is reduced from 314.8 to 161, and the average loading rate of the four proposed models is increased by 52.00%, 53.80%, 53.80% and 53.30%. Moreover, compared with the SAA model, the optimization results through the branch and price algorithm are of robust stability among the three types of data-driven robust models, due to the fact that their variances of transportation cost, number of travel routes and the CPU_Times keep a serious minimum value. Therefore, the data-driven robust optimization models and the branch-and-price algorithm leveraged in the bike-sharing system optimization show their effectiveness to achieve the reduced operational cost and optimal resource configuration.

Additionally, a realistic transportation network tests the performance of proposed data-driven method, and the computation results demonstrate its applicability and effectiveness in optimizing the bike-sharing system with enhanced operational efficiency. On the one hand, the demand prediction and reallocation of sharing bikes in multiple positions can reduce the unbalance of vehicle distribution and maximize the utilization of transportation resource. The optimal reallocated strategies derived from a data-driven robust optimization model can obtain the demand surplus of each position and determine the balanced vehicle demand in a whole planning horizon with minimum operational cost. On the other hand, the optimal transportation schedules generated by an exact branch and price algorithm to deliver sharing bikes to specific positions can promote the resource configuration and improve the transportation efficiency.

The reallocation strategies and transportation schedules in the optimized sharing-bike system can provide a reference for urban operational management and facilitate the sustainable development of smart cities. As the rapid development of sharing economy, information platforms and artificial intelligent technologies, the supply and demand of the cities will be increasingly diversified, which could bring new challenges for the city operation. Consequently, effective resource configuration strategies and transportation network schedules need to be further discussed by operators to utilize the best utility of sharing economy and achieve the sustainable development of urban transportation.

Nonetheless, there exist few topics in this field that should be considered in the future work. (1) The unbalanced demand of sharing vehicles can be pre-allocated in a multi-depot transportation network with improved resource coordination. (2) The simultaneous pickup and delivery routings can be studied in the schedules of sharing bikes in a more complex transportation network. (3) The hybrid approached that combines the exact and heuristic algorithms should be considered for improving the solution quality for the network optimization problems. (4) The predict-then-optimize network can be further explored in the empirical studies with big data for constructing a sustainable operational management.