A Linear Programming Model with Fuzzy Arc for Route Optimization in the Urban Road Network

: In the transport system, it is necessary to optimize routes to ensure that the distance, the amount of fuel used, and travel times are minimized. A classical problem in network optimization is the shortest path problem (SPP), which is used widely in many optimization problems. However, the uncertainty that exists regarding real network problems makes it di ﬃ cult to determine the exact arc lengths. In this study, we analyzed the problem of route optimization when delivering urban road network products while using fuzzy logic to include factors which are di ﬃ cult to consider in classical models (e.g., tra ﬃ c). Our approach consisted of two phases. In the ﬁrst phase, we calculated a fuzzy coe ﬃ cient to consider the uncertainty, and in the second phase, we used fuzzy linear programming to compute the optimal route. This approach was applied to a real network problem (a portion of the distribution area of a delivery company in the city of Tuxtla Gutierrez, Chiapas, Mexico) by comparing the travel times between the proposed model and a classical model. The proposed model was shown to predict travel time better than the classical model in this study, reducing the mean absolute percentage error (MAPE) by 25.60%.


Introduction
In the literature, optimization of routes in the urban road network involves the determination of the shortest distance between locations while considering traffic, capacity, delivery windows, and the number of turns or intersections along the route, among others.Route optimization is necessary to ensure that distance, the amount of fuel used, and travel times are minimized.
Linear programming (LP) is one of the most widely used operations research tools and is a decision-making aid in almost all organizations.LP refers to a planning process that allocates resources optimally by minimizing costs or maximizing profits.One of the most important and successful methods of quantitative analysis used to solve business problems is the physical distribution of products [58][59][60][61].
The shortest path, which is computed via the application of deterministic models, is often not optimal if one considers the uncertainty of the environment regarding arc travel times, which occurs as one travels through the network, particularly around peak time.
Fuzzy linear programming (FLP) has been previously studied [37,[62][63][64][65][66][67], usually under the consideration that the coefficients of the objective function or the constraints have fuzzy components; these constraints are modeled by assigning a fuzzy set with triangular, trapezoidal, left-shoulder, or right-shoulder membership functions.
The urban road network is a complex problem compounded by ever-increasing levels of traffic, which is affected by the popularity of cars, the traffic density of the area, weather, driver behavior, company policies, and so on.This problem further generates traffic accidents, environmental pollution, and energy waste.Urban road networks have been previously studied [36,66,68,69].
In this study, we propose an approach for route optimization in an urban zone through the implementation of a fuzzy adjustment coefficient, taking into consideration the uncertainty due to traffic alongside the number of intersections along the route, thereby increasing the reliability of the results.
The traffic factor was determined from the fuzzy variables, namely, the time of day and traffic density.The time of day was defined as the time at which the delivery was made, whereas the traffic density was defined as the level of congestion that was present in the area of distribution.
In this approach, we computed the optimal route using FLP.Using the objective function of FLP, the arc lengths were adjusted using the fuzzy coefficient, and the type of intersection (street corner) was considered.
In this study, we analyzed a portion of the distribution area of a delivery company in the city of Tuxtla Gutierrez, Chiapas, Mexico.We obtained travel times close to the real travel times with a mean absolute percentage error of 9.60%; the variance of the absolute percentage error of the fuzzy model was 46.57%.
This paper is organized as follows: In Section 1, we consider the preliminaries; in Section 2, we introduce the proposed method; in Section 3, we include an application to a real network to demonstrate our approach (four blocks and nine street corners); in Section 4, we present the results of our approach considering a portion of the distribution area of a delivery company (78 blocks and 98 street corners) and also compare the results between our approach and a classic model (LP); in Section 5, we present our conclusions.

Materials and Methods
Let G(N, E) be an acyclic directed graph defined by a nonempty and finite set, N = {1, 2, . . .., n}, of n nodes and a set, E = (i, j) i, j N and i j , of m directed arcs/edges.Each arc, (i, j), had an associated cost, c ij , that denotes the cost per unit flow on that edge.We assumed that the flow cost varied linearly with the amount of flow on the arc.
With each node, i ∈ N, we associated an integer number, b(i), representing its source or target.If b(i) < 0, then node i was a source node, if b(i) > 0, then node i was a target node, and if b(i) = 0, then node i was a trans-shipment node.
A path was a walk in which the nodes, and therefore the arcs, were distinct.We defined a path, x ij , as a sequence, x ij = i, (i, i 1 ), i 1 , . . ., i k , (i k , j ), j , of alternating nodes and arcs.Definition 1.Let X be the universe of discourse, with a range of interest variables (e.g., the time of day), where x is an element of X.A fuzzy subset, S, in the universe of discourse, X, with discrete and finite variables, could be represented as a set of ordered pairs of an element, x, and its membership grade in µ S (x).The membership function mapped each element of X to a membership grade (or membership value) between 0 and 1. where Definition 2. In the literature, despite being a simplistic description of a population, triangular distribution is typically used if a variable requires subjective estimation.A triangular fuzzy number was represented by a triplet, A = (a 1 , a 2 , a 3 ), with the membership function, µ A (x), defined by Equation (3) (Figure 1).The triangular membership functions were simple and therefore facilitated calculation (Equation ( 3)). ), with the membership, µ B (x), defined by Equation (4) (Figure 2).The trapezoidal membership functions were simple and therefore facilitated easy computation (Equation ( 4)).

