Loopwise Route Representation-Based Topology Optimization for the Shortest Path Problems

This study investigates the analogy between the electric circuit and roadway traffic analyses based on the loop-wise route representation (LRR). These two seemingly different fields share common aspects in terms of primitive components, system behavior, and underlying principles. Considering this analogy, a novel topology optimization is proposed to solve a shortest path problem by introducing artificial loop variables, which are conceptually analogous to loop current in the electric circuit. Then, the loop-wise route optimization is formulated to minimize the travel cost in both symmetric and asymmetric networks. By virtue of using the LRR, the proposed method can guarantee the flow conservation at each node without imposing any constraint functions. To verify the proposed method, numerical experiments in 10 $\times10$ grid-type networks are conducted under various settings. These results show that the shortest path problems can be solved in a simpler form of unconstrained topology optimization. With further work, the proposed method could be applied to solve general vehicle routing problems such as traveling salesman problems in a more effective way.


I. INTRODUCTION
To solve a shortest path problem (SPP), researchers in the field of transportation and logistics have focused on developing graph search methods such as Dijkstra algorithm [1], Bellman-Ford algorithm [2], Floyd-Warshall algorithm [3], and A * algorithm [4] due to their characteristic simplicity and computational efficiency. However, these algorithms have an inherent limitation in solving the SPPs with complicated and/or specific conditions such as negative weights and cycles. In these cases, integer linear programming has been typically used by assigning a discrete design variable (either 0 for no selection or 1 for selection) to each link in the network [5]. Such link-wise route representation requires additional constraints in the optimization formulation to guarantee flow conservation at each node, thereby aggravating computational performance.
For general vehicle route problems (VRPs) which are of higher complexity, there have been numerous studies to The associate editor coordinating the review of this manuscript and approving it for publication was Dusan Grujić . enhance computational performance in terms of accuracy and time. Note that the traveling salesman problem, which is one of classical optimization problems, is a branch of the VRPs. Tour improvement algorithms have been widely used to obtain an optimal route by gradually improving a route from an initial complete route [6], [7], [8]. Tour construction algorithms have also been used to obtain an optimal route from incomplete random paths through an iterative process [9], [10], [11].
In a real-word roadway network, complicated characteristics needs to be reflected to precisely solve traffic engineering problems. Numerous traffic engineering problems has been experimentally or empirically investigated in the literature [12], [13], [14]. However, as the degree of complexity and nonlinearity increases to consider these characteristics, computing cost increases correspondingly. To overcome this difficulty, multidisciplinary modeling has been often used based on the governing principles well established in various engineering fields. For example, traffic flows that change in real-time can be effectively investigated by introducing a mass-spring system or a hydromechanics system [15], VOLUME 10, 2022 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ [16], [17]. There have also been several studies that implement the electric circuit principles (e.g., Ohm's law and Kirchhoff's law) for traffic flow modeling [18], [19], [20], [21] and traffic assignment [22], [23], [24]. Particularly, electric circuit principles have been used to determine an optimal route in a roadway network [25], [26]. Instead of using conventional link-wise route representation, the loop-wise route representation (LRR) has also been recently proposed by introducing artificial loop variables which are conceptually analogous to loop current in the electric circuit [27]. This LRR scheme enables the VRPs to be formulated with a smaller number of design variables and constraints than the link-wise route representation. However, the above approach has not provided a solid theoretical foundation to bridge the gap between the traffic analysis and electric circuit analysis.
To solve traffic problems in a more efficient and effective way, it is crucial to understand how traffic behaviors in a roadway network are related with the fundamental principles of an electric circuit. As a widely used approach in design optimization, topology optimization can optimize material distribution in a given design domain to extremize a target performance under a set of boundary conditions and constraints. Among various topology optimization methods, solid isotropic material with penalization (SIMP) method assigns an artificial relative density (ranging from 0 for void to 1 for solid) to each finite element and iteratively updates it using the sensitivity information on the objective and constraint functions [28], [29], [30]. By doing so, a final spatial distribution of artificial relative densities represents the optimal layout of a target structure. Stemming from structural mechanics [31], topology optimization has been successfully applied to various engineering areas such as biomedical imaging [32], [33], wireless power transfer [34], [35], and heat transfer [36], [37]. However, to the best of our knowledge, there has been little research to solve the SPPs (or even VRPs) by using topology optimization schemes.
The goal of this study is to investigate the analogy between the electric circuit and roadway traffic analyses in the LRR and then to propose the LRR-based topology optimization. As the first step toward solving general VRPs, this study considers the SPPs in both the symmetric and asymmetric networks. Because the proposed method discretizes a whole network into a set of artificial loop variables like SIMP, well-established topology optimization schemes can be directly utilized to determine the shortest path in the LRR. Numerical results demonstrate the performance of the proposed method and provide the potential of investigating the VRPs from the viewpoint of topology optimization.
This paper is organized as follows. Section II describes the analogy between the electric circuit and roadway traffic analyses. Based on this analogy, the loop-wise route optimization for the SPP is formulated in both symmetric and asymmetric networks in Section III. Section IV presents numerical examples under various settings of the SPPs and discusses their results from the viewpoint of optimization. Then, the conclusion follows in Section V.

