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.

#### 2.2.1. 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, (

${\tilde{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]:

- 1)
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, ${\tilde{d}}_{i,j}$).