Maximum flow-based formulation for the optimal location of electric vehicle charging stations

With the increasing effects of climate change, the urgency to step away from fossil fuels is greater than ever before. Electric vehicles (EVs) are one way to diminish these effects, but their widespread adoption is often limited by the insufficient availability of charging stations. In this work, our goal is to expand the infrastructure of EV charging stations, in order to provide a better quality of service in terms of user satisfaction (and availability of charging stations). Specifically, our focus is directed towards urban areas. We first propose a model for the assignment of EV charging demand to stations, framing it as a maximum flow problem. This model is the basis for the evaluation of user satisfaction with a given charging infrastructure. Secondly, we incorporate the maximum flow model into a mixed-integer linear program, where decisions on the opening of new stations and on the expansion of their capacity through additional outlets is accounted for. We showcase our methodology for the city of Montreal, demonstrating the scalability of our approach to handle real-world scenarios. We conclude that considering both spacial and temporal variations in charging demand is meaningful when solving realistic instances.


Introduction
Transportation accounts for 28% of greenhouse gas (GHG) emission in the US [1] and similarly in the UK (27%) and in Canada (28%) [2,3].For countries where a large percentage of electricity is generated from renewable sources, as is the case in Canada, studies show that electric vehicles (EVs) are a good alternative to fuel-based ones as a measure to curtail GHG emissions [4,5].To boost EV adoption, expansion and improvements to the already existing charging infrastructures must be made.This is because the willingness of car users to opt for an EV is closely linked to the EVs' travel range and the availability of charging stations [6].The addition of new charging stations can alleviate range anxiety, especially for prospective EV owners [7].As such, Hydro-Québec, a publicly owned company responsible for most of the electric grid in the province of Quebec, is investing into more and faster charging stations.In fact, from 2017 to 2022, 1,800 new charging stations were added in the province of Quebec.Simultaneously, there was a surge in EV purchases, escalating from 3,347 in 2017 to 34,082 in 2022 [8].This increase in EV purchases is mostly likely influenced by government policies (e.g., [9,10]), yet it may also be due to the introduction, in urban areas, of charging stations near homes, workplaces and public areas, as this is known to be a crucial incentive for EV adoption [11].Homes can sometimes have access to privately owned chargers [12], but this does not apply to every EV owner.To top it off, public charging infrastructure has been shown to improve EV adoption [13].This unfortunately leads to the "chicken and egg" dilemma [14], where investors are only willing to supply more infrastructure if adoption is high, while EV purchases are dependent on widespread charging availability.As such, initial investment must come from governments and public institutions.
The motivation behind this work is to assist decision-makers who need to identify where infrastructure improvements are needed.Concretely, given a set of candidate locations for opening new stations and existing ones, infrastructure owners must decide where to install new stations and determine the number of outlets to be added to new and existent stations.This decision must be driven by the EV users demand.In a urban planning context, it is expected that users mostly carry out intracity trips between home, workplace and public areas, which can serve to identify the areas of infrastructure enhancement.We assume that it is possible to reduce these users' range anxiety by providing them with access to charging stations near these origin and destination places.
Contributions Motivated by the context presented above, this paper tackles the challenge of optimally locating and sizing EV charging stations in urban areas to maximize the satisfied charging demand.Here, charging demand refers to requests from EV users to charge their vehicle at a public station, while satisfying that demand implies the availability in both time and space of a charging station with sufficient capacity for that user.Maximizing the satisfied charging demand is an important tactical planning problem faced by EV infrastructure providers like Hydro-Québec, which regularly take decisions on the expansion of their infrastructure to meet the growing charging demand based on current usage.Our first contribution is the formulation of a linear programming model to efficiently evaluate the satisfied demand for a group of existing charging stations.Even though the satisfied demand can be determined from usage data of stations, this model serves two purposes: (i) it also allows us to compute the unsatisfied demand and (ii) it enables us to evaluate the satisfied demand for any set of stations.Expanding upon this, our second contribution is the integration of location and sizing decisions in the formulation, given a list of candidate locations for new stations, resulting in a mixed-integer linear program which can be used to maximize the satisfied demand.Lastly, our third contribution involves detailing a case study of the island of Montreal.We base our research on real charging session data and origin-destination (OD) trips across Montreal boroughs.With it, we validate the effectiveness of our approach to solve large-scale instances and we conduct an analysis of the solutions it produces.
Our methodology differs from most papers in the literature in three key ways, underlying the novelty of our contributions.
1. We solve the problem of determining the charging demand, i.e., the assignment of the EV users (demand) to stations, by formulating it as a maximum flow problem.Maximum flow problems have the advantage of being solvable efficiently.Importantly, our maximum flow problem is based on [15] which is different from the flow-based model commonly found in [16] and other papers about the station location problem.To the best of our knowledge, this is the first maximum flow model of its kind used within the context of the EV station location and sizing problem.
3. Thanks to our partnership with Hydro-Québec, we have access to real-world data, including the existing station locations and charging sessions with timestamps and energy consumption for every user.We use this information to generate realistic instances for testing our methodology, and demonstrate our ability to solve large-scale instances with hundreds of stations and the aggregated power demand of thousands of users.