II. ANALOGY BETWEEN THE ELECTRIC CIRCUIT AND ROADWAY TRAFFIC ANALYSES
Roadway networks and electric circuits share common features in various aspects. The electric circuit is a closed-loop system which is composed of resistors, conductors, inductors, and/or any other conductive element. The electric charge (Q) flowing through the circuit is discretized in terms of the elementary charge (e), i.e., Q = ne where n is the number of electrons. This movement of the electric charge per unit time (t) is termed as the current which flows from the anode to the cathode, as follows: Interestingly, vehicles in the roadway network have the same role as the electric charges in the electric circuit. Traffic flow (q), which are also discretized in terms of vehicles, can be similarly expressed as the total number of vehicles (N ) traveling through a road section per unit time (t) from the origin to the destination, as follows: Another similarity between the electric circuit and roadway network is the underlying principles in each system. In the electric circuit, voltage, current, and resistance follow Ohm's law, which states that a voltage drop (V ) in a circuit element is calculated by multiplying the current (I ) by its resistance (R). Similarly, in the roadway network, total traveling cost (C T ) for a given road section is determined by multiplying its traffic flow (q) by the traveling cost per vehicle (c), as follows: In most cases, traveling cost is typically expressed in terms of time, money, and/or distance. This study selected time to evaluate the traveling cost. Table 1 summarizes the analogy of the underlying principles in each system. In electrical engineering, the mesh current method [38] has been widely used to evaluate the current for a given circuit. This classical technique defines the loop current which circulates around any closed path in the electric circuit. Figure 1(a) shows a simple example of the mesh current method. Current I 3 flowing through resistor R 3 can be derived by considering two adjacent loop currents I (1) and I (2) . Similarly, in the roadway network, the LRR recently proposed in [27] can be used to determine the optimal traffic flow passing through each road section at user equilibrium. This model defines an artificial loop flow which corresponds to the loop current in the mesh current method. It also sets a base route to represent a traffic demand heading from the origin to the destination (e.g., green dotted lines in Fig. 1(b)). For example, traffic flow x 3 can be derived by defining two loop flow variables x (1) and x (2) .
As if the mesh current method is well established on the basis of electromagnetism, the LRR can be investigated on a  similar basis. Firstly, Kirchhoff's current law states that the algebraic sum of all currents entering and exiting at any node must be zero (i.e., conservation of electric charge). In the LRR, each loop flow (e.g.,x (1) tox (4) in Fig. 2) includes both incoming and outgoing flows (blue and red arrows, respectively, in Fig. 2) of the same magnitude at a node. This setting forces the algebraic sum of all loop flows at a node to be zero, as clearly shown in Fig. 2. Therefore, the LRR always satisfies flow conservation at every node.
Next, the distribution of current under the principle of electric potential causes a voltage drop between two arbitrary nodes in the circuit to be identical along any path connecting two nodes. This phenomenon can also be interpreted in the aspect of energy consumption minimization. Therefore, instead of solving a set of linear equations obtained from the mesh current method, we can determine the same current distribution by minimizing total energy consumption in the circuit, as follows: where R i,j is the resistance of the element which connects nodes i and j and I i,j is the current flowing in the same element. Figure 3 clearly shows that the solution of (3) is identical to that of the mesh current method for a 10 × 10 grid-type network in which the link cost (or equivalently resistance in the electric circuit) is randomly assigned. Based on the above investigation, the LRR can similarly determine the optimal traffic flow in the roadway network, as follows: where x i,j is a link variable which connects nodes i and j, c i,j is the traveling cost in the same link, and b is a value of the base route. Note that, in the LRR, any link variable can be expressed in terms of the loop variablex (k) . This will be further described in the forthcoming section. Then, the sensitivity of the objective function in (4) with respect to a loop variable (x (k) ) becomes equation (5), as follows: where If the reference direction (see Fig. 4) and the direction of the loop variablex (k) are the same in the link x i,j , an increase of x (k) causes the corresponding link flow to increase. Otherwise, it pushes the link flow to decrease. It should be emphasized that the LRR with (4) determines the optimal traffic flow which satisfies user equilibrium. Wardrop's first principle [39] states that, at this state, the travel time between two points becomes identical along any route. Thus, instead of solving a conventional link-wise  optimization formulation which is more complicated, the optimal traffic flow at user equilibrium can be achieved by simply solving (4) for a given traffic demand heading from the origin to the destination. Figure 5 presents a simple example which shows the analogy between the current distribution under the electric potential and the optimal traffic flow at user equilibrium.

