#### Abstract

The existing urban distribution model does not consider both the environmental influence and time-varying factors. This paper studies the urban distribution optimization model considering both time-varying network factors and carbon emission factors and constructs the single period time-varying network urban distribution optimization model and cross-period time-varying network urban distribution optimization model. In this paper, the time-varying network in urban distribution is mathematically described and calculated. By considering the carbon penalty rate, the distribution optimization model is analyzed to formulate the optimal urban distribution scheme for enterprises. An improved variable neighborhood search (VNS) heuristic algorithm is designed to solve the model. The numerical example demonstrates that the higher the carbon emission cost, the greater the carbon penalty rate. When the carbon emission cost increases by 50%, the total cost of the distribution scheme considering carbon emission is saved by 1.21%. The numerical analysis also finds that only when the unit carbon emission cost is higher than 2.937, the carbon penalty rate will stimulate enterprises to reduce emissions.

#### 1. Introduction

The rapid development of the global economy and the rapid growth of the population have brought many adverse effects on the Earth’s ecological environment. The rapid development of urban distribution has also brought serious impacts on the urban environment. The government’s policies used to restrict carbon emissions are increasing rapidly. According to the fourth assessment report of the United Nations Intergovernmental Panel on climate change, the concentration of carbon dioxide in the atmosphere has increased from 280 ppm (one-millionth unit) before the industrial revolution to 379 ppm in 2005, exceeding the natural change range since nearly 650000 years. In the past century, the global average surface temperature has increased by 0.74°C. The report also predicts that the global average surface temperature may rise by 1.1–6.4°C in the next 100 years. It is urgent to deal with climate change caused by carbon emissions. In 2021, the outlines of the 14th five-year plan (2021–2025) for national economic and social development and vision 2035 of the People’s Republic of China proposed to achieve the objectives of China’s Intended Nationally Determined Contributions 2030 and formulate an action plan to reach the peak of carbon emissions by 2030. A system that focuses on carbon intensity control supplemented by total carbon emission control will be implemented to achieve carbon neutralization by 2060. To achieve the overall emission reduction target, macropolicy support and operable implementation schemes are needed. The pressure of emission reduction in practice has confirmed the necessity of studying the urban distribution problem considering carbon emission.

The carbon generated by logistics activities accounts for 5.5% of human activities and 5–15% of the emissions in the whole product life cycle. In logistics activities, the carbon emissions from fossil fuels required for transportation and distribution account for more than 87% of the total. Previous studies have shown that by reasonably planning roads and distribution routes, carbon emissions in transportation can be reduced by 5% on the premise of ensuring the economic objectives of enterprises. Therefore, the research on urban distribution in the operation of a low-carbon supply chain is of great significance in reducing carbon emissions. At the same time, how to let enterprises reduce the carbon emission of urban distribution by optimizing operations without increasing cost or increasing little cost is a challenging topic.

With the increase of urban car ownership year by year, the time-varying characteristics of the urban road network have become increasingly significant, and the speed of urban road shows periodic characteristics over time. The vehicle routing problem in a time-varying road network refers to the reasonable arrangement of the number of distribution vehicles, vehicle routes, and under the condition of considering the change of vehicle travel speed in the road network in different time periods.

Combining the time-varying characteristics with the specific urban road network can better reflect the dynamics of urban distribution. At the same time, the time-varying characteristics of urban distribution are closely related to urban congestion. The time-varying periods can be divided by considering the characteristics of congestion. Thus, the time-varying network has become an important factor in urban distribution optimization problems. Considering time-varying factors in urban distribution optimization has also been a concern by many scholars. Meanwhile, a time-varying network will also have a significant impact on carbon emissions in urban distribution. Therefore, the urban distribution optimization problem considering carbon emission under a time-varying network has become a research hotspot.

#### 2. Literature Review