Paper organization
The paper is organized in the following way.In Section 2, we provide an overview of the existing literature on EV charging infrastructure planning, focusing particularly on station placement.In Section 3, we present the linear model for charging station network evaluation in terms of satisfied demand and the mixed-integer program, including station location and sizing decisions.In Section 4, we describe our case study for the island of Montreal and test our models on realistic instances.Section 5 concludes the paper and proposes potential future research.

Related Literature
In this section, we begin with a brief review of the literature pertaining to the optimization of charging infrastructure utilization.Then, we delve into the literature's approaches to estimate charging demand, a crucial element for the optimal placement of charging stations.Subsequently, we discuss different location models, objective functions, intracity and intercity case studies, and temporal modeling considerations.Lastly, we position our work within the reviewed literature.
Research has been conducted on optimizing the existing charging infrastructure, particularly, through charging price decisions aimed at managing the distribution of demand (e.g., [22], [23], [24]).However, in our case study of the island of Montreal, prices cannot be changed and the power grid is prepared to handle even the most severe winter day.Therefore, we focus our review on charging station placement.
Decisions on the expansion and opening of charging stations requires the knowledge of its potential use.Thus, the estimation of charging demand is important, as it indicates when and where the demand for charging originates.The most common method is based on the use of OD data to subsequently model how users move between locations.This kind of data often comes from surveys (e.g., [25], [26], [21]).This is the approach adopted in this paper.Nonetheless, it is important to note that our data only covers travels between boroughs (i.e., it is not granular) and it is not exclusive to EVs.Hence, we complement the demand estimation with other available data.
The location modelling usually falls into one of two categories: node-based or flow-based [27].In the node-based approach, either a list of candidate locations is provided and the goal is to maximize the coverage (e.g., [28], [29], [19]), or population nodes are used as candidate locations and the goal is to satisfy all the demand at minimum cost, i.e., cost of opening stations [26,30,31,32].For the flow-based modelling, flow is assigned OD pairs, and facilities (charging stations in this context) must capture as much flow as possible.This is another variant of maximum coverage proposed by [33].Using the flow-based modelling, Kuby and Lim [16] are the first to propose the Fuel Refuelling Location Problem (FRLP) which seeks to locate a fixed number of refuelling stations on a network so as to maximize the total flow volume refuelled.In our work, since we consider intracity travels, and hence, short trips, we do not consider the routing of EVs.We define a maximum flow problem in the sense of [15] for the location modelling.The key difference with the FRLP is that we treat flow as a variable rather than a parameter.In the FRLP each OD is assigned a flow volume on the shortest path between the origin and destination.A binary variable is then used to identify whether each flow volume is present or not when maximizing the objective.This is fundamentally different from our approach, since we view flow as a variable which can enter and leave both OD pairs and stations using flow constraints.
In the literature, the objective of the charging station placement problems varies significantly, but it is often closely related to the location modelling choice.Flow-based models often maximize the total amount of flow in the network (e.g., [16], [34], [35], [36]), which is also our case.For node-based modelling, different objectives have been used, such as maximization of the satisfied EV demand [21,29,19] and minimization of the costs [26,30,37,31,32,38,39].
A key aspect of the EV charging station placement problem is whether it concerns the intercity or intracity context.The intercity case focuses on long distance travels between cities, with users potentially charging once or more during a trip (e.g., [35], [30], [31]).The intracity case focuses on a city, with users typically charging near homes, workplaces or public areas [11].The works in [28,25,21] are all examples of works on intracity problems.To the best of our knowledge, Anjos, Gendron and Joyce-Moniz [14] are the only authors to handle both intra and intercity cases simultaneously.
Some works include a time component to the EV charging station placement problem.Notably, time periods have been modelled with two different goals: to consider strategical planning, where periods can represent years, and to consider tactical planing, where periods can represent hours.If time is modelled over a certain number of years, the goal is to focus on the adoption of EVs or the evolution of the EV infrastructure [35,30,18,31,14,40].If time is modelled over a range of hours, the goal is to reflect high and low demand over certain times and evaluate the infrastructure service quality [28,21,29,39].
In this paper, we propose a flow-based (in the sense of [15]) mixed-integer linear program (MILP) for the EV charging station placement and sizing problem.Baouche et al. [25] investigated a case study of the city of Lyon for their intracity model.They also used OD data to estimate demand, yet the approach is fundamentally different from ours, with their optimization model ensuring that all demand is covered at minimum cost, and without complementing the OD data with EV session data.Filipi et al. [39] emphasized the importance of accounting for spatial and temporal variations in demand, which aligns with the considerations in our study.They adopted a node-based demand model and focused on minimizing installation costs and customers travel distance, subject to satisfying all the demand (which can be assigned to any opened station).This contrasts with our approach in two key ways: firstly, we focus on maximizing the satisfied energy demand; secondly, we use OD data and we limit the feasibility of the charging stations to points near the origin or destination, rather than node-based demand modelling.Lamontagne et al. [40] proposed a MILP for the maximization of EV adoption in the long-term.Their model does not consider the stations' capacity, which is a crucial factor for our tactical problem, maximizing satisfied demand.Cavadas, H. A. Correia and Gouveia [21] considered an intracity case study as well as a temporal dimension along with station capacities.Their work differentiates from ours as they use a node-based model rather than flow-based, aiming to minimize walking distance, and using a predefined number of outlets per station.Finally, the direct solving of the various mixed-integer linear programs proposed for the EV placement problem has encountered the issue of scalability (e.g., [18,14,40]).However, by leveraging on the maximum flow model for the estimation of the satisfied demand, we are able to solve our MILP for instances based on the real Montreal demand and existing EV infrastructure.