Linear Programming Formulation of the Shortest Path Problem
For SPP, we wanted to find a direct path regarding the minimum cost from a specified source, node s, to another specified target, node t, in a directed graph (digraph), in which each arc, (i, j) ∈ E, had an associated cost, c ij .
The linear programming formulation of the SPP is shown below.We represented the arc flow (i, j) ∈ E by X i,j (decision variables) and the arc length by c i,j (cost).Figure 3 shows the arc flow and the arc length of a general network.The constraints of the linear programming model corresponded to the inputs and the outputs of the network nodes (Equation ( 5)).

Minimize
If we consider that the source was denoted by s and the target by t, then (Equation ( 6)) The data for this model satisfied the feasibility condition (Equation ( 7)) that is, that the total origin must equal the total destination.

Proposed Model.
In practical applications (e.g., route optimization) there is uncertainty that makes it difficult to determine exact travel times (arc lengths).Therefore, our approach included two phases, i.e., a first phase to calculate the fuzzy coefficient and a second phase to use FLP to compute the optimal route.The fuzzy coefficient was integrated into the objective function of the model.

Fuzzy Coefficient Calculation
To calculate the fuzzy coefficient, we used rule-based fuzzy logic.We identified the fuzzy variables and a fuzzy rule base, then, using the inference system, we computed the fuzzy outputs.Following this, we used defuzzification [41] to obtain the fuzzy coefficient, ( d i,j ).
To identify the fuzzy input variables, we considered expert knowledge of logistics and the transportation practices of various Mexican companies.Then, we identified a list of 49 elements that affected the distribution of products in the urban road network.These elements were analyzed and classified into seven types, namely, time of the day, traffic density, weather, driver behavior, company policies, social factors, and unnatural behaviors.
Afterward, we developed a survey for transportation workers.Through analyzing the results of the survey, we determined that the time of the day and traffic density were the main factors that modified the transportation time.
The time of day fuzzy variable was defined as the time at which the delivery took place.Six linguistic labels (Figure 4) were then formed from this definition, including: Dawn-the period of the day after midnight but before to the light of the sun appeared in the sky, which was considered to be before 05:00.During this period, total vehicle transit was light.
Entry of students and workers-the period of the day when students arrived at school and employees arrived at work, which was considered to be between 07:00 and 08:00.During this period, vehicle transit was very heavy.
Morning-the time of day extending from entry of students and workers to noon, which was considered to be between 09:00 and 12:00.During this period, the traffic level was moderate.
Exit of students and workers-the period of the day when students exited school and employees left work, which was considered to be between 13:00 and 16:00.Throughout this period, the traffic level was very heavy.
Afternoon-the time of day between the exit of students and workers and evening, which was considered to be between 17:00 and 19:00.During this period, the traffic level was heavy.
Night-the period between afternoon and the midnight, which was considered to be after 20:00.During this period, the traffic level was light.
According to the definitions mentioned above, and taking into account that the trapezoidal membership functions were simple and facilitated the calculation, the membership functions of the x fuzzy variable, i.e., time of day, were trapezoidal fuzzy numbers and were obtained using Definition 3.These were substituted into Equations ( 8)- (13).
The fuzzy variable of traffic density was defined as the level of traffic congestion that was observed in the area during distribution due to proximity to school zones, industrial areas, or shopping malls.This variable was divided into three linguistic labels (Figure 5).Light traffic density-vehicular flow conditions that were free-flowing due to a quiet road, which was away from any school zones, industrial areas, or shopping malls, thereby reducing travel times.This was represented by fuzzy number 1.
Moderate traffic density-vehicular flow conditions that were suitable owing to the measured use of the roads, which were located around school zones, industrial areas, or shopping malls.This was represented by fuzzy number 2.
Heavy traffic density-vehicular flow conditions that consisted of a lot of traffic due to the excess use of roads because of proximity to school zones, industrial areas, or shopping malls.This was characterized by slower speeds, longer travel times, and increased vehicular queuing and was represented by fuzzy number 3.
According to the definitions mentioned previously, triangular distribution was typically used if a variable required subjective estimation; the triangular membership functions were simple and facilitated calculation, therefore, the membership functions of the y fuzzy variable, i.e., the traffic density, were triangular fuzzy numbers and were obtained through Definition 2. These were substituted into Equations ( 14)- (16).
The z output fuzzy variable, the adjusted time, was used to modify travel times for the delivery of goods and materials.Six linguistic labels were formed for this, namely, very quickly, quickly, normal, slowly, very slowly, and extremely slowly (Figure 6).The membership functions of the fuzzy variable were triangular fuzzy numbers and trapezoidal fuzzy numbers and were obtained through Definitions 2 and 3. To consider every possible situation, the 14 fuzzy rules were used, as listed in Table 1.For the membership functions of the output fuzzy variable, VQ represents very quickly, Q represents quickly, N represents normal, S represents slowly, VS represents very slowly, and ES represents extremely slowly.To perform the inference system, fuzzy inputs were required to define the fuzzy rule base.The inference system considered the input values and the fuzzy rule base to determine the set of rules that was activated and the related conclusions, which were the fuzzy sets of the fuzzy output variable.To calculate the fuzzy value of the activated rule, we used the operations and intersections between the fuzzy sets in order to calculate the fuzzy value of an activated rule; unions were used to determine the fuzzy value of a set of rules which was activated with the same conclusion.We used triangular Norma and triangular Conorma to generalize the functions that defined the intersection and the union of a fuzzy set, respectively [41].The membership grade of the output fuzzy variable was calculated using Equation (17).
Defuzzification consisted of transforming the fuzzy output values into values that had a practical meaning using the geometrical center method.This method consisted of the following four steps [41]: In regular figures, the area formed by the values of the fuzzy sets of the output variable was decomposed.To achieve this, the relationship between the membership grade of two adjacent fuzzy sets was analyzed, thereby defining two cases: The first case implied that the membership grade of the first fuzzy set was less than or equal to the value of belonging to the second set.For the second case, the membership grade of the first fuzzy set was greater than the membership grade of the second set.Four regular figures regarding the relationship between two adjacent fuzzy sets were formed.
2) The surface of each figure obtained in step 1 was calculated.
3) The centroid of each figure obtained in step 1 was determined.4) The total centroid was calculated, with the result being the value of the defuzzification of the response variable (fuzzy coefficient, d i,j ).