Exiting research has considered the time-varying factors and carbon emissions factors in the urban distribution optimization problem. Considering carbon emissions, Pradenas et al. study the carbon emission in urban distribution considering distance, vehicle load, and back time window. The paper shows that the carbon emission in urban distribution is jointly affected by vehicle load and distribution distance and explains the relationship between carbon emission and vehicle load [1]. Different from Pradenas, this paper considers the carbon emission under the time-varying network in urban distribution and introduces a carbon penalty rate to analyze the distribution model to study the influence of the time-varying network on the enterprise’s decision-making. Eskandarpour et al. propose a biobjective mixed-integer linear programming model to minimize total costs as well as carbon emissions caused by the vehicles used in the fleet for a Heterogeneous Vehicle Routing Problem with Multiple Loading Capacities and Driving Ranges and develops an enhanced variant of MultiDirectional Local Search to solve the problem [2]. Yu et al. propose an improved branch-and-price algorithm to precisely solve the heterogeneous fleet green vehicle routing problem with time windows [3]. Li et al. study the impact of the carbon tax and carbon quota policy on distribution costs and carbon dioxide emission and developed a Genetic Algorithm-Tabu Search to solve the model [4]. Zeng et al. study a routing algorithm to find a path that consumes the minimum amount of gasoline while the travel time satisfies a specified travel time budget and an on-time arrival probability considering [5]. Xiao et al. present an *ε*-accurate approach to conduct continuous optimization on the pollution routing problem [6]. Liao et al. study a green distribution routing problem integrating distribution and vehicle routing problems and propose a multiobjective scheduling model to maximize customer satisfaction and minimize carbon footprint [7]. Yan et al. establish an open vehicle routing model for urban distribution aiming to minimize the total cost. A genetic algorithm supporting the implementation of smart contract is developed to verify the effectiveness of smart contracts [8]. The above researches propose that carbon emissions can be reduced by optimizing the routing problems, including the problem of considering urban distribution in green supply chain operations without discussing the impact of carbon emissions on enterprises’ urban distribution decision-making from the perspective of carbon trading and carbon restriction and minimum amount of gasoline. This paper studies the optimization of urban distribution path by considering carbon tax and carbon penalty rate in a time-varying network.

For the carbon penalty rate, previous research in the supply chain has already taken it into consideration. Moghimi et al. studied the power supply chain that reduces carbon emission, discussed its impact on operation decision through carbon punishment, and showed that carbon punishment can reduce carbon emission in the supply chain by affecting the operation mode of enterprises [9]. Erel et al. studied the impact of incentive emission reduction framework and punishment emission reduction framework on reducing carbon emissions in transportation. The research data confirms the significance of studying carbon punishment in low-carbon transportation operation [10]. Tseng et al. developed a mixed-integer nonlinear programming model to realize the sustainable supply chain network [11]. Zhaleqian et al. introduced a new sustainable closed-loop location-routing-inventory model under mixed uncertainty [12]. Instead of studying the routing problem in a closed-loop supply chain, this paper studies the vehicle routing problem in forward logistics network by establishing a multiobjective optimization model and using an improved variable neighborhood search (VNS) heuristic algorithm to solve the model. Tang et al. integrated consumers’ environmental behavior into a joint location-routing-inventory model and used a multiobjective particle swarm optimization algorithm to solve the problem [13]. Wang et al. studied a green location-routing problem considering carbon emission in cold chain logistics [14]. Alhaj et al. focused on the joint location inventory problem with one factory, multiple DCS, and retailers and the problem of considering carbon penalties to reduce carbon emissions [15]. Bazan et al. proposed a two-level supply chain model with a coordination mechanism considering a carbon tax, emission penalty, cap-and-trade, and their combination [16]. Wang et al. studied an improved revenue sharing contract to explore the decision-making of product wholesale price and sales price under the differential pricing closed-loop supply chain coordination model considering government carbon emission rewards and punishments [17]. Samuel developed a robust model for the closed-loop supply chain considering carbon emissions and used carbon punishment to limit carbon emissions [18]. Wang et al. studied procurement and manufacturing/remanufacturing problems with the random core rate of return and random yield based on the dual mechanism of carbon cap trading and carbon subsidy/punishment [19]. Zhang et al. established four decision-making models to analyze the impact of government reward and punishment policy on dual channel closed-loop supply chains [20]. The above researches mainly study the joint location routing problem with the consideration of the carbon penalty rate and focus on the distance and routing problem in the green supply chain. Different from these researches, this paper focuses on the urban distribution problem with carbon emissions and takes speed in different time periods into consideration.

Existing research studies the measurement of carbon emissions in urban distribution from the perspective of measurement and calculation. Akcelik and Besley studied the measurement and calculation of carbon emissions in distribution, mainly calculating the fuel consumption in each stage through the instantaneous speed or average speed of vehicle operation and then multiplying fuel consumption by the carbon emission factor to obtain the carbon emissions in each stage [21]; Based on the distribution characteristics of European countries, Panis et al. estimate the relationships between carbon emissions, speed, and distance by VeTESS software [22]. Abdallah et al. quantify the emission factors of traffic-related gaseous and particulate pollutants inside the Salim Slam urban tunnel in Beirut, Lebanon, and measure the fuel based emission factors of pollutants from the carbon mass balance model [23]. Lee et al. propose a new rapid method that is helpful for estimating carbon emission factors by using a mobile laboratory as a supplementary tool to traditional tunnel research [24]. In this paper, the environmental cost consists of carbon emission cost and carbon tax. Among them, the carbon emission is calculated by fuel consumption and diesel carbon emission factor of vehicles.