Problem Statement
Our problem involves determining the optimal location and sizing (number of outlets) of EV charging stations in an urban context.The urban area under study can possess existing stations, but it is not required for the correctness of our model.The decision-maker's goal is to maximize the satisfied daily (charging) demand subject to a budget constraint for the infrastructure expansion costs.Certainly, to address this problem, it is crucial to model how current EV users utilize the available charging stations, either existing or newly installed.Hence, we next describe the available information about EV users and the assumptions made in our work.
Since we consider the urban case, we expect EV users to travel between home and work, home and childcare, home and leisure areas, and so on, which are relatively short distances within the range of EVs.Therefore, we can assume that they do not charge along a path but rather at its origin or destination.Hence, the problem of determining how the charging demand is spread over the available stations becomes a matching problem, where we aim to match EV users to stations close to their origin or destination.Maximizing the number of matchings is equivalent to determining the maximum demand that can be satisfied.Given that, in our case study, users have access to an app providing in real-time the information about station occupancy (Le Circuit électrique1 ), it is reasonable to optimize the assignment with this objective function.
Another important aspect of our problem is the consideration of time.Over a day, EV users do not necessarily travel and charge at the same time, nor do charging sessions have the same duration.For instance, we should expect peaks of demand in the evenings in residential areas, and significant charging duration differences between level 2 and level 3 charging stations [41].Therefore, we discretize the day into a finite number of periods over which the demand varies, and we consider the assignment of users to stations for each of these periods.
In our case study, we have access to the origin-destination matrix for the urban area under investigation, along with charging session data for existing stations.

Linear Model: Assigning Demand to Stations
In this section, we describe our framework to determine the assignment of EV charging demand to stations.To this end, we first provide a graph modeling and then, a linear programming formulation.Our notation is summarized in Table 1; the elements corresponding to new stations and outlets are only used in the next section.

Graph transformation
Let us go into more detail in the description of our assignment problem as it consists of a crucial building block for our methodology.We use a bipartite graph to describe potential matches (assignments).The left side of the bipartite graph is composed of EV users and the right side of stations.Instead of using individual EV users as vertices, it is more efficient to group them based on their trips: users with the same origin-destination (OD) pair are grouped together.The edges must represent feasible stations for each OD pair.To decide if a station is feasible for a given OD pair, we define a parameter R which describes the maximum radius around the origin or the destination of an OD pair.If a station is within either radius, then it is feasible for that OD pair and an edge is created.
Issues with this maximum matching approach are that there can exist more than one user per OD pair and a station can charge more than one user at a time; note that a station can have more Cost of adding an outlet to an existing station e ∈ R 1 G Budget Pe Amount of charging flow supply for a single outlet at an existing station e ∈ R 1 Q (2) , Q (3)  Amount of charging flow supply for a single outlet at a new level 2 or 3 station Y (2) , Y (3)  Maximum number of outlets in a level 2 or 3 station Ye Maximum number of outlets in location e ∈ R 1