Computing the Optimal Route
The general distribution network is illustrated in Figure 7, including the source node (1), the sink node (n), the average time taken to travel from node i to node j (c i,j ), and the path from node i to node j (X i,j ).To select the optimal route, we took into account travel time, travel time uncertainty, and type of street corner.We assumed that the arcs were a road set in the urban road network and the nodes were a set of street corners (Figure 7).Then, we considered the fuzzy coefficient, d i,j , for each arc (i, j) ∈ E, c i,j , the average time taken to travel from node i to node j, and v i,j , the average time taken to cross street corners.Therefore, the fuzzy linear programming model was Equation (18).

Application to a Real Network
Figure 8 shows an application to a portion of the distribution area of a delivery company in the city of Tuxtla Gutierrez, Chiapas, Mexico.To demonstrate our approach, Figure 9 shows a portion of the distribution area with four blocks and nine street corners, where node 15 is the source, and node 43 is the sink.Considering Chiapas's traffic regulations, we used an average speed of 35 km/h for the avenues (as 1 = 9.72 m/s), and an average speed of 20 km/h for the streets (as 2 = 5.55 m/s).As shown in Figure 8, the distance of the arc was a i,j meters, therefore, the average travel time (c i,j ) in seconds was calculated using Equation (19).
where k = 1 for the avenues, k = 2 for the streets, and a i,j represents the distance of the arc (i, j).The total time (in seconds) was calculated using Equation (20).Table 2 illustrates the time in seconds used for each type of street corner.We sampled the distribution area to determine the average times for each type of street corner, as shown in Figure 8.For each intersection, we sampled 14 street corners at different times and noted 1519 observations.For the preferred street corner, we sampled four street corners at different times and noted 225 observations.For the non-preferred street corner, we sampled one street corner at different times and noted 50 observations.For traffic light intersections, we sampled four street corners at different times and noted 525 observations.
We analyzed the conditions of the fuzzy variables of the road and street corners of the real network by obtaining model parameters.Table 3 shows the time of day and traffic density fuzzy variables and calculated the parameters a i,j , c i,j , d i,j , d i,j c i,j , v i,j , and total time (TT i,j ).As shown in Table 3, node i was the initial node of arc (i, j) and node j was the final node.For arc (15,16), node 15 was the initial node and node 16 was the final node.For arc (15,16), the type of road was a street, therefore k = 2 and as 2 = 5.55 m/s.For arc (15,16), the street length was a 15,16 = 80 meters.Equation ( 19) was therefore used.The time of day variable determined the scheduled goods delivery.In this study, the scheduled time of day was 13:36:57.
The traffic density variable was obtained via the following steps: Firstly, we considered the definition of the linguistic labels, as described in Section 2.1, to assign a real value (1 ≤ y ≤ 3) to the y fuzzy variable, i.e., traffic density, for each arc/street.Then, we designed a travel time study for each arc/street, with the purpose of adjusting the values.If necessary, we adjusted the value assigned to the fuzzy variable.
For arc (15,16), the roads next to the vehicular flow were located around shopping malls, therefore the fuzzy variable traffic density was 2. The fuzzy coefficient, ( d i,j ), was computed using the time of day and traffic density fuzzy variables, as described in Section 2.1, therefore d 15,16 = 3.21.