The study of time-varying network is proposed on the basis of dynamic network urban distribution vehicle routing problems and time windows problems. The existing research mainly focuses on two aspects: the customer time windows and time-dependent rate. Considering carbon emissions in distribution, Wygonik and Goodchild employ ArcGIS software to combine the urban distribution with time-varying network and customer time windows in order to solve an emissions minimization vehicle routing problem with time windows [25]. The time window is modeled to represent the customer density. Different from Erica, this paper divides the day into four time periods to represent the different vehicle speed characteristics and minimizes both the economic and environmental costs. Berman et al. study the distribution network design, mainly considering road congestion and elastic demand factors and take time as a core variable [26]. Moshe et al. study the case of a highly congested urban distribution dynamic model and show the congestion situation in the form of time nodes [27]. Transchel et al. present a solution approach to the joint assortment and inventory planning problem for vertically differentiated products considering dynamic consumer-driven substitution [28]. This paper introduces a time-varying network based on different speeds in a day and establishes a multiobjective programming optimization problem with the consideration of the carbon penalty rate.

The existing literature mainly studies three aspects: (1) distribution strategies to reduce carbon emissions through operation optimization; (2) carbon emissions measurement in urban distribution; (3) the effects of urban congestion and time-varying network on urban distribution strategy. Previous studies mainly combine the first two aspects, and research on the urban distribution problem considering carbon emission and time-varying factors merely uses a time window to represent different speed characteristics. Cost is also the major consideration in urban distribution optimization studies, and environmental factors like carbon emissions and carbon penalty rates are far less considered in decision-making. This generates deficiencies in the research on the operation optimization of emission reduction in urban distribution. Time-varying network not only affects the time of urban distribution but also significantly affects the carbon emissions in distribution. Therefore, we focus on the urban distribution optimization considering carbon emission under a time-varying network, construct a single period time-varying network urban distribution optimization model as well as a cross-period time-varying network urban distribution optimization model, and introduce carbon penalty rates to analyze the distribution model. The model analysis shows that when the carbon penalty rates are positive, enterprises will actively choose the distribution model with the lowest carbon emission. The model is solved by the VNS algorithm, and numerical analysis is carried out based on a real example.

#### 3. Descriptions and Assumptions

##### 3.1. Problem Description

Due to the influence of traffic factors such as congestion, urban distribution presents different speed characteristics in different time periods. Usually, the day is divided into several time periods according to these factors. The characteristics of vehicle operation in each time period are similar, and these time periods constitute a time-varying network. According to the speed characteristics, the paper segments a 24 hours daytime into four sections , which are , , , and respectively. According to the characteristics of a time-varying network, vehicles are distributed on the same path, with different departure times and vehicle running times, as shown in Figure 1.

There are two conditions in time-varying network urban distribution: single period time-varying network distribution and cross-period time-varying network distribution. Single period time-varying network distribution means that distribution centers deliver in the same period. For instance, services customers in time segment . Cross-period time-varying network distribution is that distribution centers deliver in the different time segments. For instance, services customers in segment , and service customers in segment and . The main contribution of the paper is the identification of an urban distribution model which happens in the time-varying network. The model is a multiobjective optimization problem, including the shortest delivery time and the lowest carbon emissions. The model is better than these, not taking time-varying factors into consideration in reducing carbon emissions. The optimal network structure of urban distribution considering the carbon penalty rate under a time-varying network is shown in Figure 2.

##### 3.2. Assumptions

(1)Each customer is serviced by only one distribution center and by the same vehicle; distribution center’s capacity can meet customer demands.(2)The maximum load of each vehicle is the same, and the starting and ending points of distribution are in the same distribution center.(3)The delivery needs to be completed within the customer demand time window. The paper assumes that the customer time window for every day is .(4)The distribution process of each distribution center is completed in the same time segment.(5)The average speed of the road network in each time segment is related to the time-varying characteristics such as road congestion and road type in this segment.(6)Vehicles run on the same route, and the vehicle runs in different time segments at different speeds.(7)In the time-varying network, the distance and speeds from each distribution center to the demand point and between the demand points are known.##### 3.3. Symbols and Parameters’ Description

###### 3.3.1. Urban Delivery Costs’ Parameters

