Optimal Route Searching with Multiple Dynamical Constraints — A Geometric Algebra Approach

The process of searching for a dynamic constrained optimal path has received increasing attention in traffic planning, evacuation, and personalized or collaborative traffic service. As most existing multiple constrained optimal path (MCOP) methods cannot search for a path given various types of constraints that dynamically change during the search, few approaches for dynamic multiple constrained optimal path (DMCOP) with type II dynamics are available for practical use. In this study, we develop a method to solve the DMCOP problem with type II dynamics based on the unification of various types of constraints under a geometric algebra (GA) framework. In our method, the network topology and three different types of constraints are represented by using algebraic base coding. With a parameterized optimization of the MCOP algorithm based on a greedy search strategy under the generation-refinement paradigm, this algorithm is found to accurately support the discovery of optimal paths as the constraints of numerical values, nodes, and route structure types are dynamically added to the network. The algorithm was tested with simulated cases of optimal tourism route searches in China’s road networks with various combinations of constraints. The case study indicates that our algorithm can not only solve the DMCOP with different types of constraints but also use constraints to speed up the route filtering.


Introduction
Optimal path analysis, as one of the most fundamental methods of network analysis, has been used in multiple application fields (e.g., transportation, tourism, and evacuation) [1][2][3][4][5][6][7].Searching for the optimal path that satisfies various kinds of constraints-such as a numerical value or range requirement of path weights (e.g., the time cost), attribute of part of the network elements (e.g., an exchange station as a node that must be visited), and topological structure of the path (e.g., noncyclic or cyclic visiting routes)-forms the problem of the multiple constrained optimal path (MCOP) [8][9][10][11][12].If the network states or constraints change during the optimal route searching process, the problem becomes a dynamic multiple constrained optimal path (DMCOP) problem.Due to the complexity of constraints, both the MCOP and DMCOP problems constitute NP-hard problems [13,14].
Two different types of dynamics can increase the complexity of the DMCOP problem.With type I dynamics, the network condition, such as the weight or topology, changes during optimal path searching; the constraints are not altered.For example, in adaptive dynamic traffic navigation, the optimal path should be dynamically generated with the traffic conditions, where the weights are dynamically changed according to the current traffic status.With type II dynamics, the network conditions are not changed; however, the constraints used to restrict the searching of the optimal path change with time.One example is event-forced constraints, which are not determined unless a certain kind of event (e.g., emergency or user interactions) occurs.In this way, the constraints should be changed according to the specific schedule of the event dynamically occurring.Since these different constraints cannot be known in advance, these constraints should be added dynamically during route planning [15].For instance, in a typical scenario of a long-distance self-driving tour, the navigation may first start from route planning with a start point and an end point.During the travel, users may add location constraints [16], reliability constraints [17], turn constraints [18] for intercity traffic and cycle routes [19], or satisfaction constraints [20].Certain emergency cases may also exist that require the planned route to be dynamically adjusted in a short amount of time according to a series of constraints.
Previous initial studies have addressed the solution of DMCOP with type I dynamics (i.e., network status changes) [21].Schott and Staples used geometric algebra (GA) to solve dynamical multiconstrained routing with numerical constraints [22].Yuan et al. proposed a path matrix-based approach for route extension, which can support the optimal route generation for solving the MCOP problem [23].Yu et al. further developed GA-based DMCOP methods for evacuation [24,25], which can support the DMCOP with dynamic updating of network weights and topologies.Nevertheless, for the DMCOP with type II dynamics, to our knowledge, no effective solution exists that can support different constraints that change during optimal path searching under a unified framework.One possible strategy is to split the problem into several subproblems.However, as different constraints are dynamically applied to the network, multiple MCOP algorithms may be combined to search for the optimal path, and this process results in high complexity or even conflicts that make the route combination fail.
One key issue that increases the complexity of solving DMCOP with type II dynamics is that a variety of constraints exists, including numerical constraints (e.g., the weight value or range requirement of path weights), network elements constraints (e.g., must-visit nodes), and the topological structure of the path (e.g., noncyclic or cyclic visiting routes).All of the various types of constraints cannot be uniformly represented and applied to the optimal route searching.For example, in most commonly used network analyses, the topology and the weights of the network are represented with certain types of data structures (e.g., table-based or tree-based data structures), but constraints in the network analysis are represented mainly as attributes or evaluation rules.As neither the network elements nor the constraints are uniformly represented, only rarely can a universal MCOP algorithm support multiple different types of constraints [26].Therefore, how to use the normal mathematical language to uniformly describe the network elements and various types of constraints and integrate these constraints into the calculation process of optimal route filtering is the key challenge in solving the DMCOP problem with type II dynamics [27].
GA, founded on dimensional computation, provides an ideal tool for the unified network representation and analysis algorithm construction [23,[28][29][30].In our previous work, we introduced GA to the problem of multisource multisink optimal evacuation routing that partially provides the possibility to design the DMCOP algorithm to support different constraints.However, this method is performed from the perspective of data structure and lacks the integration of type II constraints to form a normative approach through a formal mathematical expression, and this method is also more focused on the weight and topological change of networks rather than the constraint change.If the constraints are complex and various, the efficiency of the method will be largely affected.
In this study, we discuss the development of a unified GA framework to address multiple types of constraints and propose a universal algorithm to solve the DMCOP problem with type II dynamics.
We first review the definition of the DMCOP problem with type II dynamics and the GA representation of various types of constraints, and then we create the GA coding of the network elements, including nodes, paths, routes, topologies, weights, and constraints.Network operations, such as the expansion of paths, link relationship computation, embedding weight, and filtering of routes with constraints, are developed to construct a DMCOP algorithm with type II dynamics.Then, a case study of tourism route planning is developed to test our algorithm.

Definition of the DMCOP with Type II Dynamics
Given the graph G = (V, E), each path P(i, j) ∈ G (i, j ∈ V) in the graph contains a main cost weight , where m is each segmented element of the path, and a constraint set W c (P(i, j)), which is abbreviated as W c .The MCOP [31] can be defined as In Equation ( 1), the optimal route is defined as a path P(s, t) with a start node s and an end node t that satisfy all of the constraints set with a minimum main cost weight M ∑ m=1 W m P(s, t) .Since various types of constraints exist, the constraints set W c can be further split into multiple constraint sets, for example, W c = {W nc , W wc , W tc }, where W nc , W wc , and W tc are nodes, weights, and topological constraints, respectively.
Since the constraints change according to the various schedules as the events dynamically occur in the DMCOP with type II dynamics, we can assume that the whole network search process can be split into several time frames T c = {t 1 , t 2 , • • • , t n }.For each t i in T c , a constraint change event occurs that necessitates a recalculation of the optimal path.Then, the optimal path search can be defined as follows: Here, r i (i = 1, 2, . . ., n) denotes the passing node in the route search, and m = 1, 2, . . ., M t i (i = 1, 2, . . ., n) represents the segmented element of the path in time frame t i .Although in DMCOP with type II dynamics, we do not initially know how the time frame should be split, for any selected route from the start point to the end point, there is a determined split of time frames.Assuming that various types of constraints should be processed during time frame sets T c = {t 1 , t 2 , • • • , t n } and are expressed as Wt c Tc = {Wt c t 1 , Wt c t 2 , . . ., Wt c tn }, then the feasible path at the time frame T c should satisfy the constraints W m (P(s, In this way, the DMCOP with type II dynamics can be defined as follows:

Basic Ideas
According to the problem definition above, the solution to the DMCOP problem with type II dynamics can be split into the following three steps: (1) Because the constraints are varied and often linked with the network elements, a formal description of constraints and network elements integrated into a unified framework should be constructed to reduce the transformation complexity of different constraints; (2) Due to the dynamically added constraints, the route generation strategy, which can dynamically integrate constraints during feasible path generation and optimal path searching, should be constructed [32]; (3) As the actual network problems are often large in scale, an efficient solution strategy should be carefully designed.Therefore, combing through the GA properties and analysis above, the specific ideas regarding the three steps are as follows.
First, for the GA-based unified expression of network and constraints, the network elements, such as the nodes, edges, and paths, can be uniformly generated and stored in a blade structure.This blade-based expression form can represent the network elements already explicitly containing the nodes and path information of the route so that the representation of constraints can be directly constructed by rules that evaluate whether the blades are fitted for certain conditions or not.Second, for the route generation with dynamically added constraints, in the manner of GA route searching, the routes can be algebraically extended step-by-step with GA-based matrix multiplication operators [23].Thus, the generation-refinement paradigm can be adopted to apply the constraints to the procedure of network route extension to filter out the unfeasible paths [33].Third, for the optimizing strategy of the solution of the DMCOP problem with type II dynamics, the divide-and-conquer greedy algorithm can perform the local solution and updating of the path to reduce the problem scale.In addition, using the algebraic expression of constraints and the relation operators provided by GA, a strategy that is similar to recursive or pruning can be applied to reduce the search numbers and improve the ability and efficiency of path filtering.
Based on the GA network representation, route extension, and route filtering, a framework of GA-based DMCOP with type II dynamics was developed (Figure 1).In this framework, the network elements in the original network and the adjacency matrix were first represented by the GA coding.Then, the well-defined oriented join product was applied to realize the route extensions.Taking advantage of the unified network representation, the numerical, node-inclusion, and route-structure-related constraints were formally defined.By defining the operators that could support various types of constraints, a unified representation and integration strategy for various constraints was constructed.We then defined a dynamic optimal searching strategy of the feasible paths, which searches for the optimal path iteratively.During the path searching, the constraints were dynamically inserted and used to filter the feasible path.By iteratively sorting out the accumulated cost of all the feasible paths that were evaluated during the route extension, the optimal path was dynamically generated.

Basic Network Element Expression with GA
A unified representation of the network elements should integrate the representation of nodes, edges, paths, and weights of the network [23].Thus, the following terms are first defined as follows.

Basic Network Element Expression with GA
A unified representation of the network elements should integrate the representation of nodes, edges, paths, and weights of the network [23].Thus, the following terms are first defined as follows.
Definition 1 (network node expression with GA).Consider a network node set {N 1 , N 2 , . . . ,N n }, which can be coded in the GA system as follows: where {e 1 , e 2 , . . . ,e n } are the basis vectors in GA and correspond to the 1-blades that can be used as the fundamental construction elements of other network components (e.g., edges and paths).
Definition 2 (network edge and path expression with GA).The network edge E, which is normally interpreted as the connection between two adjacency nodes N i and N j , can be mapped to the GA space based on the outer product as follows: Here, e i ∧ e j , the 2-blade, can be abbreviated as e ij .By analogy, the path between the nodes N i and N j can be represented as the k-blades as and the order of the vectors corresponds to the sequence of the passed nodes within the path.Then, the path set, which is used to describe the paths between the two given nodes, can be expressed as S(i, j) = {P(i, j) 1 , P(i, j) 2 , . . . ,P(i, j) n }.
Definition 3 (network weight expression with GA).The weights are scalars that indicate the cost of the edges or paths, which include the multiplicative and additive weights [26,34].To integrate both the multiplicative weight w * ij and additive weights w + ij to the edge e ij , we can define the following expression: Based on this expression, the weight calculation between the edges e ij and e ik can be expressed as Weight (w , where P ik is the abbreviation of the path P(i, k) that connects the edges e ij and e jk .
Basing on the above definitions, an example of the unified representation of the network with the GA is depicted in Figure 2. Basing on the above definitions, an example of the unified representation of the network with the GA is depicted in Figure 2.

Dynamic Route Generation with GA
In the DMCOP problem with type II dynamics, because the constraints vary at different times, the feasible path must be dynamically generated and then filtered with the constraints.Thus, at first, the oriented join product ∨ is used to support the route extension [23].Given two paths ( , )

Dynamic Route Generation with GA
In the DMCOP problem with type II dynamics, because the constraints vary at different times, the feasible path must be dynamically generated and then filtered with the constraints.Thus, at first, the oriented join product ∨ is used to support the route extension [23].Given two paths P(a, b) and P(b, c), as the last node of the paths P(a, b) has the same node b as the first node of path P(b, c), their oriented join product is defined as follows: where P(a, b) and P(b, c) are respectively the specific subspace of P(a, b) and P(b, c), from which their intersection b has been removed.For nonloop paths, P(a, b) ∨ P(c, d) = 0 also means that the path has a loop by the oriented join product.Because nodes, edges, and paths are all k-blades (k = 1, 2, . . ., n) that are caused by the geometric product of node vectors, the comprehensive expression and computation of nodes, edges, and paths in the framework can be realized.To make path generation possible, the following rules are constructed: The expression rule provides a formal way to express the path for which a and b represent the subscripts of the start and end nodes, and i, j, . . ., k correspond to the subscripts of the visited nodes.The adjacent rules provide an operation and a determination for the path extension.
As a precondition of path analysis, the network graph directly affects the structure and complexity of the network analysis algorithms.Schott suggested using nilpotent adjacency matrices [35], which can generate an algebra system corresponding to the network topology.Slimane proposed operator calculus algorithms for MCOP path generation in which a path randomly passing n nodes can be represented as an n-order object (i.e., an n-blade) with n nodes connected in order [36].Yuan established a universal network coding and a computing method based on the topological relationship between different nodes and developed the expression and algorithm structural framework based on the oriented join product [23].Based on these studies, we can code the nodes using GA bases.The GA operation can then be applied to accomplish the generation, traversal, and selection of paths according to the definition of the topology and the space of the GA operation.
For a given network, the network-adjacency matrix M is initialized according to the GA-based coding as shown in Figure 2. The path of the network can be generated by applying the oriented join product to the matrix.In this way, the topological relationship and path weights can be obtained synchronously.Since the start nodes and end nodes are predefined in most cases and do not change during each iteration, it is preferred to construct the submatrix of the adjacent matrices by the start nodes and end nodes, which lessens the amount of computation for the algorithm.According to this idea, the start nodes matrix, end nodes matrix, and path matrix are constructed.Take the network in Figure 2 as an example.If we require all of the paths from nodes e 1 , e 3 to nodes e 2 , e 6 , the path matrix can be initialized as follows: Figure 3 indicates that the path matrix selects the elements in the 1st and 3rd rows and in the 2nd and 6th columns.The path matrix can be represented as M F{e 1 ,e 3 }T{e 2 ,e 6 } , mainly because the 1st and 3rd rows represent all the edges starting with nodes e 1 , e 3 and the 2nd and 6th columns represent all the edges ending with e 2 , e 6 .Similarly, the start node and end node matrices can be expressed as A 1 = M F{e 1 ,e 3 }T{.}and M F{.}T{e 2 ,e 6 } .Because the start node matrix is the computing matrix of the next iteration of the loop, the computing matrix can be assigned with A = M F{e 1 ,e 3 }T{.} .and 3rd rows represent all the edges starting with nodes 1 3  , e e and the 2nd and 6th columns represent all the edges ending with 2 6  , e e .Similarly, the start node and end node matrices can be expressed as  According to Equation ( 7), the path is extended by the oriented join product.Similarly, the computing matrix can be extended by the oriented join product.Using the network and adjacency matrix in Figure 3, the computing matrix extension can be realized with the following equation:

GA Expression of Multiple Constraints
For the DMCOP with type II dynamics algorithm, the key is the path selection for different constraints, which are recognized as certain conditions that paths should satisfy in the DMCOP with type II dynamics.Although it is possible to carry out direct searching and filtering of the route to fit the constraints using brute-force route extraction [23], the power of the algebraic representation cannot be fully used, and the solution to the problem is not elegant.Therefore, in this section, we formally define the algebraic representation of constraints and aim to integrate them into optimal According to Equation ( 7), the path is extended by the oriented join product.Similarly, the computing matrix can be extended by the oriented join product.Using the network and adjacency matrix in Figure 3, the computing matrix extension can be realized with the following equation:

GA Expression of Multiple Constraints
For the DMCOP with type II dynamics algorithm, the key is the path selection for different constraints, which are recognized as certain conditions that paths should satisfy in the DMCOP with type II dynamics.Although it is possible to carry out direct searching and filtering of the route to fit the constraints using brute-force route extraction [23], the power of the algebraic representation cannot be fully used, and the solution to the problem is not elegant.Therefore, in this section, we formally define the algebraic representation of constraints and aim to integrate them into optimal route searching.Considering that network elements are uniformly expressed by a blade structure that explicitly contains the nodes and path information of the route, the expression of constraints can be directly constructed by rules that evaluate whether the blades are fitted for certain conditions or not.For example, the must-visit node constraints can be formulated as a certain basis vector that must exist in the blade, and the path cost constraints can be defined by filtering the sum of the scalar part of the blade.Therefore, according to the node, weight, and topological constraints, three corresponding operators, i.e., the node-inclusion constraint operator C Node (), number constraint operator C Num (), and linear structure constraint operator C LStr () are defined as follows.

Node-inclusion constraints:
Node-inclusion constraints mean that for a special-node issue, the optimal route should contain a special node, i.e., the blade set of the path should contain the basis vector that indicates the special node.Therefore, the special-node issue can be realized by searching for the special basis vector of the blade set.According to Equations ( 2) and (3), we use the meet operator "∩" to detect the must-visit nodes.If any path in the route does not satisfy the node-inclusion constraints, the route is filtered out from the feasible path sets.Supposing that arbitrary node e v is in the must-visit node set V , we have For each step of route searching, we check the constraint to remove the invalid path that is unable to create an appropriate path in the next steps.Since the route is dynamically generated, the paths that do not satisfy the constraints are not processed further in the next step.In this way, the additional constraints do not rapidly increase the computational complexity.In addition, the large number of constraints greatly reduces the scale of the feasible path set during traversal, making it possible to support a large degree of constraint filtering.

Numerical constraints:
The numerical constraints can be transformed into the threshold constraints represented as g max .Since the arbitrary path p(i, j) is expressed using the blade structure, the norm operator p(i, j) , which can extract the scalar part of the blade, can be used to extract the weight part of the path.Thus, C Num () can be defined as follows: The numerical constraints can be integrated during the optimal route searching by directly evaluating the value of the weight.Comprehensively considering the influence of the weights, we establish the function f that can embed the numerical constraints into the search path; thus, the updated k-order path p(i, j) under the GA framework is where C Num (p(i, j)) means that the numerical constraints can be embedded in the route extension procedure.Since the path in the GA framework is dynamically generated using matrix multiplication, if any path in a route has not satisfied the numerical constraints, then the route is filtered out from the feasible path set.This process is also helpful for optimal path searching when the number of constraints is large.

Route-structure-related constraints:
The structure constraints include the open route and the circular route (loop route) [37].A loop is a kind of special path structure where the start node and end node are the same.If a certain path has a circuit, the path must have at least one repeating node [38].The outer product can be available to decide the linear dependence, i.e., the result is 0 when the same elements between the edges are involved in the outer product performance.Furthermore, in an adjacent matrix, all the diagonal elements represent the loop path based on the current location [29].In this way, the loop and nonloop paths not only are distinguished but also can be processed independently.Since the loop route we consider here is a constraint, if the constraint exists, only algebraic elements in the diagonal line are required to be considered.Otherwise, if no circular constraints exist, then the circular paths can be skipped such that the structure-related constraining operator C LStr ( ) for the given path p(i, j) can be defined as follows: Thus, the C LStr ( ) operator eliminates all of the paths with the same subscripts, which means that the start point and the end point are the same.Therefore, by using the linear structure constraint operator C LStr ( ), the estimated routes are all open paths.In contrast, because the k-order circular route directly corresponds to the diagonal elements of the adjacent matrix, the circular constraints can be achieved by retrieving the diagonal elements.

Dynamic Filtering of the Path by Constraints
During the route-searching process, the path extension is guaranteed to satisfy the three types of constraints introduced in the previous section.If the path satisfies the constraints, this path is one of the candidates for the optimal path.To screen out suboptimal paths, an updated method of the path matrix is defined, which is also helpful for dynamic updating and tracing of the path with constraints.To make the path filtering clear and efficient, we can define the following three route filter operators: Definition 4. NodeFilterOp is defined with the meet operator, which is used to calculate whether a certain node e i is included in the generated path: The route is generated by the computing matrix A, which contains several different routes during the route generation stage.Directly applying the NodeFilterOp operator to each route in the matrix A may not be computationally efficient.Thus, we can further optimize the NodeFilterOp operator by the set relations.Initially, the must-visit nodes passed in A n can be obtained by ∩ relative to those in A n−1 at the last step.The corresponding elements in A n−1 must be updated if the path in A n contains new must-visit nodes.The relationship of must-visit nodes between these two path matrices can be determined by the standard join operator "∪" because this operator is a set algebra relation.Supposing that the must-visit node sets are V n and V n−1 , the update principles of the computing matrix are as follows: In the first pattern, the grade of V n ∪ V n−1 is greater than the maximum grade of V n and V n−1 (Figure 4a,b).The solved path should be merged with the original path matrix; in the second case, when the grade of V n ∪ V n−1 equals the grade of V n−1 , the path matrix can be generated according to the end nodes in the commutating matrix A n−1 , and then the path in M n−1 is the optimal one (Figure 4c).Finally, when the grade equals the grade of V n , the newly solved path is optimal (Figure 4d).
ISPRS Int.J. Geo-Inf.2018, 7, x FOR PEER REVIEW 10 of 19 In the first pattern, the grade of is greater than the maximum grade of

M
is the optimal one (Figure 4c).Finally, when the grade equals the grade of n V , the newly solved path is optimal (Figure 4d).NumericalFilterOp is the numerical constraints filter operator, which is used to calculate whether certain network elements' weights or costs fit a certain threshold.Thus, we define the ( ( , ), type, threshold) p s NumericalF t ilterOp as follows: Definition 5. NumericalFilterOp is the numerical constraints filter operator, which is used to calculate whether certain network elements' weights or costs fit a certain threshold.Thus, we define the NumericalFilterOp(p(s, t), type, threshold) as follows: According to Equation ( 8), we can further extend NumericalFilterOp to a multiplicative weight or cost.In NumericalFilterOp, the numerical constraints for weights can be directly filtered by the w * i and w + j of a certain path.The filtering of such weights is straightforward and direct during path generation, i.e., in the update procedure of the computing matrix A n , the path element that does not fit the constraint can be replaced by 0. For the cost constraints, the cost function should be applied to each path in the generated path matrix M n , and the path that does not fit the cost constraints should be filtered.Definition 6. TopologicalFilterOpis the topological constraint filter operator.TopologicalFilterOpcan filter straight or circular paths.As in the definition of C LStr (p(s, t)), we can use the elements located at the diagonal of the path matrix M n to filter the cyclers.In this way, we define TopologicalFilterOp as Here, M n ij represents the element in the i-th row and j-th column of the path matrix M n .By using the update method, we can remove many unnecessary traversals by deleting paths that break rules, which can significantly decrease computational complexity.In addition, based on the simultaneous path extension from the beginning to the ending nodes, the efficiency of the algorithm can be better enhanced.Relative to the traditional step-by-step analysis algorithm based on the greedy method, the shortest path of GA adjacency is clearer and simpler.

Greedy Multiconstraint Route-Searching Algorithm
Based on the definitions above, we define a greedy multiconstraint route-searching algorithm on the foundation of the multiplication by the adjacent matrix and computation matrix and use the constraint filtering operators to filter the feasible path.Since the constraint integration is realized by evaluating simple conditions in searching, increasing the number of constraints does not necessarily increase the computational complexity.Therefore, the algorithm proposed here can efficiently support the optimum path analysis over a large range of constrained conditions.The complete algorithm is depicted in Figure 5.
constraint filtering operators to filter the feasible path.Since the constraint integration is realized by evaluating simple conditions in searching, increasing the number of constraints does not necessarily increase the computational complexity.Therefore, the algorithm proposed here can efficiently support the optimum path analysis over a large range of constrained conditions.The complete algorithm is depicted in Figure 5.The implementation process of the greedy multiconstraint route-searching algorithm is provided in detail as follows: (1) Construct the adjacent matrix M and the computing matrix (start node matrix) A 1 via the network data and the start nodes.We selected a subset of elements in the matrix A 1 to form the simplified path matrix M 1 , which was adopted to store the path that connects the end nodes.(2) For the given start node e a and end node e b , the simplified start node matrix A 1 is M F{e a }T{.} .
Extend the first route by using the formula A 2 = A 1 ∨ M, which extends the route from time frame t 1 to t 2 .The final computing matrix A 2 can be updated according to the above Formula (15), as the computing matrix A 2 has the same start node as M F{e a }T{.} , and then the path matrix M 2 can be generated according to the end node matrix M F{.}T{e b } and defined as M 2 F{e a }T{e b } .(3) Apply constraints with the constraining operators and filter the path matrix.(4) Extend the computing matrix by using the formula A k+1 = A k ∨ M and Formula (15).( 5) Repeat the third and fourth steps until all paths that meet the constraints are found.

Case Study: Application in Dynamic Tourism Planning
We evaluated a real-world case study of the planning of a tourism route in Jiangsu Province with the road network data.In this case study, optimal tourism planning routes that should dynamically meet several different inserted constraints were studied based on Jiangsu road network data downloaded from the OpenStreetMap website (http://www.openstreetmap.org).After the topological correction, the final experiment data contained 9783 nodes and 23,338 road segments.To test the various constraints, we added several different attributes to the road segments of the data, including the lengths, velocity, and pass time of the road segments.The data were first imported into the CAUSTA system [30] and then represented by GA.
To illustrate the dynamic scenarios, a simulated tourism event was raised, which could be separated by 4 steps as shown in Table 1.First, the initial goal of the tourist was to drive from Site 1 to Site 6; second, after some deep investigation, four interest points, i.e., Site 2, Site 3, Site 4, and Site 5, were added; third, after arriving at Site 2, because of the time limitation, Site 3 was omitted from the interest list; fourth, upon arriving at Site 4, because of a budget shortage, the remainder of the tour had to circumvent the highway to avoid the road toll.

Steps Demands Constraints
Step 1 Site 1 to Site 6 The shortest path from Site 1 to Site 6 Step 2 Site 1 to Site 6; pass Site 2, Site 3, Site 4, and Site 5 The shortest path from Site 1 to Site 6 with the node constraint of Site 2, Site 3, Site 4, and Site 5 Step 3 Site 2 to Site 6; pass Site 4 and Site 5 The shortest path from Site 2 to Site 6 with the node constraint of Site 4 and Site 5 Step 4 Site 4 to Site 6; pass Site 5; cannot use the highway road The shortest path from Site 4 to Site 6 with the node constraint of Site 5, and with the attribute-related constraint that cannot use highway road The 4-step dynamic constraints listed in Table 1 were formulated in the CAUSTA system and were interactively applied to filter the result path.For the first step, the filter was set to NULL so that the shortest path without any other constraints was evaluated (Figure 6a); during the second step, the node constraint was dynamically added to obtain a more winding path and obtain all the interest points (Figure 6b); after arriving at the third step, one of the constraint nodes was omitted to update the road cost in less time (Figure 6c); finally, the attribute-related constraint of the highway road was incorporated to obtain a more affordable path (Figure 6d).As shown in the case study, according to the dynamic insertion of the constraints, the feasible path sets are dynamically reduced, and the algorithm can filter out the final optimal path.
The experiment demonstrated that our method obtains the optimal path with numeric, node, and structure constraints.However, the applicability of the method in real tourism route planning should also integrate more realistic factors and provide several alternative paths to fit customer requirements.The support for various kinds of constraints in the optimal routing can certainly be beneficial for real-world tourism routing.algorithm can filter out the final optimal path.
The experiment demonstrated that our method obtains the optimal path with numeric, node, and structure constraints.However, the applicability of the method in real tourism route planning should also integrate more realistic factors and provide several alternative paths to fit customer requirements.The support for various kinds of constraints in the optimal routing can certainly be beneficial for real-world tourism routing.

Support for the Various Constraints
For the DMCOP methods with type II dynamics, the abundance of types of constraints can increase compatibility with different dynamic application scenarios.Table 2 lists the most commonly used constraints, including node-inclusion constraints (Constraints ID 1), additive weights (ID 2, ID 3), multiplicative weights (ID 4), and route type constraints (ID 5, ID 6).Other types of attributes of the path, including road type, road grade, and road status (ID 7), were considered.These constraints were then formulated as GA expressions and processed interactively and dynamically in the Clifford Algebra-based Unified Spatial-Temporal Analysis (CAUSTA) system with the DMCOP analysis modules using Visual C++, which is sourced from Microsoft Corporation Redmond, Washington, USA [30].All experiments were tested on a Windows 7 system using Visual Studio 2010, which is

Support for the Various Constraints
For the DMCOP methods with type II dynamics, the abundance of types of constraints can increase compatibility with different dynamic application scenarios.Table 2 lists the most commonly used constraints, including node-inclusion constraints (Constraints ID 1), additive weights (ID 2, ID 3), multiplicative weights (ID 4), and route type constraints (ID 5, ID 6).Other types of attributes of the path, including road type, road grade, and road status (ID 7), were considered.These constraints were then formulated as GA expressions and processed interactively and dynamically in the Clifford Algebra-based Unified Spatial-Temporal Analysis (CAUSTA) system with the DMCOP analysis modules using Visual C++, which is sourced from Microsoft Corporation Redmond, Washington, USA [30].All experiments were tested on a Windows 7 system using Visual Studio 2010, which is sourced from Microsoft Corporation Redmond, Washington, USA.The hardware platform was a Lenovo T440s notebook with an Intel Core i5-4200U CPU (1.60 GHz, 4 GB RAM).
Since there are no commonly used DMCOP methods with type II dynamics, the four existing MCOP algorithms, namely, the Lagrange relaxation traverse algorithm (LRT), Yen's K-Path algorithm, Staples's K-cycle algorithm [29], and Lozano's exact method [39], are used as references to test the accuracy and efficiency of our approach.As none of the four mentioned algorithms can support all of the constraints we provide in Table 2, we first compared the applicability of different algorithms with various types of constraints (Table 3).Clearly, our method is the only one that can accommodate a variety of constraints in a single algorithm.

Efficiency Comparison
To test the performance of our algorithm, the various types of constraints in Table 2 were applied randomly to perform 100 experiments.As Staples's K-cycle algorithm is originally implemented in Mathematica but is unavailable in C++, this algorithm is not contrasted here.The average computation times were logged and are compared in Table 4. From Table 4, our algorithm was the only one that calculated the optimal path within an acceptable computation time.Although the existing mature algorithms were faster in some cases (e.g., with only the numerical additive constraints), this may be because these methods store the network topology and constraints in advance by the adjacency matrix or adjacency list.But these methods are mainly designed for the problems with specific constraints that are difficult to deal with and the DMCOP problems with type II dynamics.In our algorithm, the route structure constraints in particular greatly increased the computational cost because the filtering of the route structure in most cases is expected to eliminate all of the possible paths.Since the GA-based DMCOP algorithm with type II dynamics is only in the early stages of development, we expect it to be possible to fully optimize the algorithm to make it considerably more efficient, on par with most of the current MCOP algorithms.

Potential Application of this Template-Based Approach
The diversity and heterogeneity of the constraints pose major challenges to the construction of the GA-based network analysis algorithm.The algebraic formulation of the wider range of constraints may be the key issue for extending the GA-based DMCOP algorithm with type II dynamics.In this study, we mathematically represented three different kinds of constraints and integrated them into the DMCOP with type II dynamics.However, more complex constraints should also be considered in realistic traffic routing applications [40,41].For example, in real tourism route planning, issues such as road form, max-flow, and objective constraint should be modeled and integrated into the solution to the DMCOP with type II dynamics.Other updates of the components, such as attributions, should also be considered.A large percentage of such constraints can be transformed into one of the other types of constraints or a combination thereof.Therefore, the optimal path can be solved directly.
For other kinds of constraints that cannot be converted into the three types examined here, the dynamic generation properties of solving the GA-based network path may be helpful in solving such problems according to the generation-refinement paradigm (e.g., multiconstraint transportation network design [42,43] and transit network analysis [12,44]).With the network represented in the GA framework, the route in the network can be directly generated and refined according to the properties of the algebra system.With the generation-refinement paradigm, certain kinds of constraints (e.g., routes with a certain number of nodes) can be directly solved without traversing all of the network routes.
In the GA-based DMCOP framework with type II dynamics, the path matrix method concentrated on GA offers a unified expression for both the connective relationship of the network graph and the node information.The method directly calculates the path based on the adjacency matrix.Since all of the path evaluations and queries are based on GA, which has unified mathematical and geometrical significance, the method may aid the construction of distinct network analysis algorithms and then unify the analysis algorithm structures of various networks.In addition, the weight expression and embedding methods can support path traversal, including weights.The separation of weight and topology enables the quick indexing of the path and supports the path searching process even if the weight and the constraints are changed dynamically.Moreover, the independence and uniformity of the oriented join product operation provide the network analysis based on GA with a computational infrastructure for parallel computing.All features above contribute to the large-scale network analysis in the multicondition, multiconstraint, and multiuser environment.

Directions for Future Improvements
In our GA-based DMCOP algorithm with type II dynamics, optimizing paths generated by the oriented join product of adjacency matrices was the key to enhancing the algorithm efficiency.Further optimization could still be achieved to improve the efficiency of the algorithms.The optimization approaches include the following: (1) constructing general data models and structures that are suitable for large-scale networks; for example, a sparse matrix, which can reduce the time and space occupancy for this kind of network, could be used to increase the storage and query efficiency [45]; (2) constructing quick parallel algorithms and applying them to the oriented join product operation of the adjacency matrix; for example, we can introduce matrix partitioning or premultiplied tables to accelerate the path-searching process; (3) optimizing the constrained integration and path selection principles when paths are generated; path querying using the oriented join product can sharply reduce the computing complexity and support the network analysis with more complex constraints; and (4) optimizing the method with decomposition and hierarchical representation of routes [46,47].

Conclusions
The DMCOP algorithm with type II dynamics is vital to traffic path planning analysis.It is challenging for the current algorithms to solve problems under a unified framework due to the diversity and complexity of conditional constraints.In this study, we used rigorous mathematical definition, the multidimensional expression of GA, to construct a unified network expression of network elements and constraints and then achieved an algorithm under the generation-refinement paradigm to solve the DMCOP problem with type II dynamics.The algorithm can support numerical, nodal, and structural constraints that are dynamically inserted during the path searching.Relative to most existing MCOP and DMCOP algorithms, our method is more unified and has comparable efficiency, especially when addressing a large range of constrained conditions.Although our method results in mathematical construction complexity and possibly small affection in efficiency in engineering realization, based on this uniform representation, calculation, and algorithm construction framework, our method is flexible, complete, and elegant.

19 Figure 1 .
Figure 1.The framework of solving the DMCOP with type II dynamics.

Figure 1 .
Figure 1.The framework of solving the DMCOP with type II dynamics.
ISPRS Int.J. Geo-Inf.2018, 7, x FOR PEER REVIEW 6 of 19Based on this expression, the weight calculation between the edges ij ik P is the abbreviation of the path ( , ) P i k that connects the edges ij e and jk e .
P b c , as the last node of the paths ( , ) P a b has the same node b as the first node of path ( , ) P b c , their

. 3 {
Because the start node matrix is the computing matrix of the next iteration of the loop, the computing matrix can be assigned with 1

Figure 3 .
Figure 3. Path matrix construction from the adjacency matrix.

Figure 3 .
Figure 3. Path matrix construction from the adjacency matrix.
Figure 4a,b).The solved path should be merged with the original path matrix; in the second case, when the grade of the path matrix can be generated according to the end nodes in the commutating matrix −1 n A , and then the path in −1 n

Figure 4 .
Figure 4. Inclusion relations of the must-visit nodes.(a) the grade of 1 n n V V −  is greater than

Figure 4 .
Figure 4. Inclusion relations of the must-visit nodes.(a) the grade of V n ∪ V n−1 is greater than maximum grade of V n and V n−1 ; (b) the grade of V n ∪ V n−1 is greater than maximum grade of V n and V n−1 ; (c) the grade of V n ∪ V n−1 equals the grade of V n−1 ; (d) the grade of V n ∪ V n−1 equals the grade of V n .

Figure 5 .
Figure 5.The flow of the multiconstrained optimal path algorithm based on GA.

Figure 5 .
Figure 5.The flow of the multiconstrained optimal path algorithm based on GA.

Figure 6 .
Figure 6.Demonstration of optimal path searching with dynamic addition of different constraints.(a) the shortest path without any constraints; (b) the winding path with the dynamically added node constraint; (c) the updated path when one of the constraint nodes was omitted; (d) the affordable path when the attribute-related constraint of the highway road was incorporated.

Figure 6 .
Figure 6.Demonstration of optimal path searching with dynamic addition of different constraints.(a) the shortest path without any constraints; (b) the winding path with the dynamically added node constraint; (c) the updated path when one of the constraint nodes was omitted; (d) the affordable path when the attribute-related constraint of the highway road was incorporated.

Table 1 .
Table of constraints in the case study.

Table 2 .
Table of constraints in the case studies.

Table 3 .
Constraints supporting comparison between different algorithms.++, the algorithm can support such constraints directly; +, the algorithm can support such constraints with modification or with additional filtering with the output results; -, the algorithm cannot support such constraints.

Table 4 .
Average time costs of different algorithms with different constraints (unit: second/s) *.