Optimizing Vehicle Replacement in Sustainable Urban Freight Transportation Subject to Presence of Regulatory Measures

: Since the 1990s, studies and pilot tests have been conducted to reduce trafﬁc, accidents


Introduction
The continuous growth of the urban population is a global phenomenon, with the European Union projecting an increase in the proportion of urban residents from 55% in 2018 to 68% by 2050 [1]. This rapid urbanization, coupled with the rise of globalization, economic development, e-commerce, and omnichannel retailing, has led to a significant surge in urban freight transportation (UFT) [2,3]. However, this upsurge in UFT has also brought forth various challenges and concerns, including emissions, air and noise pollution, traffic congestion, accidents, and damage to road networks [3][4][5]. The implications of these issues are particularly pronounced in city centers, where a substantial portion of freight movement occurs. It is estimated that approximately 20-25% of truck travel distance in urban areas is dedicated to outgoing freight, 40-50% to incoming freight, and the remainder consists of movements between depots and destinations within the city [6]. Furthermore, city centers often face limited parking spaces and narrow streets, exacerbating the problems associated with freight delivery using large vehicles. The resulting congestion and emission issues not only hinder efficient freight transportation but also impact the livability and sustainability of these urban areas [7].
In response to the growing concerns surrounding UFT, various studies and pilot tests have been conducted since the 1990s to mitigate traffic, accidents, and pollution. These efforts have resulted in the implementation of policies, regulations, and restrictions for UFT operations, such as low emission zones, delivery time windows, and limitations on vehicle size and weight [8][9][10]. Consequently, access to city centers for certain types of vehicles has become restricted due to measures established by local authorities to improve traffic flow and reduce emissions [11][12][13]. As a result, urban freight operators must carefully consider these restrictions when determining their fleet composition. This involves selecting the appropriate number and types of vehicles with the necessary capacity and cost-effectiveness to meet customer demands within restricted areas and beyond. It is crucial for UFT companies to periodically assess and optimize their strategies for utilizing each vehicle type, minimizing associated costs, and maintaining service levels [13,14].
UFT is fundamental for the economy of cities and the quality of life of those who live and work there. However, by providing necessary goods and services, freight transport has a detrimental impact on urban areas. To overcome these impacts, policymakers should promote regulatory measures for UFT that attempt to balance the economic, social, and environmental impacts of UFT operations [15].
Various regulatory measures, mainly to control the type, size, and load factor in terms of lower carbon emissions, weight, volume, and the number of parcels to deliver to the customer's point of use, have already been implemented to control UFT in the inner city [13]. Comi et al. [16] state that the goal of the regulatory measures is mainly social, such as reducing congestion to expand accessibility and efficiency in goods delivery and related activities. The authors analyze the existing regulatory measures in Rome and Milan and present a theoretical framework to highlight and identify accessible regulations to control vehicle movements. Nuzzolo and Comi [12] analyzed the effectiveness of the measures set by Rome's administrators on the types of freight vehicles in the inner city areas between 1999 and 2008. Under these enforced measures, they showed that the proportion of environmentally friendly vehicles in the freight fleet has increased over time. The use of electric vehicles (EVs) for delivering goods and parcels to customers in urban areas has received more attention from urban policymakers and private stakeholders [17][18][19][20]. For instance, small EVs could be a viable alternative for delivering goods and services within congested urban areas due to their small size and reduced environmental impact. Small EVs are more suitable for urban distribution and last-mile deliveries because of their battery limitations [21][22][23]. In another research study by Dablanc [24], the author studied the challenges of transporting goods in large European cities. The author proposes to fix and implement simple regulations in cities for UFT and indicates some decision-making processes, such as identifying measures based on truck age, environmental performance, weight, and size.
The European Commission [25] presented and evaluated methods and measures mainly focused on optimizing the operation of truck fleets in highly congested cities, such as the application of modern devices and appropriate administrative measures, to optimize truck use in the cities toward achieving economic and environmental benefits. Implementing regulations based on the weight and dimensions of vehicles operating in cities could be a very effective measure. Lindholm [11] has concluded that the current models for UFT mainly focus on transport planning or short-term measures. The author identified the need to develop sustainable measures to manage the lack of applicable restrictions for a long-run perspective method in UFT.
A study by Lebeau et al. [18] analyzed the total cost of ownership (TCO) and competitiveness of light commercial vehicles and quadricycles in the UFT. The study found electric quadricycles to be a better solution to shifting from light diesel vehicles to electric vehicles. The authors considered the effect of utilization level and battery life on TCO and the manner of changing the competitiveness of EVs in the future market. Crist [19] studied the TCO of internal combustion engine vehicles (ICEVs) and EVs and the effect of utilization levels on the competitiveness of those vehicles. The author shows that high levels of utilization have a positive impact on the vehicle's cost. The study shows that, considering a 15-year planning horizon, EVs (vans) in France would cost about 4000 EUR less than diesel vehicles Sustainability 2023, 15, 12266 3 of 18 (DVs). Currently, EVs are more suitable for urban distribution and last-mile deliveries because of their battery limitations [21,22]. Nina [26] performed a cost-benefit analysis of C-segment passenger EVs in Portugal by considering user and social factors. From a user point of view, it compares EVs with ICEVs by considering factors such as acquisition and resale, maintenance, energy, insurance, periodic inspection, and vehicle-to-grid. From a societal point of view, the author compared local and global greenhouse gas emissions between EVs and ICEVs. The work also considers the contribution of technologies, tax incentives, and governmental support in reducing energy import dependency as the most important goal.
Despite the extensive research conducted in the field of UFT, there is a notable gap in addressing the challenges posed by regulatory measures imposed by urban policymakers on vehicle size and type for operating in different areas of a city. To bridge this gap, this study aims to guide urban freight operators in identifying the optimal fleet configuration and investment strategy for introducing new vehicles of specific types and sizes into their fleets to comply with regulatory measures. In pursuit of this goal, we present an innovative optimization framework designed to reconfigure the fleet of an urban freight transport operator over a planning period, taking into account the regulatory measures imposed by urban policymakers. The proposed framework considers vehicle characteristics and determines the appropriate number of vehicles of each type to be used, purchased, or salvaged in each year of the planning period. Notably, the framework addresses the novelty of incorporating urban restrictions set by policymakers regarding vehicle size and type in different zones of an urban area, as suggested by Maxner et al. [13].
By utilizing this optimization framework, urban freight operators can make informed decisions regarding fleet reconfiguration, ensuring compliance with regulatory measures while optimizing operational efficiency and cost-effectiveness. This study's outcomes can potentially enhance the sustainability and effectiveness of UFT operations within urban areas.
The rest of the paper is organized as follows: Section 2 reviews the fleet replacement problem; Section 3 describes the studied problem, its formulation, and the data sources and assumptions; Section 4 presents and discusses computational results; and Section 5 presents the conclusions and implications.