III. LOOP-WISE ROUTE OPTIMIZATION FOR THE SHORTEST PATH PROBLEMS
As explained in the preceding section, the proposed LRR with (4) can allocate the optimal traffic flow (i.e., multiple vehicles) to each road section to satisfy user equilibrium ( Fig. 6(a)). Interestingly, if the traffic flow is reduced up to a single vehicle, the LRR can also be used to determine the optimal vehicle route for a SPP (Fig. 6(b)). Such movement of a single vehicle in a roadway network is conceptually similar with that of the electron in the electric circuit. Assuming that a single electron is set to move in a clockwise direction in each loop, four different cases of the link flow can be expressed in terms of the loop current in a two-grid network (Fig. 7). Particularly, the flow offset shown in Fig. 7(c) means that there exists no resultant current in the link due to the dynamic equilibrium of electric charges which move in opposite directions. Therefore, a link with the same adjoining loop variables can be simply excluded in constructing a vehicle route. Based on the above LRR expression for a single vehicle, the subsequent sections will describe the detailed optimization formulation for the SPPs and demonstrate numerical results in both symmetric and asymmetric roadway networks.

A. CASE 1: SYMMETRIC NETWORKS
For the SPPs, the LRR needs to determine discrete link values to represent a link selection for a single vehicle, as shown in Fig. 6(b). To avoid obtaining any intermediate loop values, the loop-wise route optimization can be re-formulated to have an absolute form, as follows: It should be emphasized that the loop-wise route optimization can guarantee a local connectivity without imposing any constraints due to flow conservation shown in Fig. 2. Conversely, conventional link-wise formulation [5] is expressed, as follows: where c i,j is the link cost (i.e., traveling time per vehicle) from node i to j and x i,j is an integer variable that expresses the selection of the same link (i.e., 0 for no selection and 1 for selection). Equation (7b) expresses a constraint function to satisfy the connectivity of a vehicle route at each node. Note that a large number of these connectivity constraints causes a SPP to be more complicated.
In the symmetric networks, the traveling cost between Nodes i and j is the same regardless of a traveling direction (i.e., c i,j = c j,i in (6)). Assuming that a clockwise loop flow is positive and the magnitude of the base route flow is b, we can search for the shortest path by 1) assigning the loop value of +b to the grids which are located above the base route, and/or 2) assigning the loop value of −b (i.e., counterclockwise loop flow) to those located below the base route (Fig. 8). The above assignment for the loop values updates the effective route, starting from the base route. Therefore, the lower and upper bounds of the loop variables need to be set at −b and b, respectively, for flow offset. This study used b = 1 to clearly represent a link selection, i.e., either 0 (not selected) or −1 and 1 (selected depending on its own direction). Because the shortest path has the minimum traveling cost among all possible routes heading from the origin to the destination, (6) determines the same minimum value by iteratively updating the loop values toward the shortest path. If there exist no base route at the beginning of optimization, all design variables simply become zero to provide no traveling cost. Thus, the existence of a base route forces (6) to search for a non-zero minimum traveling cost. It is interesting to note that the objective function in (6) can be considered as the minimization of a ''weighted'' perimeter. If c i,j = 1 for any i and j, (6) becomes the same with a typical perimeter minimization. When (6) converges to determine the shortest path, the optimized non-zero loop variables (−1 and +1 in this study) form a single polygon or hinge-connected multiple polygons which are enclosed by the base route and the shortest path. See green and red areas in Figs. 8, 11, 12, 16 and 17. Under this condition, a weighted perimeter is evaluated only along the shortest path due to the flow offset which occurs along the base route ( Fig. 8(a)). Consequently, a weighted perimeter minimization problem becomes equivalent with a shortest path problem.
From (6), the sensitivity of the objective function (f a ) with respect to a design variable (x (k) ) can be derived, as follows: are opposite. Fig. 9 shows a simple single-grid network to explain the meaning of the design variable sensitivity expressed in (8). Assuming that initialx (k) has a positive value and Nodes 1 and 4 are the origin and the destination, respectively, the sensitivity of the objective function with respect to a loop variable becomes (c 1,3 + c 3,4 ) − (c 1,2 + c 2,4 ). In the case of (c 1,3 + c 3,4 ) < (c 1,2 + c 2,4 ), the design variable sensitivity has a negative value, which forcesx (k) to increase in order to minimize the objective function (i.e., traveling cost). Because the sensitivity value is a constant,x (k) eventually becomes its upper bound (x (k) = 1 in this study). Therefore, the orange path is determined as the shortest path. This phenomenon can also be interpreted in the aspect of the traveling cost. In Fig. 9, the orange path has the traveling cost of (c 1,3 +c 3,4 ), whereas the blue path has that of (c 1,2 + c 2,4 ). In the same case of (c 1,3 + c 3,4 ) < (c 1,2 + c 2,4 ), the traveling cost of the orange path is lower than that of the blue path. Therefore,x (k) needs to be one to determine the orange path as the shortest path.
Conversely, in the case of (c 1,3 + c 3,4 ) > (c 1,2 + c 2,4 ), a positive sensitivity value pushesx (k) to decrease. Whenx (k) has a negative value, the direction of the loop flow is reversed (i.e., from clockwise to counterclockwise). Under the sign convention used in this study, the design variable sensitivity becomes a negative of the original sensitivity. This reversal in the design variable sensitivity results in increasingx (k) up to zero to minimize the objective function. It should be noted that, for any intermediate value ofx (k) , there exist both orange and blue flows heading from the origin to the destination in a grid. Then, total traveling cost becomes x (k) (c 1,3 + c 3,4 ) + 1 −x (k) (c 1,2 +c 2,4 ), which is always greater than the lowest value (either (c 1,2 + c 2,4 ) or (c 1,3 + c 3,4 )). Therefore, (6) can provide a set of discrete loop variables (−1, 0, and 1 in this study) at the end of optimization.