Results Analysis
To analyze the reliability of the model, we designed a studio with 21 real network observations from a portion of a distribution area for a delivery company in the city of Tuxtla Gutierrez, Chiapas, Mexico, consisting of 68 blocks and 92 street corners (Figure 8).The source node was node 15 and the sink node was scheduled.Table 5 shows the source node and the sink node in ascending order.
We computed the optimal solution with fuzzy linear programming for each day and executed the route following the optimal path found in the FLP.We also calculated the optimal solution using linear programming.The absolute percentage error (APE) was calculated using Equation (22).
where RT is the real time of travel, CT is the calculated time using the classical model or the calculated time using the fuzzy model.Table 5 shows the route, the schedule, the real travel time, the calculated time of the classical model (LP), the absolute percentage error using LP, the calculated time of the fuzzy model (FLP), and the absolute percentage error using FLP.
We observed that the mean absolute percentage error of the classical model (LP) was 35.20%, while the mean absolute percentage error of the fuzzy model (FLP) was 9.60%.Moreover, the maximum absolute percentage error of the classical model was 65.25%, whereas the maximum absolute percentage error of the fuzzy model was 29.18%.Furthermore, the minimum absolute percentage error of the classical model was 11.31%; meanwhile, the minimum absolute percentage error of the fuzzy model was 3.27%.Finally, the variance of the absolute percentage error of the classical model was 264.14%, whilst the variance of the absolute percentage error of the fuzzy model was 46.57%.
We also attempted to determine whether the calculated time of the fuzzy model was adjusted for the real travel time.For the statistical analysis between the mean real travel time and the mean time calculated for FLP, we used paired t-tests, where α = 5%.We proposed a null hypothesis (H 0 ) and an alternative hypothesis (H 1 ).
H 0 : where µ RT is the mean real travel time and µ CT is the mean time calculated from the FLP.Next, we evaluated the paired t-tests.Table 6 shows the paired t-tests used to ascertain whether the null hypothesis (i.e., that the mean real travel time and mean time calculated from FLP were equal) was accepted or rejected.The p-value determined statistical significance.Table 6 shows that the p-value (0.1475) was of a higher significance level (0.05) and that the t-stat (calculated statistic) was lower than the t-critical (t distribution table).Therefore, there was not sufficient statistical evidence to reject the null hypothesis.Hence, it was concluded that the mean real travel time was statistically equal to the mean calculated time in the proposed model.Therefore, the proposed model (FLP) adjusted to the travel time of the urban road network in this study.
Next, we aimed to determine whether the absolute percentage error of the classical model (LP) was higher than the absolute percentage error of the proposed model (FLP).For the statistical analysis, we used paired t-tests where α = 5%.We proposed a null hypothesis (H 0 ) and an alternative hypothesis (H 1 ). H where µ LP was the mean absolute percentage error of LP and µ FLP was the mean absolute percentage error of FLP.Table 7 shows the paired t-tests used to ascertain whether the null hypothesis (i.e., that the mean absolute percentage error of the classical model and mean absolute percentage error of fuzzy model were equal) was accepted or rejected.
Table 7 shows that the p-value (2.4035 × 10 −7 ) was less than the significance level (0.05), and that the t-stat (calculated statistic) was higher than the t-critical (t distribution table), therefore the null hypothesis was rejected.Accordingly, it was concluded that the mean absolute percentage error of the LP was higher than the means absolute percentage error of the FLP, i.e., the proposed model.Therefore, the proposed model (FLP) predicted real travel times better than the classical model (LP) in this study, thereby providing more reliable travel times in the urban road network.
In this approach, we considered fuzzy variables that influence the travel times of routes within an urban area.These fuzzy variables were not considered in the classic models, thus, we obtained values closer to the real route times with this proposal.