Variables
Binary variable indication whether or not to build a new level 2 or 3 station e ∈ R 2 than one outlet.To fix this, we convert the bipartite graph into a flow graph, and the matching problem into a maximum flow problem.To do so, the edges of the bipartite graph are transformed into arcs from the vertices in set O to the vertices in set R 1 , a source vertex and a sink vertex are introduced, an arc from the source to each element in set O is added, and an arc from each element in set R 1 to the sink is added.Finally, to define a maximum flow problem over the resulting graph, restrictions regarding the amount of flow that can pass through each arc and the cost of using those arcs must also be defined.In our problem, there is no cost associated with the use of the arcs.It would be possible to add a cost based on the distance between an origin or destination and a station but this is out of the scope of this paper, since we assume that stations are within a short walking distance.On the other hand, we do define maximum flow capacities to the arcs between the source and the elements in set O, and between elements in set R 1 and the sink.For the former, the maximum flow capacity represents, at a given period, the amount of charging flow demand for every user travelling on each OD.For the latter, the maximum flow capacity on the arc from a station to the sink represents the maximum amount of charging flow supply available at that station within a period.See Figure 1 for an illustration.A key aspect here is that the charging flow is relative to a period.As such, the (flow) graph can be replicated for a given set of periods T , where the graph remains the same but the arcs' maximum capacities can change between periods.Specifically, the maximum flow capacities on the arcs from the source to the OD pairs may vary, allowing for the representation of fluctuating number of users travelling on OD pairs at different times of the day.In this way, if we determine the maximum flow from the source to the sink of our graph over a finite time horizon (in our case study, 24 hours), we determine the maximum (daily) charging demand that can be satisfied by the current infrastructure.Note that, in order to identify if a potential station location is interesting, we can add a list of candidate locations to the flow graph, following a similar approach as with existing stations.For instance, when generating the flow graph, it is possible to encounter OD pairs with no arc connected to a station.The demand from such an OD is referred to as impossible demand.Therefore, it would make sense to have in the list of potential new stations one or more locations close to the said OD pair; if we open at least one of these stations, it would guarantee an increase in the overall satisfied demand.
Formulation We are ready to provide the linear program corresponding to the maximum flow of the described graph.
Figure 2 provides a visual summary of the notation used for the sets of arcs (continuation of the example of Figure 1).
Our maximum flow problem is the following linear program: The objective function (1a) is the sum of charging flow leaving the source.Since the flow Constraints (1b) and (1c) guarantee that the amount of flow reaching the sink is equal to the amount leaving the source, this objective function is equivalent to the total amount of charging flow in the graph.Indeed, the flow Constraints (1b) and (1c) ensure that the amount of charging flow entering into the OD pairs is the same amount leaving and the amount of charging flow entering the stations is the same amount leaving, respectively.Constraints (1d) limit the flow from the source to each OD pair to the charging demand for that specific OD pair within a given period.This charging demand is equal to the number of EV users travelling on that OD pair multiplied by the charging flow demand per user.For example, let a flow f be the average kilowatt per second consumption of an EV and p the length of a period in seconds, the charging flow demand of a user is f • p.If we multiply that value by the number of EV users in an OD, we obtain the complete requested charging flow for that OD.Constraints (1f) limit the amount of charging flow supply that can be provided at each station.

Mixed-Integer Model: Placing Stations and Outlets
In the previous section, we described our model for the assignment of the demand to stations.Next, our objective is to introduce new stations and outlets that remain available throughout all periods, with the aim of diminishing the existing unsatisfied demand (or, equivalently, increase the satisfied demand).It is worth noting that our approach assumes that all stations and outlets are built from the beginning, rather than gradually over time.We integrate into Program (1) the decisions related to the opening of new stations and addition of outlets, leading to the following mixed-integer program:  I (2)  e y (2)  e + J (2)  e z (2)  e + I (3) e y (3)  e + J (3)  e z (3)   e The objective function is the same as before.The constraint (2b) enforces the costs of new stations and outlets to be below a given budget.Constraints (2c) are the same as Constraints (1c) but for candidate stations instead.Constraints (2d) adapt Constraints (1f) to account for newly added outlets.
The number of new outlets is multiplied by a factor P e to convert them into flow.Constraints (2e) limit the maximum amount of flow that can travel to candidate stations by the amount of new level 2 or level 3 outlets.Constraints (2f) limit the maximum amount of newly added outlets to an existing station by subtracting the already existing number of outlets from the maximum number possible.
The parameters Y e and the variables x e are relative to the level of the station e they are associated with.If a station is level 2, only level 2 outlets can be installed and the same applies to level 3. Constraints (2g) and (2h) limit the number of outlets according to whether a new level 2 or level 3 station is built.Due to Constraints (2i), a new station can only be level 2 or level 3 but not both.
In the rare case where there are level 2 and level 3 outlets at an existing station, that station is considered as two separate stations in the same location.Constraints (2j) and (2k) set the domains for variables x, y, z.

Computational Experiments
In this section, we aim to validate the use of our linear program to estimate station demand and the efficiency of solving our mixed-integer model for real-world instances.Hence, we start in Section 4.1 by detailing our case study of the island of Montreal.Then, in Section 4.2, we show experimental results of our linear model when it comes to matching users to existing stations.Finally, in Section 4.3, we provide experimental results for solving our mixed-integer program, modelling the addition of new stations and outlets.All experiments are run on an Intel i7-10700F CPU @ 2.90 GHz with 8 cores and 16 GB of RAM.We use CPLEX Optimization Studio V22.1.0on a single thread per instance and a 30 minute time limit.

Montreal Case
Data We focus our experiments on the island of Montreal.For this case study, we obtained data about the location, level and number of outlets for existing public stations of the Le Circuit électrique and the time, duration and average kilowatts per second (kW/s) for charging sessions at these stations.
In our data, there are 841 level 2 stations and 41 level 3 stations on the island.The maximum number of outlets within a station is 16 and 7 for level 2 and level 3 stations, respectively.Figure 3 provides the distribution of outlets per station.We tested two sets of periods: (1) a single time horizon of 24 hours and (2) the same horizon discretized into 6-hour periods.The goal is to find the impact of relaxing the demand over 24 hours, i.e., of assuming that the demand can be satisfied at any moment of the day.Figure 4 shows that for level 2 stations, a substantial percentage of the energy provided is to users who leave their vehicles to charge overnight.However, level 3 stations are used uniformly throughout the day as they are more expensive and thus less popular for overnight charging.As such, accounting for fluctuations of the charging demand over the day will result in more accurate modeling of the satisfied demand, which is expected to better inform the placement and sizing of stations.Indeed, using a 24-hour relaxation should overestimate the satisfied demand in comparison with the same discretized horizon, since users can be forced to charge at inconvenient times.
We also used the publicly available data of the 2018 OD survey2 of the Montreal region collected by the ARTM.This data provides the average number of trips between each pair of Montreal boroughs within a day.These trips are not limited to EVs, but can be used as a reasonable approximation of users' movements.We only consider the boroughs within Montreal which leaves us with 32 different boroughs (see Figure 5).