B. CASE 2: ASYMMETRIC NETWORKS
Most real-world roadway networks have different traveling cost between two adjacent nodes depending on the traveling direction (i.e., c i,j = c j,i ). In such an asymmetric network, it is necessary to separately consider two-way links between the nodes to solve a SPP. For this reason, (6) needs to be modified to consider an asymmetric network, as follows:  Then, the sensitivity of the objective function with respect to a design variable becomes Let us assume an asymmetric network where Nodes i and j are connected with two one-way links, as shown in Fig. 10. These two links x i,j and x ,j,i have different cost of c i,j and c ,j,i , respectively. Whenx (l) = 1 andx (m) = 0, it is necessary to consider only a link heading from Node i to j (i.e., x i,j , not x j,i ) with its own traveling cost of c i,j . However, (6) considers both one-way links to evaluate an objective function values, thereby providing (c i,j + c j,i ) as the traveling cost. Because a negative link flow value means that a traffic in a given oneway link flows in a wrong direction, such a link can be filtered out by using a max function expressed in (9). It should be emphasized that, although the total number of links to be considered increases in the asymmetric network, the number of design variables (i.e., loop variables in this study) remains the same with that of a symmetric case.

IV. NUMERICAL EXAMPLES
This section presents numerical examples to demonstrate the performance of the proposed method in both symmetric and asymmetric networks. To solve (6) and (9), this study used the quasi-newton method [40] as a widely used unconstrained optimization algorithm and performed all computation using the AMD Ryzen 7 1800X with a memory of 32 GB and a clock frequency of 3.6 GHz. As reference for comparison, Dijkstra algorithm [1] was used because it can search for the global shortest distance with a high computational efficiency.