: customers’ set, : distribution center set, : vehicle set, : vehicle routing set : speed matrix of the vehicle : fixed costs in distribution : variable costs in distribution : total time of delivery in a certain time segment : speed of the vehicle in a time segment : total economic cost : optimal total cost : operating costs per unit time : the product number from distribution center to retailer : distribution center capacity : vehicle capacity###### 3.3.2. Carbon Emissions’ Parameters

: the fuel consumption of vehicle operation in a certain period of time : carbon emissions in distribution : the cost of carbon emissions : carbon tax per unit carbon emission : carbon penalty rate###### 3.3.3. Time-Varying Network Parameters

: time window : the number of periods, : the time period that the distribution center services customers in : time-varying period set,###### 3.3.4. Decision Variables

: the route between customers and by vehicle##### 3.4. Mathematical Description and Calculation of Time-Varying Network

In building a distribution model, time-varying speed is one of the core variables in this paper. Therefore, the paper first constructs the speed model of a time-varying network. Based on the characteristics of the daily distribution time-varying network, one day is divided into four segments and each segment stands for four hours.

###### 3.4.1. Time-dependent Velocity

In urban distribution, we firstly use a mathematical expression to represent the speed on each path in each period. If each day is divided into four periods, a speed path matrix can be formed to represent the characteristics of the road network, such as the speed expression corresponding to the paths *d*_{i} is shown in Table 1.

Mathematical modeling method is used to establish the model for each time-varying network speed , in which the total distribution time equation is obtained according to the time-dependent flow rate equation in [21]. The factor in the equation comes from a wide range of speed curve, which is expressed as follows:

is changed in different congestion conditions. Based on the characteristics of traffic congestion, the weight indicator can be expressed as follows:

represents the distance of each type of road, and road types are classified as follows: severe congestion, moderate congestion, mild congestion, and smooth. These four speeds are determined according to the congestion level evaluation and average speed value specified in the data of the National Bureau of Statistics in China (Table 2). , represents the overall average speed of the road network under different circumstances.

###### 3.4.2. The Average Speed of the Road Network

Equation (2) establishes the velocity model of each path. And through the speed matrix, we can obtain the average velocity model of each path in the distribution program and the average speed is expressed as follows:

Average speed varies with the path and the time period of the road network. The same distribution route has different average speeds in different time-varying networks.

#### 4. Model Formulation

##### 4.1. Single Period of Time-Varying Network Model Construction

###### 4.1.1. Urban Distribution Model considering Cost

A single time-varying network delivery model refers to all distribution centers choose to distribute at the same time. Generally, urban distribution model is expressed in the form of cost function. Delivery model considering cost is expressed as follows:

The first part of equation (5) represents the fixed costs of distribution vehicle, and the second part represents the variable cost related to the vehicle operation.

###### 4.1.2. Urban Distribution Model considering Carbon Emissions’ Cost

(1) Measurement of urban distribution of carbon emissions: carbon emission measurement is an important research content in building the model. In this study, carbon emissions’ measurement is achieved mainly through the conversion of vehicle’s fuel consumption. Numerous studies have demonstrated through empirical studies and proved that before the optimal speed (72.1 km/h), vehicle’s fuel consumption per unit decreases as speed increases, and after the optimal speed, vehicle’s fuel consumption per unit increases with speed increases [19].

We use the recycling rate that is proposed by Akcelik [21] to calculate the fuel consumption on each path. The equation is expressed as follows:

represent fuel consumption, indicates vehicle speed; indicates the maximum vehicle speed; and are fuel consumption factors based on historical data.

Because the carbon emission from different fuels is directly proportional to the fuel consumption (ICF, 2006), the carbon emission factor of fuel can be calculated by experimental calculation and model calculation. Let represents the carbon emission factor of fuel consumption, and the expression of carbon emission in distribution can be obtained as follows:where in the carbon emission factor is obtained based on the carbon emission factor of fossil fuels in various countries, which is issued by the International Energy Organization in 2009. Through unit conversion, it can be calculated that the carbon emission from 1000 L fuel consumption is 7.369 tons. China’s carbon emission factor is much higher than that of other countries (the countries selected for comparison are all countries with carbon tax policies).

(2) Carbon costs:

The cost of carbon emissions is mainly composed of the amount of carbon emissions and carbon tax that companies need to pay.

(3) Optimization model based on multiobjective: Equation (8) represents the lowest cost of carbon, and equation (5) represents the lowest economic cost of distribution. A linear weighting method is used to transform the double objective function into a single objective function, and the objective function is obtained as follows:

represents the reciprocal of the minimum environmental cost of a single objective; represents the reciprocal of the minimum economic cost of a single objective. Equation (9) represents the vehicle capacity limit; equation (10) represents the capacity constraint of the distribution center; equation (11) represents the time window distribution to meet customer requirements; equation (12) represents the vehicle speed limit; equation (13) ensures the continuity of the distribution process; that is, the vehicle must leave after entering a distribution center or node; equation (14) indicates that the need of each customer must be met; equation (15) represents a single distribution network within a time-varying period; equation (16) represents that each customer has one vehicle to distribute; equation (17) represents that when the vehicle capacity cannot meet the customer’s needs, it is necessary to return to the distribution center for replenishment; equation (18) represents the selection of distribution center; equation (9) represents the period of distribution.

##### 4.2. Cross-Period Time-Varying Network Model Construction

To construct cross-period time-varying urban distribution network optimization model, we introduce a period decision variable in the model. The distribution process is divided into two or more stages according to the period, and the distribution fuel consumption, distance, and distribution time in each interval are represented, respectively. The linear weighting method is also adopted to solve the model. The expression of the model is as follows:

The first part of model (19) presents the environmental costs, and the second part represents economic costs. Model (20) also obey constraints (9), (10), (12)–(14), and (16)–(19). Equation (21) represents the distribution carried out in the cross period of a time-varying network.

##### 4.3. Consider the Rate of the Carbon Punishment Distribution Optimization Model

###### 4.3.1. Carbon Penalty Rates

The carbon penalty rate refers to the cost loss rate caused by the government levying carbon tax on carbon emissions and enterprises still adopting the distribution scheme without considering carbon emissions and is considered as an endogenous variable. means the optimal total cost of urban distribution when the enterprise does not consider carbon emission, and means the optimal total cost of urban distribution when the enterprise considers both economic cost and carbon emission cost. The carbon penalty rate is expressed as follows:

The carbon penalty rate is of great significance to the choice of enterprise urban distribution model. Therefore, several scenarios of carbon penalty rate are discussed before constructing the distribution model. The abstract cost function of urban distribution is constructed to solve the different cases of carbon penalty rates. The total cost is expressed as follows:

The carbon penalty rate will be discussed in the following propositions. We consider , which means the minimum carbon emission must be considered in the optimal solution.

Proposition 1. *When , .*

*Proof. *Known , then substitute it into equation (22).Proposition 1 shows that when the model considering economic cost and carbon emission cost can reduce the enterprise’s carbon emission and variable economic cost, the enterprise will consider the cost balance brought by the carbon penalty rate and take the initiative to adopt the urban distribution model that can reduce carbon emission.

Proposition 2. *When , .*

*Proof. *Known , and , so .

Substituting the known conditions we can obtain .

Proposition 2 shows that when the model considers both economic cost and carbon emission cost, it may lead to the increase of variable cost, but when the increase of variable cost is less than the cost of carbon emission reduction, the enterprise will consider the cost balance brought by carbon penalty rate and take the initiative to adopt the urban distribution model that can reduce carbon emission.

###### 4.3.2. Distribution Optimization Model

In urban distribution, the carbon penalty rate can help enterprises choose the distribution scheme according to their own situation. At the same time, it can also reflect the impact of carbon emissions on enterprise decision-making in urban distribution. In this section, the mathematical description and derivation concept of the carbon penalty rate will be carried out according to Section 4.3.1, and the urban distribution scheme selection under a time-varying network based on the carbon penalty rate will be studied. When all distribution centers choose the same period for distribution, the carbon penalty rate of cross-period time-varying network is the same as that of single period time-varying network.

A decision variable is used to determine the selected time period of each distribution path. In order to establish a cross-period time-varying network , the model of and is needed, which can obtain the minimum total cost when considering both cost factors and environmental factors. The expression is as follows:

Establishing the carbon penalty rate model of cross-period time-varying network, the model is expressed as follows:

in equation (15) is to compare the cost loss rate of different distribution schemes without considering the carbon emission cost, which may be negative, positive, or zero. Under the background of a time-varying network, the solution of the carbon penalty rate of urban distribution becomes more complex. The result of the carbon penalty rate will directly determine the enterprise’s choice of distribution scheme. If the carbon penalty rate of the distribution scheme considering reducing carbon emissions is positive, the enterprise will take the initiative to choose the distribution scheme with the lowest carbon emissions.

#### 5. Solving Approach

##### 5.1. VNS Algorithm Design