Discussion
In this paper, the implementation of fuzzy logic allowed us to model the uncertainty of the route optimization problem that occurs when delivering products in an urban road network through two linguistic variables, namely, time of day and traffic density.By adjusting the travel times and applying fuzzy linear programming, we computed the shortest path, thereby providing a more reliable result than the results of the classical model (Table 5), with a mean absolute percentage error (MAPE) of 9.60% in this study.However, if conditions change due to the fuzzy variables, it is possible that the optimal route will change.
This approach provides a good tool for route selection when delivering products in urban road networks, increasing the reliability of the transportation system through route optimization.In this study, the maximum absolute percentage error of the classical model (LP) was reduced by 36.07%.By applying the proposed method to a larger proportion of the distribution area of a delivery company, we expect even better results.

Conclusions
The shortest path problem is important for practical applications, e.g., in route optimization for a delivery company.The use of fuzzy logic to consider arc weights as a non-deterministic value further improves the obtained results.
With the classic models, the optimal route of product delivery is determined.However, this optimal route is unable to change during the analysis period, regardless of whether the delivery conditions are changing.On the other hand, with the approach raised in this investigation, the determined optimal route of goods delivery is able to adjust to different conditions, i.e., the time of day and traffic density fuzzy variables.With this approach, we were able to calculate travel times that were closer to the real travel times of the routes.
In this study, we observed that the optimal route sometimes changed according to the changing fuzzy variables.Therefore, with this approach, we determined the optimal route of goods delivery for the different fuzzy variable conditions, which guaranteed the shortest travel time for each delivery.Minimizing delivery route travel times is expected to reduce pollution and the level of noise generated by delivery units and increase the transfer capacity, thereby contributing to sustainable transport.Furthermore, it is worth bearing in mind that when the conditions of the urban road network change, it is necessary to adapt the membership function's fuzzy variable parameters to the new conditions.
This paper puts forward elements to help consider a larger number of fuzzy variables in future projects.Different uncertain elements, such as rain and the condition of the streets, among others, could be analyzed.We suggest amplifying the street corner crossing time used in this study in order to consider the uncertain factors that affect street corner crossing time.
This study empowers workers to make better decisions in the area of distribution regarding their travel routes.

Figure 4 .
Figure 4. Time of day fuzzy variable.

Figure 7 .
Figure 7. Diagram of the distribution network.

Figure 8 .
Figure 8. Diagram of the application zone.

Figure 9 .
Figure 9. Diagram of a portion of the distribution area.

Figure 10 .
Figure 10.Diagram of the optimal solution.

Table 2 .
Time taken to cross street corners (v i, j ).

Table 6 .
Paired t-test for the mean real travel time vs. the calculated time from fuzzy linear programming (FLP).

Table 7 .
Paired t-test for mean absolute percentage error of linear programming (LP) vs. the absolute percentage error from fuzzy linear programming.