Introduction

Driven by the development strategy of China, the industrialization of electric vehicles (EVs) is accelerating gradually. As the basic accessory facility of electric vehicles, the charging facility influences and restricts the application of electric vehicles. At the end of 2019, China has more than 3.81 million electric vehicles, and 1.22 million public charging piles have been built [1]. However, while the number of recharging infrastructures is increasing steadily, according to the data, many of the charging piles have a low usage rate. While the functions of charging piles and petrol stations are similar, the distribution is more fragmented, so that some areas have fewer available than demanded and some areas may be oversupplied and, therefore, do not strike a balance in terms of effective utilization [2]. As the infrastructure of electric vehicles, charging piles greatly influence the purchase intention of owners. Therefore, the layout optimization of charging stations is very important, and some important studies have been conducted in the past few years [3,4,5].

To make the layout of charging stations more realistic, many factors need to be taken into account, including the construction and operation cost of charging stations, the impact of charging stations on traffic flow, range anxiety [6], route selection and charging preferences, and grid load [7]. Traditional site selection research regarding charging stations is divided into two categories: the point demand model and the flow demand model. The point demand model usually assumes that the demand at the supply station is generated at certain nodes of the network, with the minimum total distance between the demand point and the supply station as the optimal target. There are four basic point-based location models: p-median problem [8], p-center problem [9], coverage problem [10], and fixed cost problem [11]. The service demand in the flow demand model is no longer generated on the nodes in the network but instead uses the traffic flow on the road section, and the optimization goal is to meet the largest number of customers. The model of flow demand is divided into five types: the intercepting address model [12], the re-routing model [13], the finite capacity continuous navigation address model [14], the interception model considering the service radius [15], and the new improved intercepting model. However, none of these studies took into account the interaction between charging stations and transportation networks.

Later, some scholars added the problem of traffic flow distribution into the planning of charging station layout, and scholars at home and abroad have conducted in-depth studies on the planning of charging stations from different perspectives. Some scholars aim at maximizing the social welfare of the network, taking into account the utility of the transportation network and the power supply network, optimizing the layout of the established number of charging stations [16]. Jiang described the problem of the balanced distribution of electric vehicle traffic flow as a traffic distribution problem with distance constraints on the basis of consideration of the limit of the continuous range of electric vehicles and presented mathematical planning models and algorithms for solving them [17]. Xu et al. established a compact mixed-integer nonlinear programming model to determine the optimal locations of EV charging stations in a network under a limited budget that minimize the accumulated range anxiety of concerned travelers over the entire trips [18]. Aiming at maximizing the traffic flow, Raffaele et al. establishes a programming model of electric vehicle charging station based on stochastic user equilibrium theory [19]. Considering the distance limitation of EV, Zheng et al. established a two-layer model for charging station location, and transformed the two-layer nonlinear problem into a single-layer mixed-integer linear program [20]. Wang et al. established an expanded network structure to model the set of valid charging strategies for EV drivers, and then a variational inequality is formulated to capture the equilibrated route choice and charging behaviors of EVs [21]. However, these models only consider the influence of time on the impedance function of the road section. They do not reflect the difference between the impedance function of the electric vehicle and the fuel vehicle in the road section, nor do they consider the influence of the charging behavior along the road on the distribution of traffic flow.

In addition, previous studies lacked the study on the risk preference of EV users, and did not add bounded rationality to travelers' travel choice and charging choice behavior. Conventional models of dynamic traffic distribution generally assume that the traveler is fully rational and follows the expected utility hypothesis, following the dynamic path selection according to the principle of maximum utility. However, this assumption is unrealistic in most transport networks, and several behavioral-economics experiments have challenged both perfectly rational assumptions and the expected utility hypothesis. Psychological and behavioral science studies have shown that people's decision-making behavior is characterized by bounded rationality under uncertain conditions. Yang studies the bounded rationality of EV users' travel choices. Based on the cumulative prospect theory, the bounded rationality of users is considered in the choice of travel mode, departure time and travel path [22]. Based on the accumulation prospect theory, Liu has established a model to analyze the departure time selection, time interval weight renewal, path selection and route time distribution update [23]. Jia proposed a set of bounded rationality rules to describe the path selection rules of traffic systems with different information supply strategies in view of the different cognitive limitations of individual travelers [24]. Therefore, it is necessary to incorporate the cumulative prospect theory into the choice behavior of electric vehicle users.

Based on the hybrid transportation network of fuel vehicle and electric vehicle, this paper deeply studies the selection process and decision-making psychology of traveler’s travel behavior and charging behavior under bounded rationality, and the influence of route selection and departure time selection on charging station location is analyzed. Different from previous studies, this paper depicts the departure time choice and dynamic route choice of all travelers under the condition of bounded rationality from the micro-dynamic perspective, at the same time, the charging behavior of EV users and the full-empty state of the charging station are considered. It describes the interaction among traveler, traffic flow and charging station, and provides decision support for location and capacity determination of charging station.

The structure of the article is as follows. In Sect. 2, we present the basic assumptions of the model, set the reference points for path selection and departure time selection, and worked out the path prospect and departure time prospect for fuel vehicles and electric vehicles, respectively. In Sect. 3, based on the cumulative prospect theory, the bi-level programming model is established and the algorithm is designed by combining the dynamic traffic flow assignment with the layout of charging stations. In Sect. 4, the validity and practicality of the proposed model and algorithm are verified by an example simulation, and the optimal charging station distribution scheme under different electric vehicle ratio conditions in the network is presented. The behavior characteristics of the choice of path and departure time of the electric vehicle after entering the road network are analyzed. In Sect. 5, we make some concluding remarks and present the implications.

Model assumptions and definitions

Transport networks and travelers’ assumptions

The assumptions made in this paper are as follows:

  1. (1)

    There are two types of travelers in the network, fuel vehicles and electric vehicles. Based on the cumulative prospect theory, these two types of travelers choose paths according to their perception of path impedance. To simplify the calculation, it is assumed that the electric consumption of electric vehicle is linear with the driving distance.

  2. (2)

    Considering the capacity limit of charging station, when the number of vehicles waiting for charging is more than the number of charging piles, vehicles need to wait. If the number of waiting vehicles exceeds the space limit, the charge is abandoned. According to the charging data on the official websites of various electric vehicles, it takes an average of 30 min to charge 80% of the battery in the quick-charging mode, and about an hour to fully charge. To protect the battery life, when the battery power reaches 80%, charging post will reduce the charging speed, so most people will choose to charge only 30 min. Therefore, it is assumed that the fast charge time of EV is a random variable with normal distribution, and the type of EV is not considered in this paper.

  3. (3)

    The layout of the charging pile does not consider the limitation of the conditions of use, and the alternative area for the construction of the charging station is each node in the network.

  4. (4)

    According to the assumptions of prospect theory and stochastic user equilibrium model, the traveler has the ability to remember the path impedance (travel time) and form his/her travel experience accordingly. As the activity is repeated, the traveler will constantly update his/her perception of different paths and choose the path accordingly [25].

Symbol definition and associated constraints

In this paper, we establish a graph \(G=(N,A)\) to denote a traffic network, where \(N\) is a node set; \(A\) is a set of segments; \(a\) is a road section, \(a\in A\); \(W\) is a set of origin–destination (O–D) pairs in a network, and \(w\) is an O–D pair in \(W\); \({R}_{w}\) is the path set between OD and \(W\), and \(r\) is one of the paths,\(r\in {R}_{w}\); there are two kinds of travelers in the network, the fuel vehicle and the electric vehicle, which are \(\mathrm{c}\) and \(\mathrm{e}\), respectively, and the vehicle type set is \(B=\left\{b|c,e\right\}\)

In this paper, we consider the time period [0, T]. So that all the travelers can complete the journey in this time period, \({v}_{a}^{b}(t)\) is the flow of time \(t\) on road section \(a\), and \({u}_{a}^{b}(t)\) is the inflow of time \(t\) into road section \(a\); \({x}_{a}^{b}(t)\) is the outflow of time \(t\) away from road section \(a\). For ease of calculation, the time period needs to be discretized, so [0, T] is divided into \(m\) equal time slices. The length of each time slice is \(\tau \), and that is \(T=\tau m\).