The urban low-carbon distribution optimization problem based on the time-varying network is a complex problem considering the time-varying factors of vehicle operation and carbon emission factors on the basis of the general VRP problem. It is a typical NP-hard problem. The variable neighborhood search algorithm has been applied to solve some TSP, CVRP, and VRPTW problems, and the effectiveness of the algorithm has been proved. The vehicle path planning studied can be regarded as a double-layer iterative process. The algorithm flow is shown in Figure 3.

We use the improved VNS algorithm to solve the model. The improved VNS algorithm uses the PSO algorithm to improve the search efficiency in the initial solution generation part. The algorithm flow is as follows: first, in the initial solution part, the relationship between customers and distribution centers is determined through the PSO algorithm; second, the initial VNS algorithm is recoded and substituted into the VNS neighborhood search, the time period of the distribution center is determined, and then the path arrangement between the customer and the distribution center is determined; third, the solution obtained by VNS algorithm is substituted into PSO to verify the rationality of the initial solution. If it is reasonable, stop the search, and if it is unreasonable, search again.

Combined with the algorithm flowchart, this section describes the specific steps of the algorithm in this paper.

###### 5.1.1. Encoding and Initialization

The basic parameters are assigned first, and then the initial coding is carried out. The upper coding of this algorithm is realized by the PSO algorithm, and the research problem needs to be coded. Upper layer coding refers to the establishment of the relationship between the distribution center and customers through the PSO algorithm. We design distribution centers and demand points, and then each particle corresponds to an N-dimension vector, and the value range of each element is , in which the vector coding is used to represent which distribution center each demand point is served by.

Through the upper layer solution, the customer set served by the distribution center can be determined. At this time, we conduct secondary coding and set the candidate time-varying period set as . The time period of each distribution center is determined by variable random selection (when studying single period time-varying network urban distribution, the same time period parameters are substituted in this operation). Let the set of candidate paths be , the set of paths selected by the algorithm is , and the set of running time corresponding to each path is , represents the distribution center set, and represents the customer demand set. The distribution routes are arranged according to the initial results of the upper layer code, which is based on the following equation:

represents the distribution time difference between customers after allocation. Each node is connected by the method of minimum difference. The smaller the distribution time, the greater the vehicle running speed and the lower the carbon emission level.

###### 5.1.2. Neighborhood Search

Neighborhood structure is the core part of the improved VNS algorithm. Four kinds of variable neighborhood structures are obtained through node and path disturbance. Through the search operation, we can get more high-quality solutions. The neighborhood structure is constructed as follows:(1)Node insertion. Node insertion is to insert any customer of a distribution center into the distribution path of another distribution center, which changes the route arrangement of the two distribution centers.(2)Node exchange. Node exchange is the exchange of two customers that are selected by two distribution centers respectively. It realizes the improvement of neighborhood structure.(3)Cross interchange. Two distribution centers respectively select two nodes and the path contained therein. Then exchanging, the two paths and nodes to obtain a new neighborhood in order to prevent the search from falling into local optimization.

###### 5.1.3. Solution Selection

By constantly changing the neighborhood structure, a series of solutions can be obtained, and rules need to be used to select the optimal solution. According to the research by Hansen and Mladenovic [29], Kirkpatrick et al. [30], we select the optimal solution. If the neighborhood solution outperforms the solution , then replace with . If no better solution is found in the search, after certain iterations, the new neighborhood solution is chosen to prevent the search from falling into local optimization. The probability of becoming an alternative solution is expressed as follows:where in represents the fitness function, which is substituted into the objective function equations (4), (7), and (8) in the solution process, represents the number of iterations, represents the total cost reduced for the kth iteration. According to equation (29), after the variable neighborhood search and iteration, the optimal solution is selected to determine the distribution center and distribution route.

###### 5.1.4. Adjustment and Verification

Since the upper layer solution is solved by the PSO algorithm, after the VNS algorithm obtains the optimal solution, it needs to be brought back to PSO to verify whether the initial distribution center arrangement is the optimal scheme. If not, it needs to adjust the initial parameter and solves again.

##### 5.2. A Case Study of Vegetable Distribution in Shenyang Hospital

In this paper, a logistics enterprise in Shenyang is taken as the example background of this paper. The example data are the real data collected through investigation or a GIS system. See Table 2 for the data.

We select a logistics enterprise in Shenyang as an example. The enterprise takes two distribution centers as the canteens of ten hospitals in Shenyang for comprehensive vegetable distribution. Study data are the real data collected through investigation or the GIS system which are shown in Table 3.