Fleet Replacement Problem
The desire to determine an optimal charter to guide vehicle replacement, particularly in the urban freight fleet, has resulted in multiple studies. One basic approach to managing vehicle replacement is to find optimal replacement strategies by considering related total costs (TCs) [27]. Redmer [28] developed a deterministic replacement model by considering the reduction in utilization level by age. Rees et al. [29] proposed an optimization model for police patrol vehicle replacement analysis and planning by considering a network simulation model with probabilistic transition times. In another study, the authors present a vehicle replacement optimization model for the motor carrier by using actual data and presenting a sensitivity analysis to test the effect of changes in vehicle resale values and insurance costs [30]. Kim et al. [31] proposed an automobile replacement model for determining the optimal vehicle age by analyzing life cycle inventories for different vehicles. Their model considers several variables: material production, manufacturing, use, maintenance, and end-of-life environmental impact. Emiliano et al. [32] developed an optimization replacement by solving an integer linear programming problem to indicate different types and ages of diesel buses over a period of 50 years, considering budgetary and environmental constraints. The results show the possibility of emission reduction with a low annual budget using an optimal replacement policy.
In addition, several studies have investigated the combination of fleet replacement with fleet management problems, such as fleet sizing problems (FSPs), composition problems (CPs), and vehicle routing problems (VRPs) [30,[33][34][35][36]. Raposo et al. [37] have suggested a solution for the replacement problem that is combined with FSP by develop-  [21] propose a deterministic, integer linear programming model combining the replacement problem with the FSP in commercial fleets, comparing EVs and DVs. In another study, the authors proposed an optimization framework to find the optimal mix in bus fleets by solving an integer linear programming model that combines the replacement problem with the FSP and VRP [34].
While various studies have been conducted on fleet replacement problems and achieving optimized vehicle replacement frameworks to some extent, to the best of our knowledge, no research has been carried out on regulatory restriction as an important factor in fleet replacement problems.

Problem Setting
In this paper, we assume that an UFT operator wants to select the best strategy for the vehicle composition of their fleet over a specific planning time period. It is assumed that city administrators have regulated the size and type of vehicles that can operate in specific city zones. As a result, the operator must choose vehicles that comply with such restrictions. The city area is divided into different zones based on regulatory measures. In particular, we consider rectangular nested zones [38]. We assume the operator will use a single vehicle type in each zone for operational convenience. The operator must determine the best vehicle replacement strategy while minimizing its TC over a given planning period. Various factors, such as the characteristics of vehicles, related costs, and demand levels in each zone, are incorporated into the model. The model output will determine the type and number of vehicles of each size that need to be purchased and used for operating in various city zones in each year of the planning period. In addition, it will determine the number of vehicles of any type and size that should be salvaged in any year of the planning time period. The works of Feng and Figliozzi [21] and Tipagornwong and Figliozz [20] inspired the derived model, a mixed-integer linear programming model, which will help the operator derive an efficient composition of vehicles for his fleet to operate in different city zones.

Formulation of the Problem
As stated previously, the objective is to minimize the TC of a fleet over a time period operating in a city area divided into different zones with different regulatory measures. The TC consists of different cost components such as energy, operation, maintenance, purchase, and emission costs. In all cases, the costs are accounted for at the beginning of the planning horizon.
The fleet composition is determined for the years t = 0, . . . , T. Given vehicle types k = 1, . . . , K, for allowed vehicle ages of the i = 0, . . . , A k . The considered urban area is divided into z = 1, . . . , Z zones.
The decision variables are as follows: • x z itk : number of vehicles of type k and age i used in zone z during year t; • y itk : number of salvaged vehicles of type k and age i at the end of year t; • p tk : number of vehicles of type k purchased at the beginning of year t.
The objective function comprises all TC parcels, namely, the purchase costs, energy costs, maintenance costs, emission costs, and salvage revenue. In what follows, we describe each parcel of the cost.
Purchase Cost: v k,t is the purchase cost (EUR) per unit of type k vehicle at the end of year t. The discount rate dr accounts for the decreased value of money over time.
f z itk represents energy cost per kilometer (EUR/km) of vehicle type k of age i in year t in serving zone z, and u z ikt is the annual distance traveled (kilometer per year) of vehicle type k in zone z during year t.
The following formula, adapted from Daganzo [39], will be used for calculating the distance traveled by all vehicles in zone z during year t: r z is the average distance from the depot assigned to zone z to the center of the zone, c k is the number of customers that are served by vehicle type k, A z represents the area of zone z, and n z t represents the number of customers in zone z during year t. Maintenance Cost: where m i,t,k represents per-km operation and maintenance cost (EUR/km) of vehicle type k of age i during the year t. Emission Cost: where e z itk represents CO 2 emission cost (EUR/km) of vehicle k of age i, in year t, and zone z. Salvage revenue: where s itk represents salvage revenue (EUR) of vehicle k of age i in year t. Labor cost: where l kt is labor cost (EUR/year) associated with a vehicle of type k. Objective function: Therefore, the objective function, TC, is as follows: In the following, we present the constraints of the problem. The total of all newly purchased vehicles in period t must be lower than budget b t of that year: Furthermore, the total kilometers traveled by all used vehicles cannot be lower than the demand of each zone every year: where d z t represents the demand of zone z at each year t. The number of newly available vehicles of type k and the number of newly purchased vehicles of type k ( p 0,k ), must be greater or equal to the number of used new vehicles of the corresponding type: where h 0,k represent new vehicles of type k available in the existing fleet at the beginning of the planning period. At the beginning of the planning horizon, the number of used and salvaged vehicles should be equal to the number of existing vehicles in each zone: In any year on the planning horizon, the number of purchased vehicles of any type should be equal to the number of used new vehicles in that zone: In each year, the number of used vehicles of any type should be equal to the number of used and salvaged vehicles in the following year: At the end of the last year on the planning horizon, all the vehicles will be sold: No vehicle will be used again when it reaches its maximum age: No newly purchased vehicle will be salvaged in the first year of its lifetime: At each period, the number of purchased, used, and salvaged vehicles of type k that are not allowed to operate in zone z must be zero: K z is the set of vehicle types allowed to operate in zone z. Finally, the decision variables can take only non-negative integer values: To minimize the TC, the following mixed integer linear optimization problem needs to be solved:

Elasticity Analysis
Some input parameters have high uncertainty, which inevitably propagates to the TC [20,21]. These parameters are particularly affected by uncertainty during the planning horizon. For that, we adopted the arc elasticity formula proposed by Allen [40] and adopted in similar studies [20,21,41]: where EA(TC, p) is the elasticity of TC to parameter p.

Zone Characterization
We assume the regulatory measures divide the city area into three different zones, denoted by z1, z2, and z3, respectively ( Figure 1 and Table 1) [38]. Additionally, we consider zone z4 (out of zones) a suburban area where the depot point to supply the city can be placed. We presume the zones are nested with the same center and with the areas of A z .
are not allowed to operate in zone z must be zero: is the set of vehicle types allowed to operate in zone z. Finally, the decision variables can take only non-negative integer values: To minimize the TC, the following mixed integer linear optimization problem needs to be solved:

Elasticity Analysis
Some input parameters have high uncertainty, which inevitably propagates to the TC [20,21]. These parameters are particularly affected by uncertainty during the planning horizon. For that, we adopted the arc elasticity formula proposed by Allen [40] and adopted in similar studies [20,21,41]: where EA( , ) is the elasticity of TC to parameter p.

Zone Characterization
We assume the regulatory measures divide the city area into three different zones, denoted by z1, z2, and z3, respectively ( Figure 1 and Table 1) [38]. Additionally, we consider zone z4 (out of zones) a suburban area where the depot point to supply the city can be placed. We presume the zones are nested with the same center and with the areas of .  We considered that the zones where the depots are localized are known to the operator. As shown in Figure 1, we characterized these known depot points with D1, D2, and D3 for zones z1 to z3, and D4 for the outside of all zones. We do not consider depot-related costs such as handling, storage, operations administration, and general administrative expenses [42].    Table 2, and the main input parameters to determine the TC are in Table 3.   [46] 0.0582 0.0289 Energy consumption (R k , Q k ) [47,48] 0.062 L/km 0.145 kWh/km Energy cost [46] 1.167 EUR/L 0.167 EUR/kWh CO 2 emissions (Well-to-Wheel) [49,50] 2.63 kg/L 0.47 kg/kWh A daily utilization level of 64 km is assumed for both DVs and EVs, equivalent to 16,064 km per year, considering 251 working days a year. We considered a planning horizon of 30 years. The EVs considered in this paper use Lithium-ion batteries, which have a longer lifetime and, according to Emiliano et al. [32], have a lifetime of 240,000 km, equivalent to 15 years, considering a maximum utilization level of 16,000 km/year. Considering the predicted daily utilization, we assume only one battery will be required during the 15-year lifetime of the EVs. We included the battery and any other technology costs of EVs in their purchase costs.
To calculate the energy cost (euro/km), we use the following formulas: R k (L/km) and Q k (kWh/km) represent the energy consumption of DVs and EVs, respectively, as shown in Table 3. The values 1.16 and 0.16 represent the energy costs of DVs in EUR/l and EVs in EUR/kWh, respectively. Parameters f d and f e are the inflation rates of fuel and electricity prices, respectively, about 6% and 3% per year. These numbers were inferred in accordance with the yearly history of fuel prices from 1981 to 2014 and electricity prices from 2001 to 2013 in Portugal [46].
According to Adeniran [49], the average amount of well-to-wheel-produced CO 2 emissions by DVs and EVs is about 2.63 kg/L and 0.47 kg/kWh, respectively. The value of CO 2 emissions from EVs is the result of various types of power generation technologies. The emission costs of DVs and EVs with age i are calculated as follows [49]: ec represents the CO 2 emission cost of 25 EUR/ton [51].
For calculating salvage revenue, we use the following formula [19]: θ tk is the depreciation rate of vehicle type k, which is assumed to be 15% [21] for DVs and 19% for EVs, as reported in Ahani et al. [41]. The depreciation rate of EVs is lower than that of DVs because of their rapid development and the less mature market for second-hand EVs. According to Lee et al. [52], the total maintenance cost of EVs is half the maintenance cost of DVs. Thus, we use the following linear functions to estimate the maintenance costs of light vehicles [41]: We assume the maintenance costs of vehicles of medium and heavy size are as follows [53,54]: where m it3 and m it5 for MDVs and HDVs, respectively, and where m it4 and m it6 for MEVs and HEVs, respectively. Finally, based on the regulatory measures, it is assumed that LDV and LEV (i.e., k = 1 and 2) can operate in zone z1, which is the most congested zone. In zone z2, LDV, LEV, MDV, and MEV (i.e., k = 1, 2, 3, and 4) can operate. Finally, all six types of vehicles, LDV, LEV, MDV, MEV, HDV, and HEV (i.e., k = 1 to 6), can operate in zone z3.

Demand and Fleet Composition
We assume the company has an average daily demand of 270 customers distributed in the three zones, as shown in Table 4. The average demand for each customer is assumed to be 0.333 m3. Thus, based on the capacities given in Table 2 and considering that the vehicles operate fully loaded: • Light-size vehicles can serve c 1 = 6 customers; • Medium-size vehicles can serve c 2 = 12 customers; • Heavy vehicles can serve c 3 = 36 customers. In the first fleet configuration, the existing fleet composition is according to the demand and capacity of the vehicles assigned to each zone, comprising only DVs with two-and oneyear-old vehicles (Table 4), and the operator has a budget of 500,000 EUR for purchasing new vehicles in each year of the planning horizon; in the second configuration, there is no existing fleet, and the operator has a budget of 810,000 EUR for purchasing new vehicles in each year.

Results and Discussion
In this section, we report some experimental results for the presented optimization framework using the initial parameters and data described in the previous section as input parameters: total cost, fleet composition, and capacity. Additionally, an elasticity analysis is presented concerning several key parameters. The results comprise six scenarios regarding the locations of depot points combined with two existing fleet configurations. For every combination of scenario and fleet configuration, the optimization problem (20), which is a mixed integer linear optimization problem, is solved by solver Cplex of GAMS 2019 version 27.3 on a laptop computer with a CPU Intel core i3-4030U 1.90 GHz and RAM of 4 GB running Windows 10 64-bits, and execution time needed to perform is close to 0.62 s. Figure 2 presents the TC associated with the fleet over the time period of analysis for each scenario and both existing fleet configurations. Whatever the scenario considered, the TC with an existing fleet is always higher than when the company has no vehicles in its existing fleet. This reflects that without an imposed existing fleet and with a bigger budget, the model can optimize the fleet composition from the beginning of the planning horizon without the constraint of the existing fleet, thus obtaining lower costs. Therefore, the budget available to update the fleet is paramount to achieving lower UFT total costs over the considered time period, which is in line with Emiliano et al. [32] and Li et al. [34]. Moreover, considering the variation of the scenario, with or without the existing fleet, the TC increases from S1 to S4, which was expected, once the number of depot points is progressively reduced, increasing the distances between depots and clients, thus increasing the energy costs [55].   Figure 3 compares the fleet composition, considering the average usage of vehicles between scenarios S1 and S5. It shows the changes in the number of light, medium, and heavy vehicles in different zones. Particularly in zone z1, the change from medium and heavy vehicles to light vehicles and the decrease in their number highlight the impact of regulatory measures. Moreover, as expected, the TC in scenario S5 is the lowest (Figure  1), which can be explained by the absence of regulatory measures and the presence of depot points in all zones. This occurs because the distances are reduced, and without restrictions, it is more economical to use larger vehicles (Figure 3). These findings are important to fleet operators but also for urban policymakers, who must realize that regulatory measures, like those considered in this study, surge the costs of UFT, which can have a negative economic impact on urban areas under these measures [12].  Table 5 Figure 3 compares the fleet composition, considering the average usage of vehicles between scenarios S1 and S5. It shows the changes in the number of light, medium, and heavy vehicles in different zones. Particularly in zone z1, the change from medium and heavy vehicles to light vehicles and the decrease in their number highlight the impact of regulatory measures. Moreover, as expected, the TC in scenario S5 is the lowest (Figure 1), which can be explained by the absence of regulatory measures and the presence of depot points in all zones. This occurs because the distances are reduced, and without restrictions, it is more economical to use larger vehicles (Figure 3). These findings are important to fleet operators but also for urban policymakers, who must realize that regulatory measures, like those considered in this study, surge the costs of UFT, which can have a negative economic impact on urban areas under these measures [12].   Figure 3 compares the fleet composition, considering the average usage of vehicles between scenarios S1 and S5. It shows the changes in the number of light, medium, and heavy vehicles in different zones. Particularly in zone z1, the change from medium and heavy vehicles to light vehicles and the decrease in their number highlight the impact of regulatory measures. Moreover, as expected, the TC in scenario S5 is the lowest (Figure  1), which can be explained by the absence of regulatory measures and the presence of depot points in all zones. This occurs because the distances are reduced, and without restrictions, it is more economical to use larger vehicles (Figure 3). These findings are important to fleet operators but also for urban policymakers, who must realize that regulatory measures, like those considered in this study, surge the costs of UFT, which can have a negative economic impact on urban areas under these measures [12].  Table 5 Table 5 shows the number of vehicles of different types used in the fleet at the beginning of the planning time horizon, their average number, and their final number when the operator has an existing fleet. The existing fleet has different-sized vehicles, but they are all diesel. However, at the beginning of the planning horizon, the model reconfigures the fleet composition according to the budget available and the existing fleet, originating the initial fleet.  As mentioned, different vehicles are permitted to operate in different zones: light DVs and EVs in zone z1; light and medium DVs and EVs in zone z2; and all types and sizes in zone z3. In all scenarios, in the final year of the planning time horizon, all DVs are replaced by EVs. Hence, the energy cost becomes the dominant factor in the TC, as EVs have lower energy costs than DVs, reinforcing the findings of Lebeau et al. [18]. Moreover, reflecting the regulatory measures, in all scenarios except S5, at the end of the planning time horizon, the fleet in zone z1 ended up with LEVs, z2 with MEVs, and z3 with HEVs. As already verified, in scenario S5, the lack of regulatory measures allowed for an increase in the size of the vehicles in all zones, thus reflecting economies of scale in the fleet.

Fleet Composition
Conclusion: regulatory measures based on vehicle size restrictions per zone present a determinant impact on the size of fleet vehicles. On the other hand, the costs of operating the fleet, as a result of the optimization framework used, overcome the purchase costs of the vehicles [12,16,18] and tend to determine the type of motorization; EVs, with a higher purchase cost but lower energy cost, replace DVs in the initial fleets over the planning time horizon of the analysis. Table 6 shows the number of vehicles of different types used in the fleet at the beginning of the planning time horizon, their average number, and their final number when the operator does not have an existing fleet. In this case, the model suggests the use of different types of vehicles at the beginning of the planning horizon according only to the available budget (which is higher than in the previous case). The results show that the fleet composition over the planning horizon is similar to the previous case with the existing fleet. Comparing Table 5 to Table 6, the initial fleets are identical in scenarios S2 to S4, suggesting it is worth updating the existing fleet because it minimizes TC in the long run. The swiftness of fleet reconfiguration will depend on the budget available and the composition of the existing fleet at the beginning of the planning horizon.   Figure 4 compares the average capacity of the fleet over the planning horizon of each type, DVs and EVs, for each scenario with an existing fleet. As shown, the average capacity of EVs is dominant in all scenarios except Scenario S5. In other words, this means that EVs serve most of the customers. Scenario S5, where any vehicle size and type are free to operate in all zones and each zone has its own depot, favors the usage of HDVs, particularly in zone z3, which confirms previous results (Figure 3). depot points, reflecting the advantage of EVs over DVs concerning energy cost and overriding the higher purchase cost of EVs. These results confirm that EVs have become more competitive regarding fleet capacity, thus serving more customers.

Elasticity Analysis
In this study, the EVs depreciation rate, DVs energy price, and EVs energy price growth rates were considered to be the parameters with higher uncertainty concerning their behavior during the planning horizon considered. Therefore, an elasticity analysis was performed for different ranges of values of the mentioned parameters to support the fleet operator in understanding their impact on the TC of operating the fleet. The results of the elasticity analysis are shown in Table 7.
The elasticity of the depreciation rate of EVs was calculated for three intervals of 10% to 20%, 14% to 24%, and 18% to 28%, as a low, medium, and high level of depreciation rate for all scenarios. For instance, for EVs with a depreciation rate between 10% and 20%, the elasticity for the S1 scenario is 0.055, indicating that when the depreciation rate increases by 1%, the fleet TC increases by 5.5%; in other words, the impact on the TC is 5.5 times higher compared with the rise in the depreciation rate. With or without an existing fleet, on average, a 1% increase in the depreciation rate leads to a rise of around 7% in the TC, which reveals the importance of the uncertainty associated with this parameter.
We also examined the elasticity of the growth rate of the energy price for intervals of 2.91% to 8.73% for DVs and 1.44% to 4.33% for EVs, both with and without an existing fleet. Table 7 shows that the DVs energy price growth rate, when compared with the EVs energy price growth rate, has a bigger impact on the fleet TC, whether there is an existing fleet or not. When using DVs, the energy cost is higher, thus representing a more significant part of the TC. On average, an increase of 1% in the diesel price growth rate results in a rise of nearly 4% and 7% in the TC, respectively, with and without an existing fleet. On average, the variations of the EV's depreciation have a higher impact on the TC than the variations in the energy price growth rate; the variation of the DV's energy price growth rate presents a higher impact on the TC than the EV's energy price growth rate. Moreover, the range of variation of the TC vis-à-vis the variation of the parameters is comparable to the results achieved by Feng and Figliozzi [21], who conducted a study on EVs' competitiveness compared with DVs in the USA market.  Moreover, scenarios S2, S3, and S4 show that the average EV capacity in the fleet tends to increase as the travel distances increase due to the reduction of the number of depot points, reflecting the advantage of EVs over DVs concerning energy cost and overriding the higher purchase cost of EVs. These results confirm that EVs have become more competitive regarding fleet capacity, thus serving more customers.

Elasticity Analysis
In this study, the EVs depreciation rate, DVs energy price, and EVs energy price growth rates were considered to be the parameters with higher uncertainty concerning their behavior during the planning horizon considered. Therefore, an elasticity analysis was performed for different ranges of values of the mentioned parameters to support the fleet operator in understanding their impact on the TC of operating the fleet. The results of the elasticity analysis are shown in Table 7.
The elasticity of the depreciation rate of EVs was calculated for three intervals of 10% to 20%, 14% to 24%, and 18% to 28%, as a low, medium, and high level of depreciation rate for all scenarios. For instance, for EVs with a depreciation rate between 10% and 20%, the elasticity for the S1 scenario is 0.055, indicating that when the depreciation rate increases by 1%, the fleet TC increases by 5.5%; in other words, the impact on the TC is 5.5 times higher compared with the rise in the depreciation rate. With or without an existing fleet, on average, a 1% increase in the depreciation rate leads to a rise of around 7% in the TC, which reveals the importance of the uncertainty associated with this parameter.
We also examined the elasticity of the growth rate of the energy price for intervals of 2.91% to 8.73% for DVs and 1.44% to 4.33% for EVs, both with and without an existing fleet. Table 7 shows that the DVs energy price growth rate, when compared with the EVs energy price growth rate, has a bigger impact on the fleet TC, whether there is an existing fleet or not. When using DVs, the energy cost is higher, thus representing a more significant part of the TC. On average, an increase of 1% in the diesel price growth rate results in a rise of nearly 4% and 7% in the TC, respectively, with and without an existing fleet. On average, the variations of the EV's depreciation have a higher impact on the TC than the variations in the energy price growth rate; the variation of the DV's energy price growth rate presents a higher impact on the TC than the EV's energy price growth rate. Moreover, the range of variation of the TC vis-à-vis the variation of the parameters is comparable to the results achieved by Feng and Figliozzi [21], who conducted a study on EVs' competitiveness compared with DVs in the USA market. To conclude, the results of the elasticity analysis emphasize that fleet operators must be fully aware of variations and evolutionary trends in the parameters relevant to the minimization of the fleet's TC, in particular the EVs depreciation and DVs energy price growth rates. Therefore, in the presence of unexpected changes in those parameters' evolutionary trends, operators can quickly adapt the optimal fleet configuration and the investment strategy for introducing new vehicles of specific types and sizes into their fleets.

Limitations and Future Research
This work has some limitations that can be resolved in future research. For example, costs related to depot points, multiple depot configurations, and fleet assignment to each depot point should also be considered in the total cost, as emphasized by Pettersson and Segerstedt [55]. An optimization framework integrating the operational cost of the depots and the fleet would even further reduce the TC of servicing customers in urban areas subject to regulatory measures [3]. This framework would allow the UFT operator to develop an adequate strategy for the vehicle composition of their fleet jointly with the number, size, and locations of the depots over a particular planning time horizon.
Moreover, the uncertain effects of other parameters using an optimization framework based on portfolio theory, such as the one developed by Ahani et al. [41], need further investigation.
Finally, although the optimization framework for deriving an optimal combination of various types of vehicles with different capacities for vehicle replacement in UFT developed in the present research is a valid and solid contribution, one should expect that the number, type, and capacity of the vehicles used influence the results and, potentially, change some of the findings. Thus, in the future, the optimization framework should be used with more vehicles of various types and capacities to expand and improve the findings.

Conclusions
The quality of delivering and distributing goods to customers is of prime importance for companies. Thus, choosing the best strategy for purchasing, using, and salvaging each vehicle size and type, electric or diesel-powered, while minimizing the related total cost and maintaining the quality of its service becomes a critical issue for an urban freight transportation (UFT) company. On the other hand, access to the city centers for certain types of vehicles might be restricted due to regulatory measures set by city authorities to ease traffic movements and reduce carbon emissions within such areas. Notwithstanding, there is a manifest gap in the literature on addressing these challenges.
This study contribution is an innovative framework to assist UFT operators in optimizing their fleet composition, minimizing the total cost, and considering the regulatory measures regarding the size and type of vehicles and the possibility of operating in specific city areas defined by the city authorities. The developed framework considers the costs of acquiring vehicles, energy consumption, emissions, maintenance, salvage, and labor of different types of vehicles. The model output indicates the optimal composition of the fleet, namely, the number, size, and types of vehicles required for operating in the various city areas over the planning time horizon.
The results indicate that fleet composition depends on vehicle size and regulatory measures, and the motor type, diesel or electric, depends on the trade-off between purchasing and operating costs. This means that, by reducing regulatory measures, the size of vehicles increases. Additionally, by reducing the number of depot points, the number of electric vehicles increases due to the rise in operating costs driven by increased travel distances. Moreover, the rate of fleet electrification depends on the existing fleet and the budget to purchase new vehicles.
An elasticity analysis was also performed to consider some input parameters' uncertainty. The results show that the total cost is highly exposed to changes in electric vehicle depreciation and diesel price growth rates. On average, an increase of 1% in the depreciation rate leads to an increase of almost 7% in the total cost, and a rise of 1% in the diesel price growth rate leads to an increase of nearly 6% in the total cost.
The findings of this study allow the delineation of several managerial implications. When facing regulatory measures like those considered in this study, UFT operators must be aware that to reduce the fleet's total operation cost, they have to change their fleet composition with the inevitable adoption of EVs over DVs, and that the budget available for the fleet recomposition is critical to minimizing the total cost in the long run. Moreover, fleet operators must be attentive to the evolutionary trends in the used electric vehicle market and the diesel price, as these parameters greatly impact the total cost. Furthermore, the number and localization of the depot points that support the UFT play a key role in the recomposition of the fleet.
Finally, regulatory measures increase UFT costs, which can lead to an increase in logistics costs or even the abandonment by UFT companies of urban areas under those measures. Therefore, it is recommended that policymakers foresee economic and financial incentives to encourage and support UFT companies to comply with the regulatory measures, thus maintaining the economic level of these urban areas.  Data Availability Statement: Some or all data, models, or codes that support the findings of this study are available from the corresponding author upon reasonable request.