Generation of instances
Based on the described data, we now detail the process used to generate instances, namely, the sets and parameters of Table 1.To begin, we need to decide on two parameters: R and W . Recall that the parameter R indicates the maximum distance a user is willing to walk between their origin or destination and a charging station.In our framework, each OD pair could  have its own radius, however, we use the same radius for all of them since we do not dispose of individual user information related to their willingness to walk.We limit our radius between 400 and 700 meters based on research done on the acceptable walking distance for public transit stops and stores [42,43,44,45].The parameter W stands for the number of randomly generated (latitude, longitude) points in an instance.More concretely, these randomly generated points serve to create OD pairs, where each point is both an origin and a destination.We generate points relative to the density of EV users charging in each borough (session data).In principle, we want to have a number of points W capable of covering the entirety of the urban area relative to the radius R. In practice, however, this would require far too many points or an unrealistically large radius.As such, we try a different number of (randomly generated) points to test the sensibility of our model.In the rest of this section, we provide a simple example to explain each step of our instance generation process and conclude with a summary of the combination of parameters used to generate instances.Figure 6 is a simple map with two borrows (Ω and Λ), containing three randomly generated points in red and two stations represented by the blue squares.Each point has the same radius R. We can convert Figure 6 into a bipartite graph.Figure 7 gives a visual representation of the transformation.
Our model provides the option to use any kind of data as the flow.We use kW since our dataset contains the kW/s per charging session.To calculate the maximum flow capacity of existing stations, we use the session data to estimate the average kW/s per session for each outlet.For each station, we sum up the outlets' kW/s per session to get the maximum kW/s per station.This value can be multiplied by the length of the periods to obtain the maximum flow capacity per period of a station.
To calculate the C e parameters of our example, we take the average of kW/s per session from Table 2 for each station: 5 kW/s for station 1 and 4 kW/s for station 2. If we let our time horizon be a single 24-hour period, then the total flow supply is 5 • 3600 • 24 = 432000 kW and 4 • 3600 • 24 = 345600 kW for stations 1 and 2, respectively.For our example, we assume that each station only has one outlet.To calculate the maximum flow capacity per OD (i.e., the demand), we start by calculating the daily average kW that is being used within a period for each station.We sum this supplied kW for each borough; this gives us the amount of supply per borough.From there, we need to convert the supply into its original demand per borough.Here, we combine the use of session data with the Montreal OD data to calculate the percentage of EV users travelling between two boroughs.This forms a set of linear equations: i∈H q i p j i = r j ∀j ∈ H where H is the set of Montreal boroughs.In this set of equations, r j represents the total amount of supply at each station within borough j.The coefficient p j i is the percentage of people travelling from borough i to j.Our variable is q i which is the total amount of demand in borough i.To calculate the amount of demand on each OD, we simply compute q i • p j i + q j • p i j for each borough i and j.We assume that most people leave in the morning and come back at night, resulting in bidirectional flow.This assumption is realistic, as most intracity trips occur between home, work and public places.If we want to account for unidirectional trips (which would allow to enforce users to charge only at the origin or only at the destination), we would simply need to duplicate each OD vertex.We distribute the previously computed demand uniformly between each OD pair with the same origin and destination.We also account for trips within the same borough by computing q i • p i i .
Table 3: Example of an OD matrix In this way, to calculate the A t e parameters of our example, we can take the average session duration from Table 2 per station over our 24-hour period.We assume for this example that all sessions are from the same day.This implies 110 • 5 = 550 kW for station 1 and 100 • 3 + 10 • 5 = 350 kW for station 2. We sum all supplied kW within the same borough.Since station 1 and 2 are in different boroughs, the Λ borough has 550 kW of supply and the Ω borough has 350 kW.Using the OD matrix of Table 3, we can write two equations: 0.5q Ω + 0.25q Λ = 350 and 0.5q Ω + 0.75q Λ = 550.Solving this set of equations gives us q Ω = 500 and q Λ = 400.This implies that we have 500 kW of demand in borough Ω and 400 kW in Λ.The resulting demand flow is as follow: between Ω and Ω, 0.5q Ω = 250 kW, between Ω and Λ, 0.5q Ω + 0.25q Λ = 350 kW and between Λ and Λ, 0.75q Λ = 300 kW.We combine the flow from Ω to Λ and from Λ to Ω, since we make the assumption that our flow is bidirectional.Finally, we split these flows between each point to obtain the flow for each OD pair: AC has 250 kW, AB has 175 kW and BC has 175 kW.It is worth noting that in this example, we lost 300 kW of demand because we cannot represent the flow between Λ and Λ since we only have a single point in that borough.In practice, we generate a critical mass of points to guarantee at least 2 points in each borough.This gives us the final flow graph in Figure 8.
We do not have a list of potential locations, so we use impossible demand to create candidate locations.Recall that impossible demand is the demand generated by an OD vertex with no edges to any station in the bipartite graph.This demand cannot be satisfied, and as such, considering a candidate location near it is likely a good possibility.To do so, we add two candidate locations for each impossible OD demand: one at the origin and one at the destination.Note that any OD vertex within the defined radius R of a candidate location gets an outgoing arc to that location, including the OD vertex related with the impossible demand.In our example, the OD pair AB does not have any valid station.As such, we would add two candidate locations: one at A and one at B. This means both OD pairs AC and BC would also gain a new station.The kW/s given to the new station is based on an average across all stations of the same level.If we assume all stations in our example are of the same level then a new station would have ≈4.33 kW/s.
We do not have data about the cost of adding outlets or building new stations since the price can vary widely based on the location and electricity grid availability.As such, for our testing, we use arbitrary costs guided by reasonable considerations.We attribute to the addition of a level 2 outlet (to an existing station or a new one) a cost of 1.A level 3 outlet is twice that.Building a new level 2 station is 10 and a level 3 is 100.To account for these arbitrary costs, we run our experiments on multiple budgets ranging from 0 to 700 to perform a sensibility analysis of our MILP.
Having described our process for utilizing the data to generate the flow graphs and established the budget constraint, we now proceed to outline the various instances we create in accordance with the aforementioned procedure.We consider instances with R ∈ {400,500,600,700}, where the unit is meters, and with W ∈ {100,150,200,250,300}.For each combination of the R and W values, we generated 5 instances, where only the location of the W random OD points differ.In each instance, the set S 1 contains the same 882 stations, while the set of candidate locations S 2 can vary depending on the OD pairs (recall the description above).For W = 100, 150, 200, 250 and 300, the instances have 4,950, 11,175, 19,900, 31,125 and 44,850 ODs (i.e., the cardinality of set O) and an average of 43.4,65.8, 92.2, 117.4 and 141.8 candidate locations, respectively.In the next sections, we provide average results over the 5 generated instances for each (R,W ) pair.All the results are shown as a percentage of the total (average) kW charging demand, i.e., t∈T e∈L A t e .