Time-varying factors are considered in urban distribution, so each path has different speeds in different periods. That is, there are four speeds (depending on the number of periods) on each path. At the same time, we consider the directionality of the distribution path, and the round-trip on the same path has independent speed and distance. Therefore, there is a speed and path matrix between demand points and distribution centers and between demand points and demand points, respectively.

The basic speed and path matrixes are given in Tables 3 and 4 respectively. Shenyang Sitong vegetable distribution center (No. A distribution center) and Shenyang Shuangrui distribution center (No. B distribution center) are selected as the distribution starting points, and the path length between the demand point and the distribution center and the path running speed (taking period 2 as an example) are shown in the following tables. Wherein represents the speed from distribution center A to each demand point in period 2 (Table 4), and represents the speed from the demand point to distribution center A in period 2 (Table 5).

The basic parameters of vehicle distribution cost in the distribution center are given as follows. The 24-hour day is divided into four periods according to the road conditions, namely, , , and . Due to the actual situation of the example, the daytime distribution is mainly considered in the calculation, so the distribution in is not considered. The selected distribution vehicle is a BAIC flag bell 5-ton load-carrying container, which is diesel powered, with a displacement of 3.168 L and a maximum speed of 95 km/h. The fixed cost of each vehicle is 142 CNY/day, and the diesel price is 6.94 CNY/L. The initial carbon tax rate is 57.69%, 4.195 CNY per liter of diesel.

Substituting the basic data into the VNS algorithm, we obtain the optimal distribution scheme, total cost, carbon emission, and carbon penalty rate of the distribution center. In this section, the example will be analyzed from two aspects: single period time-varying network distribution and cross-period time-varying network distribution.

###### 5.2.1. Single Time-Varying Network Distribution Schemes

The distribution schemes of , , and are shown in Table 6.

Under the single period time-varying network distribution, choosing to deliver in the period is the best scheme with the lowest total cost and the lowest carbon emission for the reason that during this period, the average speed of vehicles is high and the road conditions are relatively smoother than other periods. In the single period time-varying network distribution scheme, there exit a carbon penalty rate (cost loss rate) (Table 7). The existence of a carbon penalty rate proves that when carbon emission has certain policy constraints, enterprises can influence their own decision-making through economic factors and take the initiative to adopt a low-carbon distribution scheme.

###### 5.2.2. Cross Period Time-Varying Network Distribution Schemes

Cross-period time-varying network refers to when there are several distribution centers. Each distribution center needs to choose to distribute in different periods (the demand of customer time window or the restriction of road conditions). We study how enterprises choose distribution schemes in different situations through this model. The distribution schemes of cross-period time-varying network and are shown in Table 8 and the distribution scheme of cross-period time-varying network and are in Table 9.

Among them, the route period represents the service period of the distribution center. Due to different time periods, the route speed has different time-varying characteristics, and the fuel consumption and carbon emission will change with different time periods.

Through the numerical analysis of an example, it can be found that the total distribution cost and carbon emission of cross-period time-varying network and are better than that of cross-period time-varying network and . By comparing Tables 7 and 8 with Table 5, it can be noted that the carbon emission and total cost decrease when considering the time-varying network. The distribution scheme of a cross-period time-varying network is better than some single period time-varying network distribution schemes. What’s more, in the cross-period time-varying network distribution scheme, carbon penalty rates (Table 10) are positive, which proves that when carbon emission has certain policy constraints, economic factors will affect the enterprises to take the initiative to adopt low-carbon distribution schemes.

###### 5.2.3. Carbon Emission Factors’ Analysis

The speed and distance in urban distribution have a relationship with carbon emissions. The longer the distance, the greater the distribution speeds, and the smaller the carbon emission per unit distance. The longer the delivery distance, the greater the total carbon emission. The total carbon emission is positively correlated with the distance, as shown in Figure 4.

The characteristics of the urban distribution network show that the longer the distribution distance is, the greater the distribution speed is, as shown in Figure 5. The main reason for this trend is that the shorter the distance in urban distribution, the greater the probability of congestion, and the lower the probability of congestion on longer routes. And the distribution speed (before reaching the optimal speed) is negatively correlated with carbon emissions, as shown in Figure 6.

##### 5.3. Sensitivity Analysis

In this section, the impact of the time-varying network and carbon penalty rate on the distribution scheme will be discussed according to the data of the above example.

###### 5.3.1. Analysis of the Impact of Time-Varying Network on Urban Distribution