\({T}_{a}\left(d,t\right)\) is the travel time of vehicles on road section \(a\) at time \(t\) on day \(d\). \({T}_{w}^{rc}\left(d,t\right)\) is the travel time of fuel vehicle on path \(r\) at time \(t\) on day \(d\), which is a random variable. \({T}_{w}^{re}(d,t)\) is the total time of electric vehicles choosing path \(r\) at time \(t\) on day \(d\), which is a random variable, including the travel time, charging time and waiting time. Let, \(E\left[{T}_{a}\left(d,t\right)\right]={t}_{a}\left(d,t\right)\),\(Var\left[{T}_{a}\left(d,t\right)\right]={\left({\sigma }_{a}\left(d,t\right)\right)}^{2}\), moreover,\(E\left[{T}_{w}^{rc}\left(d,t\right)\right]={t}_{w}^{rc}\left(d,t\right)\),\(Var\left[{T}_{w}^{rc}\left(d,t\right)\right]={\left({\sigma }_{w}^{rc}\left(d,t\right)\right)}^{2}\), \(E\left[{T}_{w}^{re}(d,t)\right]={t}_{w}^{re}\left(d,t\right)\), \(Var\left[{T}_{w}^{re}(d,t)\right]={({\sigma }_{w}^{re}\left(d,t\right))}^{2}\). Based on the above description, the following relationships can be formulated as below:

The traffic conservation constraints can be formulated as

$${u}_{a}^{b}\left(t\right)=\sum_{w}\sum_{r}\sum_{b}{u}_{ar}^{wb}\left(t\right),t\in \left[0,T\right],\forall a\in A,w\in W$$
(2.1)
$${x}_{a}^{b}\left(t\right)=\sum_{w}\sum_{r}\sum_{b}{x}_{ar}^{wb}\left(t\right),t\in \left[0,T\right],\forall a\in A,w\in W$$
(2.2)
$${v}_{a}^{b}\left(t\right)=\sum_{w}\sum_{r}\sum_{b}{v}_{ar}^{wb}\left(t\right),t\in \left[0,T\right],\forall a\in A,w\in W$$
(2.3)

\({u}_{ar}^{wb}\left(t\right)\), \({x}_{ar}^{wb}\left(t\right)\), and \({v}_{ar}^{wb}\left(t\right)\) denote the inflow, outflow and flow of b-type vehicles on road section \(a\) of the path \(r\) at time \(t\), respectively.

Non-negative constraints

$${u}_{a}^{b}\left(t\right)\ge 0,{ x}_{a}^{b}\left(t\right)\ge 0, {v}_{a}^{b}\left(t\right)\ge 0,\forall a\in A.$$
(2.4)

The state equation of the road section

$$\frac{d{v}_{a}^{b}\left(t\right)}{dt}={u}_{a}^{b}\left(t\right)-{x}_{a}^{b}\left(t\right),\forall a\in A.$$
(2.5)

The propagation of traffic flow

$${\int }_{0}^{t}{u}_{ar}^{wb}\left(t\right)dt={\int }_{0}^{t+{t}_{a}\left(d,t\right)}{x}_{ar}^{wb}\left(t\right)dt, \forall a\in A.$$
(2.6)

Formulas (2.5) and (2.6) show that both \({x}_{a}^{b}\left(t\right)\) and \({v}_{a}^{b}\left(t\right)\) can be represented by \({u}_{a}^{b}\left(t\right)\). In addition, during a certain period of time, vehicles entering any part of the road cannot leave the section at the same time. And the inflow of link a at time \(t^{\prime}(t^{\prime} \in [t_{1} ,t_{1} , \cdots ,t_{m} ])\) can be represented as

$$ u_{a} (t^{\prime}) = \sum\nolimits_{w} {\sum\nolimits_{r} {\sum\nolimits_{t} {\upsilon _{a}^{b} (t) \cdot \varpi _{{a,r,t}}^{w} (t^{\prime})} } } $$
(2.7)

where \({{\varpi }}_{a,r,t}^{w}(t^{\prime})\) is the 0–1 variable which represents the relationship between link a and route r, if the travelers who depart from origin at time t are able to reach link a at time \(t^{\prime}\), then \({{\varpi }}_{a,r,t}^{w}\left({t}^{^{\prime}}\right)=1\), else \({{\varpi }}_{a,r,t}^{w}\left({t}^{^{\prime}}\right)=0\).

It is assumed that the travel time of the path follows a normal distribution at any time:

$${T}_{w}^{rc}\left(d,t\right)\sim N\left({t}_{w}^{rc}\left(d,t\right),{\left({\sigma }_{w}^{rc}\left(d,t\right)\right)}^{2}\right),\forall r\in {R}_{w}.$$
(2.8)
$${T}_{w}^{re}\left(d,t\right)\sim N\left({t}_{w}^{re}\left(d,t\right),{\left({\sigma }_{w}^{re}\left(d,t\right)\right)}^{2}\right),\forall r\in {R}_{w}.$$
(2.9)

The link travel time is mainly affected by traffic flow, so the average link travel time function is assumed to be the BPR (Bureau of Public Road) function:

$${t}_{a}\left(d,t\right)={t}_{a}^{0}\left[1+0.15{\left(\frac{{u}_{a}\left(\mathrm{t}\right)}{{L}_{a}}\right)}^{4}\right].$$
(2.10)

where \({L}_{a}\) is the capacity of a road section \(a\), \({t}_{a}^{0}\) is the zero-flow time of road section \(a\).

Reference points for travel path and departure time selection

The accumulation prospect theory assumes that the risk of the decision-making process is divided into two processes: editing and evaluation. At the editing stage, the traveler sets a reference point for the current road network's perception and edits the results that may occur for decision-making to the benefit or loss of the reference point. In the evaluation stage, the traveler relies on the value function to evaluate the loss and gain and judges the information with the weight function of the subjective probability.

When choosing a route, the traveler not only considers the length of the trip but also prefers to choose the path with less time fluctuation, that is, to consider the reliability of travel. So, in this paper, the travel time budget is set as the reference point of the travel path selection.

When the traveler selects both the departure time and the travel path, the reference point is set to the following: the traveler gets the benefit when he/she arrives at the destination after \({T}_{e}\) and before \({T}_{a}\); the benefit is the highest when one arrives at \({T}_{o}\); and to arrive before \({T}_{e}\) or after \({T}_{a}\) will be lost. Thus, \({T}_{e}\), \({T}_{o}\) and \({T}_{a}\) represent the reference points for departure time, and the traveler who leaves at any moment always wants the path he/she chooses to reach at time \({T}_{o}\). Therefore, \({T}_{o}\) represents the reference point for the route choice (see Fig. 1).

Fig. 1
figure 1

The value function of the reach time of the traveler

Path prospects