A. SYMMETRIC NETWORKS
Figs. 11 and 12 shows the optimization results under various settings of 1) the origin and destination nodes and 2) the base route (green dotted lines) in a 10 × 10 grid-type symmetric network, which consists of 100 nodes and 360 links. For each pair of the origin and destination nodes, the link cost and initial loop flow were randomly assigned. As explained in Section III, the optimized loop values were well clustered into −1 (red area), 0 (white area), and 1 (green area), thereby providing a resultant route (black bold lines) heading from the origin node to the destination node. It is again noteworthy that the proposed method guarantees the continuity of a route without imposing any constraints by virtue of using a characteristic feature of flow conservation in the LRR. In all cases, the optimized routes are identical to those obtained Dijkstra algorithm [1], which is the most widely used shortest path algorithm. As expected, the proposed method successfully approached to the shortest path starting from an arbitrary base route. VOLUME 10, 2022 FIGURE 11. Comparison of the optimization results in a 10 × 10 symmetric network when Nodes 1 and 100 are the origin and destination, respectively. Note that green dotted lines represent a base route, whereas black bold lines represent the shortest path determined.   This study also compared the optimization history when starting from random initial values and the solution of the mesh current method. Compared with random initial values (black cross in Figs. 13 and 14), the solution of the mesh current method (red circle in Figs. 13 and 14) provides a much lower initial objective function value and requires a smaller number of iterations. Stemming from the analogy between the mesh current method and loop-wise route optimization explained in Section II, it can be concluded that the solution of the mesh current method functions as well-conditioned initial values for the proposed method, thereby enhancing the optimization convergence. Fig. 15 shows the comparison of the link setting between the symmetric and asymmetric networks. In the asymmetric network, the link cost to travel from Node i to j (i.e., c i,j ) can be different from that to travel from Node j to i (i.e., c j,i ). Numerical examples were solved under various settings. Particularly, the origin and destination nodes were switched in Cases 3 and 4 to check whether different shortest paths are determined in the asymmetric network. As shown in Figs. 16 and 17, the optimized routes (black bold lines) are identical to those obtained by Dijkstra algorithm in all cases. Thus, the proposed method can determine the short-   est path even in the asymmetric network by slightly modifying an objective function. Note again that the number of design variables (i.e., loop variables) in the asymmetric network remains the same with that in the symmetric case.

V. CONCLUSION
Topology optimization has contributed to achieving significant research outcome in various engineering fields based on the solid theoretical foundation. This study investigated the analogy between the electric circuit and roadway traffic analyses in the LRR and then proposed a novel topology optimization that can determine the shortest path in both the symmetric and asymmetric networks. The proposed method discretizes a whole network into a set of artificial loop variables (design variables in this study), which can be easily interpreted as a resultant vehicle route heading from the origin to the destination. Numerical results demonstrate that the shortest path problems can be solved in a much simpler form of unconstrained topology optimization (specifically, weighted perimeter minimization).
However, this study assumed a free-flow condition in each road section to simplify a nonlinearity between the traffic flow and travel time. Note that the actual travel time rapidly increases as the traffic flow exceeds a given threshold. The above assumption is limitedly valid at a low traffic flow. In the current form of the LRR, the travel time was also set to be time-independent for simplicity. Because the traffic flow passing through a given road section changes over time, the link cost needs to be treated as a timedependent value to precisely evaluate the total travel time at the moment. These dynamic and/or nonlinearity features would be interesting topics to be discussed as the next step.
It should be emphasized that, although this study presented only a simple unconstrained form of the SPPs, the proposed LRR can be extended to express various optimization forms in order to reflect real-world features. For example, conventional algorithms have a difficulty in solving an electric vehicle routing problem (E-VRP) which have negative-weighted edges, and public transportation routing problem which has a node-weighted network due to transfer cost. In addition, there is still room for improvement in enhancing computational efficiency by using the state-of-the-art deep learning schemes.