The impact of a time-varying network on carbon emission is mainly the impact of speed that is based on road conditions. The change of speed is the embodiment of time-varying. At the same time, the change in speed will also affect the actual amount of carbon emission. Taking the data in the period as the benchmark, this paper studies the impact of the period on carbon emissions, environmental costs, and total costs by changing the vehicle running speed in the time-varying network period. The speed is increased by 30% step by step, and the results are shown in Table 11.

According to the data in Table 11, the change in speed will reduce carbon emissions, environmental costs, and total costs. Among them, the change trend of the total cost is the most gentle because the carbon price does not reach a particularly high level, and the change in environmental cost accounts for a small proportion of the total cost. Moreover, the change trend of carbon emissions and environmental costs is the same, and the decline proportion is higher than the total cost. The more obvious the characteristics of time division in the time-varying network, the more obvious the change of speed, and the more significant the impact on the distribution scheme considering carbon emissions.

###### 5.3.2. Analysis of the Impact of Carbon Penalty Rate on Urban Distribution

The sensitivity analysis of the change of carbon penalty rate and enterprise distribution plan are considered by reducing the unit carbon emission cost by 10%, 30%, and 50% and increasing it by 10%, 30%, and 50%, respectively. The results are shown in Figure 7.

It can be seen in Figure 7 that when the unit carbon emission cost changes, the carbon penalty rates of single period and cross-period distribution both show an upward trend. That is, the higher the carbon emission cost, the greater the carbon penalty rate. That is because, with higher carbon cost, the enterprise needs to pay more for carbon emission, which will increase the carbon cost so the enterprise will loss more when not choosing low-carbon emission scheme.

With the same unit carbon emission cost, the change trend of carbon penalty rate in different periods shows different characteristics. The change range of carbon penalty rate in single period , single period , and cross period is greater than that in single period and cross period . The large range of carbon penalty rate changes will lead to a change in the optimization scheme. Tables 8 and 9 show that without considering carbon emission cost, and are the suboptimal scheme for the enterprise in single and cross periods, respectively. However, after considering the carbon emission cost and carbon penalty rate, because of the higher carbon emission cast and larger penalty rate change range, the optimal scheme in cross period is and the suboptimal scheme in the single scheme is . The loss that high carbon penalty rate brings to the enterprise exceeds the benefit it gets when choosing other schemes. The enterprise chooses other scheme with low-carbon emissions instead of the original one. Also, in Figure 7, when carbon cost is below 2.937, the carbon penalty rate is negative, which means that the scheme considering carbon emission cost will increase its total cost, so the enterprise will not consider active emission reduction. So a low unit carbon emission cost will not stimulate the decrease of carbon emission. But carbon emission cost will increase the total cost, there are certain restrictions on the increase of unit carbon emission cost, which cannot grow upward at the expense of economic development.

###### 5.3.3. Comparing the Improved VNS with VNS Algorithm

Variable Neighborhood Search is a well-known metaheuristic algorithm for solving complex optimization problems. Different variants of VNS have been applied to various VRPs. Specially, de Freitas and Penna proposed a heuristic algorithm based on VNS for urban distribution, which is named a hybrid general VNS (HGVNS). We adapt the HGVNS to the urban distribution model and compare the results with the improved VNS (IVNS) in Table 12. The data in Table 12 are the data of the case study and the Gap reports the improvements in total cost by the IVNS compared to that of the HGVNS, which is calculated as follows:

Table 12 shows that the improved VNS outperforms the HGVNS in terms of both total costs and carbon emission costs.

#### 6. Conclusion

Taking urban distribution as the research object, we mainly study how enterprises should choose the optimal distribution scheme under the influence of carbon emission and time-varying networks. We establish different distribution optimization schemes for enterprises by constructing urban distribution optimization models under a single period time-varying network and cross-period time-varying network. Through numerical example analysis and sensitivity analysis, it is verified that by adjusting the carbon tax level, the carbon penalty rate determines the choice of enterprise distribution schemes under a time-varying network. When the carbon tax rate is higher than a certain level, enterprises will actively choose the distribution scheme with a low-carbon emission level to reduce operating costs. There is a positive correlation between distance and speed in urban distribution. The lines with long distribution distances usually have a smooth road network and fewer vehicles. The higher the vehicle speed, the lower the carbon emission per unit distance. The total carbon emission in the distribution process is affected by the speed and vehicle running time. The speed has a negative correlation with the carbon emission, and the total running time has a positive correlation with the carbon emission.

#### Data Availability

The data used to support the findings of the study are the real data collected through investigation or the GIS system.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.

#### Acknowledgments

This research was partially supported by the National Natural Science Foundation of China (Grant Numbers 71971049).