In real life, in most cases, the traveler's perception of the subtle difference in the utility of travel is not obvious, so the discrete distribution of utility can be used to fit the continuous distribution, as follows:

  1. (1)

    The confidence interval \(({I}_{o},{I}_{r})\) of the continuous distribution of travel time \({t+T}_{w}^{rb}(d,t)\) is divided evenly, and the confidence level is \(\vartheta \mathrm{\%}\). where \({T}_{w}^{rb}\left(d,t\right)\) is the total travel time of b-type vehicles on path \(r\) at time \(t\) on day \(d\).

  2. (2)

    Take the median value of each of the equal segments, that is, \(\mathrm{t}+{T}_{w}^{rb}\left(d,t\right)=({t+T}_{w,-m}^{rb}\left(d,t\right),\cdots \mathrm{t}+{T}_{w,n}^{rb}(d,t))\). The probability distribution value of these segments is the probability of the median value, that is, \({P}_{w}^{rb}\left(d,t\right)=({P}_{w,-m}^{rb}\left(d,t\right),\cdots {P}_{w,n}^{rb}(d,t))\). When the traveler chooses the path, \(\mathrm{t}+{T}_{w}^{rb}\left(d,t\right)=({t+T}_{w,-m}^{rb}\left(d,t\right),\cdots \mathrm{t}+{T}_{w,n}^{rb}(d,t)\) indicates the travel time required for the b-type vehicles, and \({P}_{w}^{rb}\left(d,t\right)=({P}_{w,-m}^{rb}\left(d,t\right),\cdots {P}_{w,n}^{rb}(d,t))\) indicates the probability of choosing the path.

Among them, \({I}_{o}=\mathrm{t}+{T}_{w}^{rc}\left(d,t\right)-{\sigma }_{w}^{rc}\left(d,t\right)\bullet {\Phi }^{-1}(0.5+0.5\vartheta \mathrm{\%})\);\({I}_{r}=\mathrm{t}+{T}_{w}^{rc}\left(d,t\right)+{\sigma }_{w}^{rc}\left(d,t\right)\bullet {\Phi }^{-1}(0.5+0.5\vartheta \mathrm{\%})\); \({\Phi }^{-1}(\bullet )\) is the inverse function of a normal distribution function.

According to the accumulation prospect theory, the value function of the path selection of the b-type vehicles can be expressed as

$$g\left[{t+T}_{w}^{rb}(d,t)\right]=\left\{\begin{array}{c}{({T}_{o}-t-{T}_{w}^{rb}(d,t))}^{\alpha }, t+{T}_{w}^{rb}(d,t)\le {T}_{o}\\ -\lambda {\left(t+{T}_{w}^{rb}(d,t)-{T}_{o}\right)}^{\beta }, t+{T}_{w}^{rb}(d,t)>{T}_{o}\end{array}.\right.$$

In the equation, \({T}_{o}\) denotes the reference point for the traveler between origin and destination, and \({\alpha }\) and \(\upbeta \) denote the risk appetite level of the decision maker. The greater the value, the more sensitive the traveler is to the risk, and the less sensitive to the risk. \(\lambda (\lambda \ge 1)\) denotes the loss evasion factor; the greater the value, the higher is the avoidance degree of the traveler to the loss. Function \(g\left(\bullet \right)\) is monotonically decreasing, and it is continuous at \({T}_{o}\), but not differentiable.

The decision weight function is shown as follows:

$$W\left(P\right)=\frac{{\left(P\right)}^{\gamma }}{{\left[{\left(P\right)}^{\gamma }+{\left(1-P\right)}^{\gamma }\right]}^{\frac{1}{\gamma }}},\left(0<\upgamma <1\right).$$

When \(t+{T}_{w}^{rb}(d,t)\le {T}_{o}\), the actual arrival time of the traveler is less than the reference point of the traveler, and the traveler obtains the "benefit" and shows "risk aversion". The different results of trip time are arranged in descending order\({T}_{o}\ge t+{T}_{w,1}^{rb}(d,t)\ge \cdots \ge t+{T}_{w,\mathrm{n}}^{rb}(d,t)\). When the travel time is\(t+{T}_{w,i}^{rb}(d,t)\), the probability is\({P}_{w,i}^{rb}(d,t)\). When\(t+{T}_{w}^{rb}\left(d,t\right)>{T}_{o}\), the actual arrival time of the traveler is greater than the reference point of the traveler, and the traveler suffers the "loss" and manifests as the "risk pursuit". The different results of travel time are arranged in descending order\(t+{T}_{w,-\mathrm{m}}^{rb}\left(d,t\right)\ge t+{T}_{w,-\mathrm{m}+1}^{rb}\left(d,t\right)\ge \cdots \ge t+{T}_{w,-1}^{rb}\left(d,t\right)\ge {T}_{O}\). When the travel time is\(t+{T}_{w,j}^{rb}(d,t)\), the probability is\({P}_{w,j}^{rb}(d,t)\). According to Kahneman and Tversky's theory of cumulative prospects, the cumulative decision weight function for b-type vehicles is as follows:

$$\left\{\begin{array}{c}{\pi }_{b}^{+}\left({P}_{i}\right)={w}^{+}\left({P}_{i}+\cdots +{P}_{n}\right)-{w}^{+}\left({P}_{i+1}+\cdots +{P}_{n}\right),0\le i\le n \\ {\pi }_{b}^{-}\left({P}_{j}\right)={w}^{-}\left({P}_{-m}+\cdots +{P}_{j}\right)-{w}^{-}\left({P}_{-m}+\cdots +{P}_{j-1}\right),-m\le j<0\end{array}.\right.$$

In summary, the path prospect of the fuel vehicle can be described as

$${V}_{w}^{rc}\left(d,t\right)=\sum_{i=1}^{n}{\pi }^{+}\left({P}_{i}\right)g\left[{t+T}_{w}^{rc}(d,t)\right]+\sum_{j=-1}^{-m}{\pi }^{-}\left({P}_{j}\right)g\left[{t+T}_{w}^{rc}(d,t)\right].$$
(2.11)

The path prospect of the electric vehicle can be described as

$${V}_{w}^{re}\left(d,t\right)=\sum_{i=1}^{n}{\pi }_{e}^{+}\left({P}_{i}\right)g\left[{t+T}_{w}^{re}(d,t)\right]+\sum_{j=-1}^{-m}{\pi }_{e}^{-}\left({P}_{j}\right)g\left[{t+T}_{w}^{re}(d,t)\right].$$
(2.12)

Reach time prospects

When the traveler chooses the departure time, \(\mathrm{t}+{T}_{w}^{rb}\left(d,t\right)=({t+T}_{w,-m}^{rb}\left(d,t\right),\cdots \mathrm{t}+{T}_{w,n}^{rb}(d,t))\) indicates the travel time required for the b-type vehicles, and \({P}_{w}^{db}\left(d,t\right)=({P}_{w,-m}^{db}\left(d,t\right),\cdots {P}_{w,n}^{db}(d,t))\) indicates the probability of choosing the departure time.

The value function of the b-type vehicles arriving at the workplace can be expressed as:

$$ g_{T} [t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t)] = \left\{ {\begin{array}{*{20}c} { - \lambda_{2} (T_{{\text{e}}} - (t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t)))^{\beta } ,t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t) < T_{{\text{e}}} } \\ {\lambda_{1} (t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t) - T_{{\text{e}}} )^{\alpha } ,T_{{\text{e}}} \le t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t) \le T_{0} } \\ {\lambda_{1} (T_{{\text{a}}} - (t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t)))^{\alpha } ,T_{0} < t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t) \le T_{{\text{a}}} } \\ { - \lambda_{2} (t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t) - T_{{\text{a}}} )^{\beta } ,t + T_{{\text{W}}}^{{{\text{rb}}}} (d,t) > T_{{\text{a}}} } \\ \end{array} } \right.. $$

The parameters \({\lambda }_{1}, {\lambda }_{2}, { \alpha and \beta }\) are all positive values. When \({T}_{e}<t+{T}_{w}^{rb}(d,t)\le {T}_{o}\), the traveler obtains the "benefit" and shows "risk aversion". The different results of trip time are arranged in descending order \({T}_{o}\ge \cdots \ge t+{T}_{w,i}^{rb}\left(d,t\right)\ge {T}_{e}\). When the travel time is \(t+{T}_{w,i}^{rb}(d,t)\), the probability is \({P}_{w,i}^{db}(d,t)\). When \({T}_{o}<t+{T}_{w}^{rb}(d,t)\le {T}_{a}\), the traveler obtains the "benefit" and shows "risk aversion". The different results of trip time are arranged in descending order \({T}_{o}\ge \cdots \ge t+{T}_{w,j}^{rb}\left(d,t\right)\ge {T}_{a}\). When the travel time is \(t+{T}_{w,j}^{rb}(d,t)\), the probability is \({P}_{w,j}^{db}(d,t)\). The cumulative decision-making weight function of the b-type vehicles is as follows:

$$\left\{\begin{array}{c}{\pi }_{b}^{+}\left({P}_{i}\right)={w}^{+}\left({{P}_{i}}^{b}+\cdots +{{P}_{o}}^{b}\right)-{w}^{+}\left({{P}_{i+1}}^{b}+\cdots +{{P}_{o}}^{b}\right),e\le i<o \\ {\pi }_{b}^{+}\left({P}_{j}\right)={w}^{+}\left({{P}_{j}}^{b}+\cdots +{{P}_{a}}^{b}\right)-{w}^{+}\left({{P}_{j+1}}^{b}+\cdots +{{P}_{a}}^{b}\right),o\le j<a\end{array}.\right.$$

When \(t+{T}_{w}^{rb}\left(d,t\right)\le {T}_{e}\), the traveler suffers "loss" and manifests the "risk pursuit". The different results of travel time are arranged in descending order \({T}_{e}\ge t+{T}_{w,\mathrm{o}-1}^{rb}\left(d,t\right)\ge \cdots \ge t+{T}_{w,-\mathrm{m}}^{rb}\left(d,t\right)\). When the travel time is \(t+{T}_{w,f}^{rb}(d,t)\), the probability is \({P}_{w,f}^{rb}(d,t)\). When \(t+{T}_{w}^{rc}\left(d,t\right)\ge {T}_{a}\), the traveler suffers the "loss" and manifests the "risk pursuit". The different results of travel time are arranged in descending order \({T}_{a}\ge t+{T}_{w,\mathrm{a}+1}^{rc}\left(d,t\right)\ge \cdots \ge t+{T}_{w,\mathrm{n}}^{rc}\left(d,t\right)\). When the travel time is \(t+{T}_{w,h}^{rc}(d,t)\), the probability is \({P}_{w,h}^{rc}(d,t)\).The cumulative decision-making weight function of the b-type vehicles is as follows:

$$\left\{\begin{array}{c}{\pi }_{b}^{-}\left({P}_{f}\right)={w}^{-}\left({{P}_{-m}}^{b}+\cdots +{{P}_{f}}^{b}\right)-{w}^{-}\left({{P}_{-m}}^{b}+\cdots +{{P}_{f-1}}^{b}\right),-m\le f<e \\ {\pi }_{b}^{-}\left({P}_{h}\right)={w}^{-}\left({{P}_{a}}^{b}+\cdots +{{P}_{n}}^{b}\right)-{w}^{-}\left({{P}_{a}}^{b}+\cdots +{{P}_{n-1}}^{b}\right),a\le h<n\end{array}.\right.$$

Above all, the reach time prospect of b-type vehicles can be described as

$${Z}_{w}^{rb}\left(d,t\right)=\sum_{f=-m}^{e}{\pi }_{b}^{-}\left({P}_{f}\right){g}_{T}\left[{t+T}_{w}^{rb}(d,t)\right]+\sum_{i=e}^{o}{\pi }_{b}^{+}\left({P}_{i}\right){g}_{T}\left[{t+T}_{w}^{rb}(d,t)\right]+\sum_{j=o}^{a}{\pi }_{b}^{+}\left({P}_{j}\right){g}_{T}\left[{t+T}_{w}^{rb}(d,t)\right]+\sum_{h=a}^{n}{\pi }_{b}^{-}\left({P}_{h}\right){g}_{T}\left[{t+T}_{w}^{rb}(d,t)\right].$$

Modeling and solving algorithms

In the layout of the charging station, a two-layer programming model is established to achieve both the traveler's optimum and the road’s optimal network. Combining the global optimal with the individual optimum, we get the best scientific and optimized layout of the charging station. The workflow of site selection of fast charging stations is shown in Fig. 2.

Fig. 2
figure 2

Workflow of site selection of charging station

The lower model

From the point of view of the traveler, according to the different attributes and characteristics of the path choice of the fuel and electric vehicles, this model establishes the optimal target of the individual and optimizes the layout of the charging station. At any given moment, the traveler cannot improve the overall efficiency of the network by unilaterally changing its choices, including travel routes and departure times, a state known as equilibrium.

Travel route selection

At the moment T, the traveler chooses the route of travel randomly. Based on the theory of random utility, it is assumed that the path selection behavior of the traveler can be given by a Logit model, so the path selection behavior of the fuel vehicle traveler is expressed as

$${P}_{w}^{rc}\left(d,t\right)=\frac{exp\left(-{\theta }_{1}{V}_{w}^{rc}\left(d,t\right)\right)}{\sum_{r\in {R}_{w}}exp\left(-{\theta }_{1}{V}_{w}^{r}\left(d,t\right)\right)},w\in W,r\in {R}_{w}.$$
(3.1)

The path selection behavior of the electric vehicle traveler is expressed as

$${P}_{w}^{re}\left(d,t\right)=\frac{exp\left(-{\theta }_{1}{V}_{w}^{re}\left(d,t\right)\right)}{\sum_{r\in {R}_{w}}exp\left(-{\theta }_{1}{V}_{w}^{re}\left(d,t\right)\right)},w\in W,r\in {R}_{w}.$$
(3.2)

\({P}_{w}^{rc}\left(d,t\right)\) is the probability that the traveler of the O–D pair \(w\) chooses path \(r\) at time \(t\) on day \(d\). \({V}_{w}^{rc}\left(d,t\right)\) and \({V}_{w}^{re}\left(d,t\right)\) are the path prospects of choosing route \(r\) for the fuel and electric vehicle travelers of O–D pair \(w\) at time \(t\) on day \(d\), respectively. Due to the different characteristics of the path selection of fuel vehicles and electric vehicles, the path prospects of the two types of cars are calculated separately.

  1. (1)

    The path prospect of fuel vehicles

    As can be seen from the previous article, the path prospect of the fuel vehicle can be expressed as follows:

    $${V}_{w}^{rc}\left(d,t\right)=\sum_{i=1}^{n}{\pi }^{+}\left({P}_{i}\right)g\left[{t+T}_{w}^{rc}(d,t)\right]+\sum_{j=-1}^{-m}{\pi }^{-}\left({P}_{j}\right)g\left[{t+T}_{w}^{rc}(d,t)\right].$$

    The traveling time of the fuel vehicle is limited by traffic flow and the traffic capacity of the road network. It can be given by the BPR function. The travel time of the route \(r\) at time \(t\) on day \(d\) is as follows:

    $${T}_{w}^{rc}\left(d,t\right)=\sum_{a\in r}{T}_{a}\left(d,t\right)=\sum_{a\in r}{t}_{a}^{0}\left[1+0.15{\left(\frac{{u}_{a}\left(\mathrm{t}\right)}{{L}_{a}}\right)}^{4}\right].$$
    (3.3)
  2. (2)

    The path prospect of electric vehicles

    As can be seen from the previous article, the path prospect of the electric vehicle can be expressed as follows:

    $${V}_{w}^{re}\left(d,t\right)=\sum_{i=1}^{n}{\pi }_{e}^{+}\left({P}_{i}\right)g\left[{t+T}_{w}^{re}(d,t)\right]+\sum_{j=-1}^{-m}{\pi }_{e}^{-}\left({P}_{j}\right)g\left[{t+T}_{w}^{re}(d,t)\right].$$

    The total travel time \({T}_{w}^{re}(d,t)\) of the road section of electric vehicles is composed of three parts: driving time, waiting time and charging time. The driving time of electric vehicle on the path \(r\) is same as that of fuel vehicles, as shown in formula (3.3).

When an electric vehicle has a charging requirement but the current node does not have a charging station, if its residual charge cannot travel to the next charging point, the charge waiting time is assumed to be a very large number. If the charging station can meet the charging demand of the electric vehicle, the charge waiting time is calculated according to the queuing theory.

It is assumed that the initial power of an electric car is a normal distribution within a range [40,250] and that the amount of electricity decreases proportionally with the increase in the trip. When an electric car has a charging need but the current node does not have a charging station, the electric car needs to choose to go to other charging stations to recharge. If the distance from charging station j to the point of demand is greater than its range, the waiting time of charge station j is set to a very large number; if the distance from charging station J to the point of demand is less than its range, the waiting time of charging is calculated by queuing theory.

The distribution of the time interval of user arrival meets the three characteristics of a Poisson distribution, namely, non-aftereffect, stability and universality, and the distribution rule of system service time conforms to the negative exponential distribution. The number of system service desks is the number of fast charging piles in the charging station. As the definition of the charging station is known, at least three charging devices are needed, that is, the multi-service desk queuing system, and the user can satisfy the service requirement only by passing through a service desk. It can be seen that the process of accepting the service of the car in the charging station conforms to the multi-service station hybrid model M/M/S/K, that is, the customer's successive arrival time obeys the negative exponential distribution of parameter a, and the number of the service table is S. At the same time, the service time of each service desk is independent, which obeys the negative exponential distribution, and the system space is K.

The queuing time expectation of the j-point charging station is calculated using the calculation formulas of the M/M/S/K queuing system.

  1. User arrival frequency

    On day \(d\), when the electric vehicle reaches charging station j at time \(t\), the residual charge of the electric vehicle is \({C}_{j}(d,t)\), and the user's arrival frequency is calculated according to the the electric vehicle inflow \({u}_{a}^{e}(d,t)\) and the electric vehicle residual power on the link a at time t:

    If \({C}_{j}(d,t)\le {C}_{0\mathrm{max}}\cdot 20\%\), then \({\lambda }_{j}(d,t)=0.8\cdot {u}_{a}^{e}(d,t)\).

    If \({C}_{0\mathrm{max}}\cdot 20\%\le {C}_{j}(d,t)\le {C}_{0\mathrm{max}}\cdot 40\%\), then \({\lambda }_{j}(d,t)=0.6\cdot {u}_{a}^{e}(d,t)\).

    If \({C}_{0\mathrm{max}}\cdot 40\%\le {C}_{j}(d,t)\le {C}_{0\mathrm{max}}\cdot 60\%\), then \({\lambda }_{j}(d,t)=0.4\cdot {u}_{a}^{e}(d,t)\).

    If \({C}_{0\mathrm{max}}\cdot 60\%\le {C}_{j}(d,t)\le {C}_{0\mathrm{max}}\cdot 80\%\), then \({\lambda }_{j}(d,t)=0.2\cdot {u}_{a}^{e}(d,t)\).

    If \({C}_{j}(d,t)>{C}_{0\mathrm{max}}\cdot 80\%\), then \({\lambda }_{j}(d,t)=0.1\cdot {u}_{a}^{e}(d,t)\).

    In the above formula, the customer arrives at the service system at the average speed of \({\lambda }_{j}(d,t)\) at time \(t\) on day \(d\), so the customer input rate to enter the system is \({\lambda }_{j}(d,t)\).

    Suppose the average service capacity of charging station is \(\mu_{j} \left( {d,t} \right)\) per unit time, the service intensity of queuing system is \(\rho_{j} \left( {d,t} \right)\), the probability of all charging posts being idle in the station is \(P_{{j_{0} }} \left( {d,t} \right)\), the probability distribution of \(n\) customers in the system is \(P_{n} \left( {d,t} \right) = P\left\{ {N = n} \right\},n = 0,1,2 \ldots\), then the average queue length in the charging station is

    $${L}_{q}\left(d,t\right)=\sum_{n={s}_{j}}^{K}\left(n-{s}_{j}\right){P}_{n}\left(d,t\right)=$$
    (3.4)
    $$\left\{\begin{array}{l}\frac{{{P}_{{j}_{0}}\left(d,t\right)\rho }^{{s}_{j}}{\rho }_{sj}\left(d,t\right)}{{s}_{j}!{\left(1-{\rho }_{sj}\left(d,t\right)\right)}^{2}}\left(1-{({\rho }_{sj}\left(d,t\right))}^{K-{s}_{j}+1}-\left(1-{\rho }_{sj}\left(d,t\right)\right)\left(K-{s}_{j}+1\right){({\rho }_{sj}\left(d,t\right))}^{K-{s}_{j}}\right),{\rho }_{sj}\left(d,t\right)\ne 1\\ \frac{{{P}_{{j}_{0}}\left(d,t\right)\rho }^{{s}_{j}}\left(K-{s}_{j}\right)\left(K-{s}_{j}+1\right)}{2{s}_{j}!},{\rho }_{sj}\left(d,t\right)=1.\end{array}\right.$$

    The total number of vehicles in the charging station is as follows:

    $${L}_{S}\left(d,t\right)={L}_{q}\left(d,t\right)+{s}_{j}+{P}_{{j}_{0}}\left(d,t\right)\sum_{n=0}^{{s}_{j}-1}\frac{\left(n-{s}_{j}\right){({\rho }_{j}\left(d,t\right))}^{n}}{n!}.$$
    (3.5)
  2. Expectations of waiting in line

    The average stay time of the vehicle in charging station \(j\) is as follows:

    $${W}_{{s}_{j}}\left(d,t\right)=\frac{{L}_{s}\left(d,t\right)}{{\lambda }_{j}(d,t)}.$$
    (3.6)

    The average waiting time of the vehicle in charging station \(j\) is as follows:

    $${W}_{{q}_{j}}\left(d,t\right)=\frac{{L}_{q}\left(d,t\right)}{{\lambda }_{j}(d,t)}={W}_{{s}_{j}}\left(d,t\right)-\frac{1}{{\mu }_{j}\left(d,t\right)}.$$
    (3.7)
    $${\mathrm{Charging time}: T}_{C}(d,t)\sim N(\mu ,{\sigma }^{2})$$
    (3.8)

    Thus, the utility of electric vehicles charging at the charging stations on road section \(a\) is as follows:

    $${T}_{w}^{ae}\left(d,t\right)={T}_{a}\left(d,t\right)+\left({T}_{C}\left(d,t\right)+{W}_{{q}_{j}}\left(d,t\right)\right){\psi }_{j}.$$

    Due to the different charging times and waiting times at each charging station, the travel time of different sections of the same route is different. The travel time for route \(r\) is added to the time of each road section that makes up route \(r\). So the travel time of the electric vehicle on route \(r\) is as follow:

    $${T}_{w}^{re}\left(d,t\right)=\sum_{a\in A}\left({T}_{a}\left(d,t\right)+{T}_{C}\left(d,t\right)+{W}_{{q}_{j}}\left(d,t\right)\right).$$
    (3.9)

Departure time selection

The travelers of O–D pair \(w\) randomly choose the departure time, and the probability of each departure time of a fuel vehicle in a continuous distribution can be expressed in a Logit formula:

$${P}_{w}^{dc}\left(d,t\right)=\frac{\mathrm{exp}\left({\theta }_{1}{Z}_{w}^{rc}\left(d,t\right)\right)}{\sum_{t\in T}exp\left({\theta }_{1}{Z}_{w}^{rc}\left(d,t\right)\right)},w\in W,t\in T.$$
(3.10)

\({P}_{w}^{dc}\left(d,t\right)\) is the probability that the fuel vehicle of O–D pair \(w\) will choose to leave at time \(t\).The probability of each departure time of the electric vehicle can be expressed as follows:

$${P}_{w}^{de}\left(d,t\right)=\frac{\mathrm{exp}\left({\theta }_{1}{Z}_{w}^{re}\left(d,t\right)\right)}{\sum_{t\in T}\mathrm{exp}\left({\theta }_{1}{Z}_{w}^{re}\left(d,t\right)\right)},w\in W,t\in T.$$
(3.11)

The DUE model selected simultaneously for departure time and travel path

In combination with formulas (3.1) and (3.10), the behavior of the fuel vehicle traveler choosing the departure time and the route of travel can be expressed as follows:

$${f}_{w}^{rc}\left(d,t\right)={D}_{w}\cdot {P}_{w}^{rc}\left(d,t\right)\cdot {P}_{w}^{dc}\left(d,t\right), w\in W,r\in {R}_{w}.$$
(3.12)

In combination with formulas (3.2) and (3.11), the behavior of the electric vehicle traveler choosing the departure time and the route of travel can be expressed as follows:

$${f}_{w}^{re}\left(d,t\right)={D}_{w}\cdot {P}_{w}^{re}\left(d,t\right)\cdot {P}_{w}^{de}\left(d,t\right), w\in W,r\in {R}_{w},$$
(3.13)

where \({f}_{w}^{rc}(d,t)\) is the flow rate of fuel vehicles choosing path \(r\) in \(w\) at time \(t\) on day \(d\), and \({f}_{w}^{re}(d,t)\) is the flow rate of electric vehicles choosing path \(r\) in \(w\) at time \(t\) on day \(d\). It can be seen that there is a sequential relationship between departure time and travel path selection, that is, the choice of departure time influences the dynamic path choice, and the result of path selection also influences the choice of the next departure time. The traveler considers the interaction of the two to make the best decision on the trip.

The upper model

From the point of view of the construction of the power station and the Traffic Management Department, this section considers the overall efficiency of the road network, the investment cost of the charging station and the influence on the actual road conditions. The global optimal target is established, and the layout of the charging station is optimized.

Target function

Due to the rapid expansion of electric vehicles and the limitation of land use for household charging piles, the demand for quick charging is increasing day by day. Therefore, the scientific layout of charging piles is an important foundation for the development of electric vehicles. There is a big difference between drivers of electric vehicles and fuel vehicles in travel path selection, which shows that the consumption of electric energy will be one of the important factors affecting the driving path selection behavior of electric vehicles. Depending on the vehicle's range, the driver determines whether there is a charging requirement during the trip, so the driver's path selection behavior is a comprehensive consideration of the path information and the service level of the charging station. In view of the above characteristics, the introduction of electric vehicles will inevitably have a significant impact on the operation of the existing traffic network system [26]. Therefore, from the point of view of the efficiency of the traffic system, it is necessary to ensure the shortest travel time of the road network, which can be expressed as follows:

$$min\sum_{r=1}^{R}{C}_{w}^{rb}(d,t)=\sum_{r=1}^{R}\left({C}_{w}^{rc}\left(d,t\right)+{C}_{w}^{re}\left(d,t\right)\right),$$
(3.14)

where \({C}_{w}^{rb}(d,t)\) is the actual travel impedance of choosing path \(r\) in \(w\) at time \(t\) on day \(d\), \({C}_{w}^{rc}\left(d,t\right)\) is the actual travel impedance of fuel vehicle when it choosing path \(r\) in \(w\) at time \(t\) on day \(d\), \({C}_{w}^{re}\left(d,t\right)\) is the actual travel impedance of electric vehicle when it choosing path \(r\) in \(w\) at time \(t\) on day \(d\).

The fuel cost of a petrol-powered vehicle can be calculated through the path length and fuel cost per unit length:

$${F}_{w}^{rc}\left(d,t\right)=\eta \bullet {\rho }_{1}\bullet {s}_{r}.$$
(3.15)

where, \({\rho }_{1}\) is unit fuel cost; \(\eta \) is the currency cost—time conversion coefficient, and \({s}_{r}\) is the distance of path \(r\). Therefore, the travel impedance of fuel vehicles on path \(r\) is:

$${{C}_{w}^{rc}\left(d,t\right)=T}_{w}^{rc}\left(d,t\right)+{F}_{w}^{rc}\left(d, t\right).$$
(3.16)

Let \({\rho }_{2}\) be the unit charging charge, then the charging charge is \({F}_{a}^{e}(d,t)=\eta \cdot {\rho }_{2}\cdot {T}_{C}(d,t)\), and the electricity cost of travel is \({F}_{r}^{e}(d,t)=\eta \cdot {\rho }_{2}\cdot {s}_{r}\)。Therefore, the travel impedance of electric vehicles on path \(r\) is:

$${C}_{w}^{re}\left(d,t\right)=\sum_{a\in A}\left({T}_{a}\left(d,t\right)+{T}_{C}\left(d,t\right)+{W}_{{q}_{j}}\left(d,t\right)+{F}_{a}^{e}\left(d,t\right)\right)+{F}_{r}^{e}(d,t).$$
(3.17)

Cost constraints

  1. (1)

    The cost of land and the cost of construction and operations

    1. The cost of land

      The cost of land is one of the important components of investment cost when the power station is built. In this paper, the price of land is represented by \({M}_{j1}\).

    2. The cost of construction

      The power station construction module mainly includes the distribution system, the monitoring system, and the charging system, so the construction cost is expressed as follows:

      $${M}_{j2}={M}_{P}+{M}_{k}+{M}_{s}{S}_{j}.$$
      (3.18)

      \({M}_{j2}\) indicates the cost of construction (UNIT: 10,000 yuan); \({S}_{j}\) indicates the number of quick-fill piles in the charging station at point j; \({M}_{P}\) indicates the cost of construction of the distribution system (UNIT: 10,000 yuan); \({M}_{k}\) indicates the cost of construction of the monitoring system (UNIT: 10,000 yuan); and \({M}_{s}\) indicates the cost of construction of a single-charge pile (UNIT: 10,000 yuan).

    3. The cost of operations

      Operating costs include maintenance labor, equipment consumption, equipment maintenance and repair costs. The calculation is generally based on a certain proportion of the cost of construction, as shown below:

      $${M}_{Y}=\gamma {M}_{j2}.$$
      (3.19)

      \({M}_{Y}\) represents the operating cost of the charging station at point j (UNIT: 10,000 yuan); and \(\upgamma \) represents the discount factor between the operating cost and the construction cost.

  2. (2)

    Constraints

    The real value of cash flow will change with the change in certain interest rates with the change in time. To measure the relationship between the present value of cash flow and the value of the future year, the discount rate \({r}_{0}\) and the operating life \(n\) are introduced.

    Assuming full operations begin in the first year after construction, the Net Present Value (NPV) method requires calculating the discounted Value from the first year of the coming year.

    $$\sum_{k=1}^{Y}\frac{{Q}_{o}}{{\left(1+{r}_{0}\right)}^{2}}=Q,$$
    (3.20)

    where Q is the annual investment capital, and \(Q_{0}\) is the average annual capital input amortized over the year of operation.

    By the summation formula of the equal-ratio series, it is concluded that

    $${Q}_{o}=\frac{{{r}_{0}(1+{r}_{0})}^{n}}{{(1+{r}_{0})}^{n}-1}Q.$$
    (3.21)

    For conversion according to the above, the total annual investment cost may be subject to the following conditions:

    $$\sum_{j}{\psi }_{j}\frac{{{r}_{0}(1+{r}_{0})}^{n}}{{(1+{r}_{0})}^{n}-1}\left({M}_{j1}+{M}_{j2}+{M}_{Y}\right)\le {M}_{tZ}.$$
    (3.22)

    Of these, \({M}_{tZ}\) is the maximum amount of the government's financial budget for the installation of charging stations. \({\psi }_{j}\) is a 0–1 variable. If there is a charging station at node \(j\), \({\psi }_{j}=1\), else, \({\psi }_{j}=0\).

Algorithms

In this paper, the genetic algorithm and the method of successive averages (MSA) algorithm are combined, and a heuristic algorithm is designed. The key of the algorithm is to calculate the path selection probability and the probability of departure time selection using the logit model, and then the MSA algorithm is used to iterate.

First, the genetic algorithm is used to select the decision variables at the upper level to form the initial population (distribution of charging stations) and pass it to the lower layer of the Logit stochastic dynamic user equilibrium model. The MSA algorithm is used to allocate the traffic flow of each distribution in the population, to form local equilibrium, to update traffic flow, to bring into upper level planning, and to screen out the individuals with good adaptability through the adaptability function. Then, it is taken down to the lower level and iterated, looking for the best solution.

  • Step 1: Initialization. All simple ring-free paths of O–D pair \(w\) are used as effective path sets \({R}_{w}\).

  • Step 2: Outer loop iteration (genetic algorithm). The layout of the charging station is digitally coded, and the initial population is formed. Make \(h=1\), where \(h\) is the number of iterations.

  • Step 3: Inner loop iteration (path selection and departure time selection). Make \(H=1\), where \(H\) is the number of iterations.

    • Step 3.1: The initial probability of route choice for fuel vehicles and electric vehicles is initialized, and the initial set \(\{{f}_{w}^{rc}(1,t)\left|\forall r\in {R}_{w}\right.\}\), \(\{{f}_{w}^{re}(1,t)\left|\forall r\in {R}_{w}\right.\}\) of route flow for each departure time on the first day is obtained. The prospect utility \(\{{V}_{w}^{rc}\left(d,t\right)\left|\forall r\in {R}_{w}\right.\}\), \(\{{V}_{w}^{re}\left(d,t\right)\left|\forall r\in {R}_{w}\right.\}\) of two types of vehicles on each route at each departure time on the first day is calculated.

    • Step 3.2: For \(t=1,2,\dots \dots ,\mathrm{m}\), the travel time of the fuel vehicles \({T}_{w}^{rc}\left(d,t\right)\) and the travel time of the electric vehicles \({T}_{w}^{re}\left(d,t\right)\) are calculated according to expressions (3.3), (3.7) and (3.8), respectively. Next, calculate the arrival prospect \({Z}_{w}^{rc}\left(d,t\right)\) of fuel vehicles and the arrival prospect \({Z}_{w}^{re}\left(d,t\right)\) of electric vehicles.

    • Step 3.3: Use expressions (3.1), (3.2), (3.10), and (3.11) to calculate the path inflow rate \({\widehat{f}}_{w}^{r}\left(d,t\right)\) and use the MSA algorithm to update the flow \({f}_{w}^{r(n)}\left(d\right)\) of path \(r\) and the flow \({f}_{w}^{(n)}\left(d,t\right)\) of departure time \(t\), as follows:

      $${f}_{w}^{r(n)}\left(d\right)={f}_{w}^{r(n-1)}\left(d\right)+0.1\left({\widehat{f}}_{w}^{r(n)}\left(d\right)-{f}_{w}^{r(n-1)}\left(d\right)\right),$$
      $${f}_{w}^{(n)}\left(d,t\right)={f}_{w}^{(n-1)}\left(d,t\right)+0.1\left({\widehat{f}}_{w}^{(n)}\left(d,t\right)-{f}_{w}^{(n-1)}\left(d,t\right)\right).$$
    • Step 3.4: Termination criteria for loop iterations. When the shunting result reaches equilibrium, if \({f}_{w}^{r(n)}\left(d\right)-{f}_{w}^{r(n-1)}\left(d\right)\le \delta \) and \({f}_{w}^{(n)}\left(d,t\right)-{f}_{w}^{(n-1)}\left(d,t\right)\le \delta \), \(\delta \) is the predetermined error and turns to step 4. Otherwise, let \(H=H+1\), and return to step 3.

  • Step 4: Construct the fitness function and start the genetic algorithm.

    The layout of the charging station is expressed by digital coding where \(a\) represents the node with charging stations (the number of charging piles is \(a\)) and 0 represents the node without charging stations. According to the standard for planning and design of electric vehicle charging infrastructure [27] and land use restriction, we assume that \(a\in [\mathrm{3,10}]\). Each chromosome represents a charging station layout scheme. In the process of cross mutation, a roulette method is used to select the chromosomes with a crossover probability of 0.8 and a mutation probability of 0.01, resulting in a new population. The layout of the charging stations is coded as shown in Fig. 3.

    The fitness function is a piecewise function, as follows:

    $$\mathrm{max}F=\left\{\begin{array}{l}\stackrel{-}{\sum_{r\in {R}_{w}}{V}_{w}^{rc}\left(d,t\right)}+\stackrel{-}{\sum_{r\in {R}_{w}}{V}_{w}^{re}\left(d,t\right)},\sum_{j}{\psi }_{j}\frac{{{r}_{0}(1+{r}_{0})}^{n}}{{(1+{r}_{0})}^{n}-1}\left({C}_{j1}+{C}_{j2}+{C}_{Y}\right)\le {C}_{tZ}\\ 0, \sum_{j}{\psi }_{j}\frac{{{r}_{0}(1+{r}_{0})}^{n}}{{(1+{r}_{0})}^{n}-1}\left({C}_{j1}+{C}_{j2}+{C}_{Y}\right)>{C}_{tZ}\end{array}.\right.$$
  • Step 5: Termination criterion of the genetic algorithm. For any\(h\), stop the iteration if \({\mathrm{max}F}^{(d+1)}-{\mathrm{max}F}^{(d)}<\varepsilon \), where \(\varepsilon \) is a predetermined error; otherwise, let \(h=h+1\) and return to step 2.

Fig. 3
figure 3

Schematic diagram of the genetic algorithm selection process

Numerical simulation

Example network

To validate the proposed model and algorithm, we solve the model in the example network shown in Fig. 4. In this example road network with nine nodes, O and D are a pair of origin–destination points; charging stations are 0–1 variables located at A, B, C, D, E, F, G, and the interval for the number of charging piles for each charging station is [CR2, CR22].

Fig. 4
figure 4

The example network

There are six routes in the network (see Table 1), as follows:

Table 1 Paths

Simulation parameters

Model parameters

Initial state simulation parameters are set according to Tables 2 and 3:

Table 2 Parameter values of the network
Table 3 Parameter values of the model

Constraint parameter

The minimum parking space size for a vertical compact is 2.4 m * 5.3 m. Charging piles were installed, so the parking space was expanded to 2.5 m * 6 m. Because the charging parking space is arranged symmetrically on both sides of a single row, the area of the parking space is taken up by the rounding function, the area of the charging area is \(2*\lceil{s}_{j}/2\rceil\), and the area occupied by the car is \(30*\lceil{s}_{j}/2\rceil\). Adding all the functional areas in Table 4, the supporting building covers an area of approximately 350 m2.

Table 4 Parameters of supporting facilities area

The single lane width should not be less than 3.5 m, and the two lanes width should not be less than 6 m. The driving lane around the charging area is set as two lanes, and the driving lane on both sides of the building is set as one lane. The roadway covers a total area of \(435+30*\lceil{s}_{j}/2\rceil\).

The total area of the charging station can be obtained by adding the area occupied by the car, the supporting facilities and the roadway, where the unit is m2.

$${C}_{j1}=785+60*\lceil{s}_{j}/2\rceil.$$

The construction module of the charging station mainly includes the power distribution system, the charging system, and the monitoring system. The total cost of the distribution system is approximately 1.92 million yuan, the charging system is approximately 350,000 yuan per pile, and the monitoring system is approximately 200,000 yuan. Therefore, the total construction cost is

$${C}_{j2}=210+35*\lceil{s}_{j}/2\rceil.$$

Optimization result

Results of charging station layout

Table 5 shows the simulation results of the heuristic algorithm under different proportions of electric vehicles in the road network. It shows that the proposed method obtained the optimal charging station layout which can satisfy both the highest efficiency of the road network and the maximum individual utility.

Table 5 Optimal charging station distribution with different percentages of EVs

Figure 5a shows the variation trend of the total number of charging piles under different mixing rates of electric vehicles. Obviously, with the increase of the proportion of electric vehicles, the number of charging piles presents a trend of up–down–up. The number of charging piles continues to increase when the mixing ratio of EV goes from 10 to 30%, which indicates that more charging piles are needed to maintain the efficiency of the road network when the number of EVs is increased. However, when the number of EVs accounts for 40–60%, the number of charging piles decreases significantly, indicating that the road network can maintain high efficiency through a reasonable distribution of traffic flow without increasing the number of charging piles. When the number of electric vehicles exceeds 60%, the road network needs to add charging piles to maintain the traffic efficiency of the road network.

Fig. 5
figure 5

a Comparison of the number of charging piles under different models. b Comparison of the total travel time under different models

This shows that in the process of increasing the number of electric vehicles, the number of charging piles and the number of electric vehicles have no consistent relationship. Keeping the road network efficient does not necessarily mean adding more charging piles. When the number of electric vehicles in the road network is within a certain range, the optimized layout of charging stations and reasonable traffic flow distribution can achieve greater efficiency of the road network using fewer charging piles.

As can be seen from Fig. 5a, b, compared with the results of DUE (dynamic user equilibrium) model, the results of the model with cumulative prospect theory are more satisfactory. Under the same electric ratio, the CPT-DUE (dynamic user equilibrium model under cumulative prospect theory) model requires fewer charging piles, and the total travel time of the road network is shorter.

At the same time, the change of the reference point will also affect the distribution of the charging piles. According to Fig. 6, the variation trend of the number of charging piles under the condition of reference point 1 (9:05 is the optimal arrival time) and reference point 2 (9:30 is the optimal arrival time) is compared, and it can be found that the curve presents an opposite variation trend. In the case of reference point 1, when the proportion of electric vehicles exceeds 60%, the number of charging piles increases; In the case of reference point 2, when the proportion of electric vehicles exceeds 50%, the number of charging piles decreases. By analyzing the results of route selection and departure time selection, it can be found that when 9:30 is the optimal arrival time, the two types of vehicles have different travel peaks due to different travel times. This will have a beneficial effect on the number and layout of charging piles.

Fig. 6
figure 6

The variation trend of the number of charging piles at different reference points

Fitness function analysis

The greater the fitness, the better is the quality of the solution. Figure 7 shows that the fitness functions show an increasing trend and tend to be stable under different proportion conditions. After 30 iterations, the convergence index can meet the accuracy requirement, which shows that the algorithm can be applied to this model and that the convergence is better.

Fig. 7
figure 7

Fitness function

Reference-dependent effect

This section analyzes the reference-dependence effect of path selection and departure time selection for electric and fuel vehicles. The reference point is the optimal time for the traveler to arrive at the workplace. Divide the part between the early arrival time and the commuting time into nine parts, and set nine reference points. According to the change of the optimal arrival time, the change of the path prospect and the departure time prospect is analyzed.

In the network equilibrium state, the changing trend of the path prospects of fuel vehicles and electric vehicles with the reference point is given in Fig. 8a, b, respectively. It shows that the route choice of the traveler has a significant reference point-dependent effect under the network equilibrium state. At the same time, it also shows that the cumulative prospect theory is applicable in charging station planning. Figure 8c, d show the changing trend of the departure time prospects of the fuel vehicle and electric vehicle with a reference point under the network equilibrium state, respectively. The results show that there is a significant reference-dependent effect on the traveler's choice of departure time under network equilibrium.

Fig. 8
figure 8

a The changing trend of fuel vehicle path prospects with a reference point. b The changing trend of electric vehicle path prospects with a reference point. c The changing trend of fuel vehicle departure time prospects with a reference point. d The changing trend of electric vehicle departure time prospects with a reference point

Analysis of traffic flow distribution in the road network

The path travel time and traffic flow distribution of electric vehicles with ratios of 10, 50, and 90% were analyzed, as shown in Tables 6 and 7.

Table 6 The travel time and flow distribution of each route of fuel vehicles
Table 7 The travel time and flow distribution of each route of electric vehicles

From Tables 6 and 7, it can be found that not only the path travel time and utility but also the variance in travel time affects the traffic flow distribution. It can be seen from Table 6 that the shorter the travel time and the smaller the variance of the path, the higher the split ratio of fuel vehicles. Meanwhile, Table 7 shows that the path with long travel time but less variance will attract more EV travelers to choose. When the EV proportion is 50%, the travel time for route 5 is longer than that for route 3, and the variance in route 5 is less than that in route 3, so the traffic proportion for route 5 is higher than that for route 3. This shows that the routes with lower variance have a higher stability of travel time and attract more travelers, which indicates that the results of the model are consistent with the assumption of bounded rationality.

From Table 8, it can be found that the travel time of the fuel vehicle is the shortest in path 3, path 5 and path 6, and the proportion of the fuel vehicles on these three routes is the highest. This means that the simulation results of the model are consistent with the expected utility hypothesis. In addition, the travel time is the main factor in the route choice, and the number of charging piles has little effect on the route choice.

Table 8 Influence of travel time and the number of charging piles on the flow distribution of fuel vehicles

According to Table 9, when the proportion of electric vehicles is 10%, the travel times of routes 3, 5 and 6 are the shortest, and the split ratio is the highest; although route 6 has the largest number of charging piles, when the electric vehicle proportion is low, most electric vehicle travelers still choose the route with the shortest travel time. When the EV proportion is 90%, there are 23 charging piles in route 2 and 9 charging piles in route 6. The travel time of route 2 is longer than that for route 6, but the shunt proportion of route 2 is larger than that of route 6. Therefore, when the number of electric vehicles in the road network is 90%, the impact of the number of charging piles on route choice is greater than the travel time.

Table 9 Influence of travel time and the number of charging piles on the flow distribution of electric vehicles

Analysis of traffic flow distribution at different departure times

Figure 9 shows the departure time choice of the morning rush hour with the same number of fuel vehicles and electric vehicles in the network, respectively. It can be seen that the travel time choices of fuel vehicles and electric vehicles are basically concentrated at two time points: 8:00 and 8:10. Assuming that the working time is 9:15, the reference point of the optimal arrival time is 9:05, since the average travel time of a fuel vehicle is 48 min and the average travel time of an electric vehicle is 83 min. So, to avoid being late, the departure times for both types of cars are concentrated at 8:00 and 8:10. The traveler's sensitivity to departure time proves the validity of prospect theory's value function. According to the analysis of departure time, choice distribution and departure time choice utility function, the main purpose of departure time selection is for arrival time close to the optimal arrival time of 9:05, thus fitting the expected utility hypothesis.

Fig. 9
figure 9

a Departure time distribution of fuel vehicles. b Departure time distribution of electric vehicles

When the reference point is moved, the working time is set to 9:40 and the optimal arrival time is 9:20, the departure time selection results of drivers of fuel vehicles and electric vehicles are shown in Fig. 10. As can be seen, when the reference point moves to the right, the departure time choice of fuel vehicles is mainly concentrated at 8:20 and 8:30 and the departure time choice of electric vehicles is mainly concentrated at 8:00 and 8:20. This shows that with the movement of the reference point, the two types of vehicle travelers change their choice of departure time to get closer to the optimal arrival time, which proves the existence of a reference point-dependent effect.

Fig. 10
figure 10

a Departure time distribution of fuel vehicles after changing the reference point. b Departure time distribution of electric vehicles after changing the reference point

Conclusion

Most of the traditional charging station planning models do not consider the interaction between the layout scheme and the traffic network, and most of the dynamic traffic assignment models in the study generally assume that the traveler is completely rational. Meanwhile, most studies regard OD travel demand as known, only considering dynamic path selection and ignoring departure time selection. This paper combines the cumulative prospect theory, dynamic traffic flow allocation and charging demand to solve the problem of charging station location. In this paper, a two-level programming model was established to consider such factors as the difference of travel utility perception, time-varying traffic flow, location of charging stations and service level of users of fuel vehicles and electric vehicles under the condition of finite rationality. A dynamic user equilibrium model is established to describe the time-variability of departure time and the randomness of travel behavior. Through simulation experiments, the optimal charging station layout scheme under different conditions is obtained, and the travel choice behavior of travelers is deeply analyzed. The results suggest that

  1. (1)

    The CPT-DUE model based on cumulative prospect theory has better optimization results than the DUE model based on expected utility theory. In the same proportion of electric vehicles, the number of charging piles obtained by the CPT-DUE model is less than that of the DUE model, and the road network traffic efficiency is higher. Therefore, it is not necessary to add more charging piles to maintain efficient traffic in the road network, which can be realized by optimizing the layout of charging stations. In addition, changing the reference point will also change the layout of the charging piles. Different arrival time will change the travel choice of travelers, which will affect the layout of charging piles. Therefore, When the proportion of electric vehicles is less than 60%, the working hours can be set earlier; When the proportion of electric vehicles is higher than 60%, the working time should be appropriately postponed, which can effectively reduce the number of charging piles.

  2. (2)

    In the case of network equilibrium, the path prospects of fuel vehicles and electric vehicles increase with the increase of reference points, which indicates that travelers' path choice has a significant reference-dependent effect under network equilibrium. At the same time, the change of reference point has a great influence on the choice of departure time, which is chosen to arrive at the work place at the optimal time and avoid being late. The reference point dependence effect and the applicability of prospect theory are proved. This result suggests that appropriately postponing the arrival time for work has a positive effect on alleviating traffic pressure. Relevant departments can make fuel vehicles and electric vehicles travel on different peaks according to their different travel characteristics, so as to achieve the effect of reducing traffic congestion.

  3. (3)

    The variance of route travel time plays a very important role in traffic flow allocation. The route with long travel time and small variance tends to have a higher proportion of traffic flow. Because the travel time of the path with lower variance is more stable, it will attract more travelers, which also shows that the results of the model conform to the hypothesis of bounded rationality. Moreover, when the proportion of electric vehicles in the road network is small, the influence of the number of charging piles on travelers' route choice is less than the travel time. When the proportion of electric vehicles is high, the reverse is true. Therefore, at the current stage of the development of electric vehicles, if relevant departments need to guide users' travel and charging behavior, they should mainly consider factors such as travel time reliability and route travel time. Too many and disorderly construction of charging piles cannot effectively improve travelers' satisfaction.

The above three main conclusions can provide corresponding means of traffic management and control for optimizing the traffic efficiency of the entire road network and improving the overall utility of drivers. Relevant departments should adjust the number of charging piles on different types of routes according to the proportion of electric vehicles in the road network, so as to keep the traffic efficiency of the road network optimal.

The shortcomings of this paper and future research directions can be summarized as follows: (1) Due to the lack of actual data, the feasibility of the model can only be verified theoretically at present, which may lead to some deviation between the results of the model and the actual situation. In a future study, we will pay more attention to practical applications and use more real data. (2) We will give more consideration to the load of distribution network, land restriction of charging pile construction, influence of different seasons on electric vehicle quantity and other factors to make the model's assumptions closer to real life.