Assigning Demand to Stations
Our first tests are meant to evaluate the impact of the radius R and of the number of points W on Program (1).The goal is to assess the sensitivity of satisfied and impossible demand to those parameters, analyze the service of the current infrastructure, as well as to identify a suitable value of W that balances the model accuracy and computational efficiency when incorporating location and sizing decision.Note that larger values of W allow a greater diversity of OD scenarios, but lead to larger optimization problems.
In Figure 9 (the y-axis of figure (a) begins at 60% for better readability) and Figure 10, we present our results for the satisfied and impossible demand3 separately for two cases: one where a single period is considered, and the other where a day is discretized into 4 periods.In both cases, we observe that the satisfied demand increases as the number of points (W ) increases, and then stabilizes.This is to be expected since the closer the number of points gets to the real number of EV users, the more accurately we depict the coverage of the territory by the existing infrastructure.Importantly, it appears that a relatively low value of W suffices to capture the prevailing charging station coverage, which has a direct impact on the number of variables and constraints of Program (2), analyzed in the next section.Similarly, an increase in the radius R results in an increase in satisfied demand.This can be attributed to the fact that a larger radius provides each OD with a greater number of station options to choose from.However, in contrast to the number of points W , opting for a larger radius distances us from reality, given that fewer individuals are expected to be willing to walk 700 meters compared to 400 meters.The larger radius can also be perceived as a compromise in service quality (coverage).Independently of that, any increase in the number of points or radius is limited by the amount of demand that can be satisfied.If the stations provide enough supply, the limiting factor becomes the impossible demand.It is worth noting that since our demand generation is closely related to the amount of supply (recall Section 4.1), it makes sense that we are able to satisfy most of the demand for these instances.On the flip side, increasing the radius reduces the impossible demand.This can be explained by the fact that a larger radius increases the covered area, meaning ODs are less likely to have no nearby stations.A less intuitive result is the fact that increasing the number of points does not affect the impossible demand.The reason behind this comes from the stochastic nature of our points' generation.If we have two instances with 100 points and 20% of impossible demand each, if we assume that both instances do not have overlapping points which is statistically likely, then combining both instances into one leads to a 200 points instance with 20% impossible demand.This only works if the 100 points instances are correctly predicting the total impossible demand of the network from the start.
The main difference between the two cases in these figures is in a slightly lower satisfied demand when we consider the four 6-hour periods.This is because the unsatisfied demand in each period cannot be satisfied in others, modeling an implicit constraint on when users are willing to charge.In the 24 hours instances, users can charge at any point of the day which is unrealistic.With four blocks of 6 hours, we can more easily reflect when users are looking for a station.However, it should  be noted that adopting a more granular discretization would lead to more variables and constraints in our models.Moreover, this might also necessitate the incorporation of charging over consecutive periods (if time blocks are small).The impossible demand is exactly the same in both cases.This is because the impossible demand does not change within a day (we have the same OD pairs over the time horizon).
Tables 5 and 6 give a brief overview of the amount of demand satisfied at each period.The purpose of these results is to analyze their similarity with regards to the actual satisfied demand of Table 4.In other words, we aim to understand if the charging habits over the time periods are similar.In our results, we note that level 3 stations tend to mirror the satisfied demand of level 2 stations.This is because we do not model charging habits, i.e., users preferences.For instance, during the period 0h-6h, level 3 satisfies more demand than in the other periods because in our instances (and session data) there is more demand over this period and there is no user preference making users to favour level 2. This could be improved to better match reality by either changing the capacity of level 3 stations during certain periods or introducing flow costs associated with the use of certain stations.For the tables with the other radii, we refer to Appendix A.1; the result trend is analogous.Figure 11 shows a solved instance, where all points with unsatisfied and impossible demand are visible.The impossible demand becomes more prevalent as we go west, away from downtown.The closer we get to downtown, the impossible demand turns to unsatisfied demand.Near downtown, the unsatisfied demand is nonexistent with no points visible since all demand is satisfied.

Adding and Expanding Stations
Our second set of tests is meant to evaluate the computational performance when solving our model, Program (2), for the installation of new stations and outlets.For these experiments, we exclusively focus on instances with R = 400 meter radius, as it offers the greatest flexibility to users.In other words, this radius allows for a concentration of stations in close proximity to users.We take the instances with W = 100, 150 and 200 random points to analyze the sensitivity of the optimal objective value (satisfied demand) to the number of points, while keeping the size of Program (2) reasonable.
As explained in Section 4.1, we use the impossible demand to identify a list of candidate locations S 2 .Figures 12 and 13 provide our results for the case with a single period and for the case with 4 periods.We can remark two trivial cases.The first is when the budget is 0, which simply results in the linear model since no station or outlet can be added.The second is when the budget is so large (G ≥ 700) that we can add as many stations and outlets as necessary to satisfy all the demand, both The points' size represents the unsatisfied demand and the colour represents the impossible demand (the larger and darker, the higher).Remark that points can have both unsatisfied and impossible demand as they are related to a set of OD pairs.unsatisfied and impossible.The interesting cases lie in the middle, where instances with different numbers of points W have similar percentages.This can be explained by the fact that the impossible demand is relatively stable among instances (recall Figures 9(b) and 10(b) for R = 400 m) and, as such, adding a budget reduces impossible demand by similar amounts.We can observe that solving instances with an increasing number of points W , tens to lead to higher computational times and optimality gaps.Therefore, going beyond a W value exceeding 200 points is anticipated to substantially increase computational times.The dips in the graphs are related to the high variance between instances (refer to the appendix A.2 for detailed results).
In Figures 12 and 13, the main difference between the single and the multi-period cases is on the solving times and optimality gaps, with the multi-period one performing worst on both metrics.This is not surprising as the multi-period instances result in larger mixed-integer programs.With respect to the percentage of satisfied demand, the single and multi-period instances seems similar.In fact, the satisfied demand in the multi-period case is overall lower by at most 4.23% and on average 1% less.Although these differences are small, it is important to note that this comparison is not entirely fair, given that the instances are fundamentally distinct due to their utilization of different time discretizations.For this reason, we evaluate the location and sizing decisions of solutions derived from single-period instances within the more realistic multi-period program, resulting in Figure 14.We observe a discrepancy of up to 5.28% and an average of 2.75% less satisfied demand compared to the multi-period solution (Figure 13).This shows that accounting for the time component of the charging location and sizing problem is meaningful.
While analyzing the solutions to our instances, we observed that for the Montreal case, our model   tends to prioritize the addition of level 2 outlets to existing stations and the addition of level 2 stations, as we increase the budget.In fact, among the solved instances, no solution included the addition of level 3 outlets or stations.This can be explained by the fact that the existing infrastructure is mostly sufficient to sustain the already existing demand.As such, the majority of the budget is spent providing a sparse amount of supply in undersupplied areas.Based on our cost parameters, level 3 stations are simply too expensive for this specific use case.Figure 15 is an example of this behavior.

Conclusion
In this work, we propose a maximum flow-based formulation for modelling the problem of locating and sizing EV charging stations in an intracity context.By solving our mathematical programming model, we are able to optimize the placement of new stations as well as to evaluate their expected usage (i.e., the charging demand they satisfy), within a densely populated city.Performing such an evaluation can be computationally expensive due to the large number of users, existing stations and candidate locations.However, our key contribution, the transformation of the charging demand assignment to stations into a maximum flow problem, allows for the scalability of our approach.To the best of our knowledge, we present the first approach capable of handling realistically-sized instances, multi-period instances with an exact algorithm.This improves upon single-period, exact methodologies (e.g., [20], [37]) and multi-period, heuristic methodologies (e.g., [18], [14]) from the  Our mathematical programming models are run based on real-world data.Concretely, the linear model can evaluate the quality of service provided by an already existing network of stations in terms of satisfied demand.Moreover, it can be used to identify impossible demand and hence, locations where the installation of new stations would be desirable.The mixed-integer model can take a list of candidate locations and return the most promising ones or increase the capacity of the already existing infrastructure given a budget.We also demonstrate the impact of discretizing a 24-hour period to account for highs and lows in demand over a day.
For the application of our approach to the case study of the island of Montreal, the data needed was the charging session records of all the existing infrastructure and the daily OD travels across all boroughs.We show that the current infrastructure would not require a large increase in supply to satisfy all the demand at the moment.However, despite providing enough supply, the network does not provide uniform quality of service across the island, resulting in certain regions having limited access to public charging facilities.
In practice, our methodology should be especially useful for infrastructure owners to identify limitations in their provision of charging, namely, regions with impossible and unsatisfied demand.The direct use of our optimal expansion decisions must be cautiously analyzed for each specific application as simplifications were made for sake of tractability.
Further research could focus on the integration of our maximum flow model into EV charging stations placement problems using other objectives such as cost minimization.This would result in a bilevel program with a maximum flow problem at the lower level.Another important aspect would be the integration of power grid constraints, which could restrict candidate locations.Concerning the modeling of the assignment of the demand to stations, an aspect for future consideration is to account for user preferences over stations (or locations), instead of assuming that the demand is effectively spread (e.g., through a real-time app).This could be potentially done by assigning weights to the arcs of our flow network.Another line on research could be to further explore the best way to discretize a day to properly reflect reality.On the same topic, although we consider a time horizon for our flow model, we do not allow for flow to travel between consecutive periods, which could occur in practice.Finally, expanding our approach to handle both the intracity and intercity cases would allow for a more complete modelling of the optimal location and sizing of EV charging stations problem.

T 1 2 1 2 e
Set of time periods V Set of vertices {1,2, ..., N } where 1 is the source and N is the sink O Subset of vertices representing OD pairs S Subset of vertices representing existing stations S Subset of vertices representing candidate locations L Subset of arcs representing the charging flow demand of users per OD pairs M Subset of arcs between OD pairs and stations R Subset of arcs representing the charging flow supply at an existing station R Subset of arcs representing the charging flow supply at a candidate location Parameters A t Charging flow demand of an OD in period t for e ∈ L Ce Charging flow supply at an existing station e ∈ R 1 I Cost of installing an outlet to a new level 2 or 3 station in location e ∈ R 2 J Cost of building a new level 2 or 3 station in location e ∈ R 2 Ke

a te
Amount of charging flow demand generated by an OD in period t for edge e ∈ L b t e Amount of charging flow going from an OD to a station in period t for edge e ∈ M c t e Amount of charging flow supply going through an existing station in period t for edge e ∈ R 1 d t e Amount of charging flow supply going through a candidate location in period t for edge e ∈ R 2 xe Number of outlets to add to an existing station e ∈ R 1 y Number of outlets of a new level 2 or 3 station e ∈ R 2 z

e 1 3 • e 2 4 • f 1 4 • f 2 Figure 1 :
Figure 1: Converting a bipartite graph to a flow graph Example: The bipartite graph on the left has two ODs, each with 2 and 3 EV users, and two stations, each with 4 outlets; the edges represent the feasible stations.On the right, we have the transformed flow graph, where in some of the arcs we have their maximum flow capacity related to EV demand and station supply; the conversion factors e 1 and e 2 map users to flow, while f 1 and f 2 map outlet supply to flow.

Figure 3 :
Figure 3: Distribution of the number of outlets per station

Figure 4 :Figure 5 :Figure 6 :
Figure 4: Distribution of the daily average percentage of energy supplied per station per 6-hour period

Figure 7 :
Figure 7: The bipartite graph representation of Figure 6

Figure 8 :
Figure 8: Example of a flow graph

Figure 14 :
Figure 14: Single period results with multi-periods evaluation

Figure 15 :
Figure 15: Map of Montreal with only new stations and new outlets (R=400, W=200, G=100) The blue points represents existing level 2 stations and the orange ones are new level 2 stations.The size of the points corresponds to the number of outlets added.No level 3 stations are expanded or opened.

Table 2 :
Example of session data

Table 4 :
Percentage of demand per station for each time period (Figure4)

Table 5 :
Percentage of satisfied demand assigned to level 2 stations per time period with a 400 meter radius

Table 6 :
Percentage of satisfied demand assigned to level 3 stations per time period with a 400 meter radius

Table 8 :
Percentage of satisfied demand assigned to level 3 stations per time period with a 500 meter radius

Table 9 :
Percentage of satisfied demand assigned to level 2 stations per time period with a 600 meter radius

Table 10 :
Percentage of satisfied demand assigned to level 3 stations per time period with a 600 meter radius

Table 11 :
Percentage of satisfied demand assigned to level 2 stations per time period with a 700 meter radius

Table 12 :
Percentage of satisfied demand assigned to level 3 stations per time period with a 700 meter radius Tables 13 to 18 provide detailed results with respect to the satisfied demand, solving times and optimality gap for each of our instances.

Table 13 :
Satisfied demand for Program (2) over a single period

Table 16 :
Satisfied demand for Program (2) over multiple periods