Optimization of Scanning and Counting Sensor Layout for Full Route Observability with a Bi-Level Programming Model

Utilizing the data obtained from both scanning and counting sensors is critical for efficiently managing traffic flow on roadways. Past studies mainly focused on the optimal layout of one type of sensor, and how to optimize the arrangement of more than one type of sensor has not been fully researched. This paper develops a methodology that optimizes the deployment of different types of sensors to solve the well-recognized network sensors location problem (NSLP). To answer the questions of how many, where and what types of sensors should be deployed on each particular link of the network, a novel bi-level programming model for full route observability is presented to strategically locate scanning and counting sensors in a network. The methodology works in two steps. First, a mathematical program is formulated to determine the minimum number of scanning sensors. To solve this program, a new ‘differentiating matrix’ is introduced and the corresponding greedy algorithm of ‘differentiating first’ is put forward. In the second step, a scanning map and an incidence matrix are incorporated into the program, which extends the theoretical model for multiple sensors’ deployment and provides the replacement method to reduce total cost of sensors without loss of observability. The algorithm developed at the second step involved in two coefficient matrixes from scanning map and incidence parameter enumerate all possibilities of replacement schemes so that cost of different combination schemes can be compared. Finally, the proposed approach is demonstrated by comparison of Nguyen-Dupuis network and real network, which indicates the proposed method is capable to evaluate the trade-off between cost and all routes observability.


Introduction
The network sensor location problem (NSLP) to determine traffic volumes and monitor traffic network status has been of ever-growing interest as the variety of sensor technologies has increased and matured. Different types of sensors can provide different traffic data ranging from point-data to continuous path-data. Nowadays, there are mainly two functional categories of traffic sensors: counting sensors (inductive loop detectors, magnetic sensors, etc.) and scanning sensors (video detection systems, automatic vehicle identification sensors, etc.). Counting sensors, especially inductive loop detectors, have been extensively installed in roadways, where they are able to provide point-data including vehicle counts, presence, occupancy and speed. Scanning sensors can extract the path-data of travel time, route flow and O-D flow in addition to point-data. As for the network, traffic sensors are used to observe and identify critical flow information with regard to route flow, link flow and O-D flow. The network sensors location problem tries to answer the questions of how many sensors, what types and where corresponding sensors should be located to observe traffic flow to get as much traffic information as possible. There exist different definitions related to observability in NSLP and traffic state estimation. The flow observability in NSLP denotes whether the unknown or unobserved flows can be uniquely calculated in terms of the known or observed flows in a network based on the traffic conservation equations [2]. In general, the flows include route flows, links flows and O-D flows. In practice, the known or observed flows are identified by different traffic detectors. The number and location of sensors could generate the full and partial observable problem depending on if there exists a unique solution of the linear equation system between unknown flow and deployed links. If the equations have a unique solution, we say the network system is fully observable, otherwise it is partially observable (see Section 2). In addition, the observability problem varies from counting sensors to scanning sensors because of different extracted traffic information. As shown in Figure 1, most of the literature concentrated on the single type of sensors (counting or scanning) location problem. Castillo et al [3] proved it is impossible to identify the full route flow under some particular conditions, even if every link is deployed by counting sensors, because link equations are dependent. Castillo et al. [4][5][6][7][8] provided a series of theoretical models and methodology for the flow observability problem related to both types of sensors, including matrix tools, topology methods, objective functions, constraints and algorithm design. Cerrone et al. [9] modified the model of vehicle-ID sensor location for route flow recognition by adding the time order constraint and providing greedy and tabu search algorithm. Mínguez et al. [10] developed the observability and estimation formulation of vehicle-ID sensor location and numerical experiments were performed. Xu et al. [11] developed the optimal model of NSLP for complete link flow observability under uncertainty through considering the error propagation and accumulation. The network sensors location problem tries to answer the questions of how many sensors, what types and where corresponding sensors should be located to observe traffic flow to get as much traffic information as possible. There exist different definitions related to observability in NSLP and traffic state estimation. The flow observability in NSLP denotes whether the unknown or unobserved flows can be uniquely calculated in terms of the known or observed flows in a network based on the traffic conservation equations [2]. In general, the flows include route flows, links flows and O-D flows. In practice, the known or observed flows are identified by different traffic detectors. The number and location of sensors could generate the full and partial observable problem depending on if there exists a unique solution of the linear equation system between unknown flow and deployed links. If the equations have a unique solution, we say the network system is fully observable, otherwise it is partially observable (see Section 2). In addition, the observability problem varies from counting sensors to scanning sensors because of different extracted traffic information. As shown in Figure 1, most of the literature concentrated on the single type of sensors (counting or scanning) location problem. Castillo et al [3] proved it is impossible to identify the full route flow under some particular conditions, even if every link is deployed by counting sensors, because link equations are dependent. Castillo et al. [4][5][6][7][8] provided a series of theoretical models and methodology for the flow observability problem related to both types of sensors, including matrix tools, topology methods, objective functions, constraints and algorithm design. Cerrone et al. [9] modified the model of vehicle-ID sensor location for route flow recognition by adding the time order constraint and providing greedy and tabu search algorithm. Mínguez et al. [10] developed the observability and estimation formulation of vehicle-ID sensor location and numerical experiments were performed. Xu et al. [11] developed the optimal model of NSLP for complete link flow observability under uncertainty through considering the error propagation and accumulation. Link flow, O-D flow and route flow are dependent (see Section 2). If all of the route flow can be observed, the O-D and link flow can be derived from the linear equation system. Compared with the counting sensors that cannot provide location information of different time, the capacity of scanning sensors to record time stamp and license plate has attracted wide attention on routes flow identification. Transportation agencies hope as much critical traffic information as possible can be obtained from sensors. However, it's impossible to deploy a mass of scanning sensors in the network, especially for a large network, because of limited budget and resources. Moreover, scanning sensors have a much higher price (at least three times) than counting sensors, for example, the price of an inductive loop varies from $600 to $900 and the price of a video detection system varies from $2400 to $6000 [12]. This noticeable cost effect encouraged us to explore a new method to balance cost and traffic information. The approach of this paper combines counting and scanning sensors to obtain full route flows. To the best of the authors' knowledge, only Castillo et al. [3] and Fu et al. [13] have paid attention to the combination deployment problem, but the former focused on one feasible solution and the latter aimed at path reconstruction.
In this paper, we develop a novel bi-level programming model to implement the combination deployment of different types of sensors to observe all routes flow. The first-level obtain the optimized location scheme of scanning sensors based on programming model of multiple constraints by running the "differentiating-first" greedy algorithm. In the second level, we use scanning map and incidence matrix tool to enumerate all scenarios that scanning sensors were replaced by countering sensors under the premise of full routes flow. Finally, the model and algorithm were applied to a Nguyen-Dupuis network and a real network by MATLAB. The results indicate that the proposed approaches can effectively balance between total cost constraints and all routes flow information.
The remainder of this paper is organized as follows: Section 2 presents the counting and scanning sensors observability problem. Section 3 provides the bi-level theoretical model for combination deployment. Section 4 analyzes the algorithm of a different level. Section 5 demonstrates the feasibility and availability of proposed approaches. In the end, conclusion and remarks were summarized in Section 6.

Sensors Location Observability Problem
In this section, the flow observability problem in a network is presented with emphasis on comparing the characteristics of single type of sensors and introducing the different equation systems between scanning and counting sensors.

Conservation Laws of Traffic Flows
Traffic networks consist of nodes and links whose topology can be defined as N = (V, A), where the set of nodes V represents the intersections and the set of links A represents roads through joining node pairs. The users generate different O-D pairs from a given set of origins to a given set of destination and different routes R through traveling a set of roads. Route flow, link flow and O-D flow on a network lead to the following equation system: where ϕ ak is the link-route incidence matrix and η ik is the route-OD incidence matrix. ϕ ak is equal to 1 if route k passes through link a, and 0 otherwise. η ik is equal to 1 if route k passes through link a, and 0 otherwise. Equation (1) describes the link flow v a is equal to the sum of all routes flow passing through link a. Equation (2) states the O-D flow t i is the sum of routes flow passing through this O-D pair. When the equation system can uniquely determine all unknown route flows, we say this system is fully observable. When the equation coefficient matrix is not full-rank and only some of unknown route flows can be determined by the equation system, we say this system is partially observable; in this case, the location of sensors generate the flow estimation problem based on the prior information [1]. Note the definition of observability is different from the traffic state observability [14]. The partial observability and flow estimation problem could derive from the limitation of the budget (there are not enough sensors for a given network) and dependent linear equations [15][16][17][18].
We note that, theoretically, all the flow information (link flow, route flow and O-D flow) of a given network can be obtained from the linear combination of Equations (1) and (2) if all route flows are uniquely determined by sensors. Therefore, we can focus on considering how to locate sensors to monitor each routes' flow.

Counting Sensors Observability
In the following part of Section 2, sensors observability problem is presented through comparing the different characteristics between counting sensors and scanning sensors. For simplifying our illustration, we consider a model example with five nodes and seven links.
Counting sensors predominate in traffic information detection. This type of sensors can extract the point-information such as speed, occupancy and volume. When a counting sensor is located on the link a, we assume it can identify vehicle volume (ν a ) of link a in the fixed time interval. As shown in  Table 1 shows all the enumeration information with regard to O-D pairs, routes and links. the location of sensors generate the flow estimation problem based on the prior information [1]. Note the definition of observability is different from the traffic state observability [14]. The partial observability and flow estimation problem could derive from the limitation of the budget (there are not enough sensors for a given network) and dependent linear equations [15][16][17][18]. We note that, theoretically, all the flow information (link flow, route flow and O-D flow) of a given network can be obtained from the linear combination of Equations (1) and (2) if all route flows are uniquely determined by sensors. Therefore, we can focus on considering how to locate sensors to monitor each routes' flow.

Counting Sensors Observability
In the following part of Section 2, sensors observability problem is presented through comparing the different characteristics between counting sensors and scanning sensors. For simplifying our illustration, we consider a model example with five nodes and seven links.
Counting sensors predominate in traffic information detection. This type of sensors can extract the point-information such as speed, occupancy and volume. When a counting sensor is located on the link a, we assume it can identify vehicle volume (νa) of link a in the fixed time interval. As shown in Figure    Assume we are interested in monitoring route flow. To this end, we need to answer the following question: how many and where counting sensors should be located on the links? For illustrating this observability problem, we assume to locate three counting sensors on the links 1, 3 and 4, then the following equation can be derived from the link-route connecting relationship: ( By solving the above equation system, 1 and 4 can be uniquely determined, namely 1 = 4 and 4 = 1 − 3 − 4 . But 2 and 5 cannot be determined because they are dependent in this equation system. If prior information can be obtained from experience and long-term statistics on a network, for example 2 0 and 5 0 , we can estimate the optimal values of 2 , 5 through 2 + 5 = 3 , | 2 − 2 0 | and| 5 -5 0 |.
Consider the extreme scenario that all the links are located by counting sensors, the corresponding equation system is shown as follows:

OD Pair
Routes (ri) Links 1, 4 r 1 1, 4 r 2 1, 3, 6 r 3 2, 6 1, 5 r 4 1, 5 r 5 1, 3, 7 r 6 2, 7 Assume we are interested in monitoring route flow. To this end, we need to answer the following question: how many and where counting sensors should be located on the links? For illustrating this observability problem, we assume to locate three counting sensors on the links 1, 3 and 4, then the following equation can be derived from the link-route connecting relationship: By solving the above equation system, r 1 and r 4 can be uniquely determined, namely r 1 = v 4 and But r 2 and r 5 cannot be determined because they are dependent in this equation system. If prior information can be obtained from experience and long-term statistics on a network, for example r 0 2 and r 0 5 , we can estimate the optimal values of r 2 , r 5 through r 2 + r 5 = v 3 , r 2 − r 0 2 and | r 5 -r 0 5 . Consider the extreme scenario that all the links are located by counting sensors, the corresponding equation system is shown as follows: link 1 : link 2 : link 3 : link 4 : link 5 : link 6 : link 7 : Echelon form: The 7 × 6 coefficient matrix in Equation (4) is the link-route incidence matrix. We can obtain the R solution by Gaussian elimination method and write it as the reduced row echelon form (as shown in Equation (5)). The equation system contains seven known variables and six unknown variables, but the rank of a coefficient matrix is equal to 5 from Equation (5), namely it is a non-full rank matrix. In other words, there is one unknown variable (r 6 ) that cannot be uniquely determined by the equation system. The reason is there exists a dependent relationship between the known variables. The dependent relationship (bold rows: The above example has indicated that full routes flow cannot be identified by counting sensors in some special situations, even if all the links are located by this type of sensors.

Scanning Sensors Observability
The most notable feature of scanning sensors is recording the time stamp and license plate of a vehicle passing it, which can provide continuous link information. A single vehicle can be identified at a different time on a given network. Consider the same example in counting sensors. For example, the license plate of a vehicle is scanned at time µ1 on link 2, as shown in Table 1, we can say this vehicle is traveling r 3 or r 6 to realize the trip from origin node 1 to destination node 4 or 5. when this vehicle is scanned at time µ2 (µ2 = µ1 + ∆ > µ1) on link 6, we can completely determine the vehicle is using r 3 from origin node 1 to destination node 4.
Considering the links (2, 3, 6) to locate scanning sensors in the Figure 2 network, the corresponding linear equation system at a different time is as follows: The first three equations are determined by a single sensor, in fact, there is no difference between a counting sensor and a scanning sensor in this situation. If the same links are deployed by counting sensors, only the first three equations can be obtained. However, the last two equations are joint recognition equation through scanning two links due to the fact we are recording license plate and time stamp. By solving this equation system, r 2 , r 3 , r 5 and r 6 flows can be uniquely determined, which is impossible for counting sensors to obtain four unknown variables through three linear equations.
Again, consider the same links (1,3,4) in counting sensors example to deploy scanning sensors. The corresponding equation system can be obtained from the Table 1: By solving Equation (7), the solution is the same as that of Equation (3), namely deploying counting sensors on the links (1,3,4). The result indicates that, in some situations, the scanning sensors can be replaced by counting sensors without sacrificing information. In addition, we can conclude there exist the optimal scheme for locating sensors on a given network under the precise of same sensors number through comparing Equations (6) and (7).
Comparing the above examples, the following differences between counting sensors and scanning sensors are noticeable: (i) scanning sensors provide more information than counting sensors for the same number and location, which can be translated into linearly independent equations; (ii) when adding (removing) a link to be monitored by sensors, counting sensors only add (remove) one linear equation to/from the old equation system and a scanning sensor adds (removes) at least one linear equation (involved with all routes in the link) into an old equation system; (iii) scanning sensors provide the joint recognition equation from multiple scanned links, that is scanning sensors not only cover route flows, but also differentiate route flows. At this point, the following problem arises: what is the minimum cost of sensors when combining counting and scanning sensors and where to locate them respectively, such that a traffic network system is fully observable?

Bi-Level Mathematical Model
In this section, a bi-level mathematical model is proposed to answer the problem described in Section 2. The first level uses the scanning map technique [5] to determine the near-optimal locations of scanning sensors on a given network. The second level uses the matrix tool to answer how to replace scanning sensors into counting sensors so that the total cost of the combination is minimum.

The First Level Model
The level focuses on how to deploy scanning sensors so that all routes flow can be uniquely determined. For that, we first introduce the scanning map definition [5,18,19].
Let N = (V, A) be a network and R be a set of routes on the network. Given a location of scanning sensors on a subset U ⊆ A of links, we can define a scanning map SM(U) = C R i : . . , |R| , where each scanning set C R i is associated with route R i that its links are scanned by sequential order. If all the scanning sets in SM are not empty and not repeating a subset, namely C R i = ∅ and C R i = C R j for each i = j = 1, 2, . . . , |R|, then scanning map set can uniquely determine all routes flow and the network is a fully observable system [1].

OD Pair
Routes (r i ) Links Table 2 indicates that U 1 covering all routes can uniquely determine r 1 , r 4 , but it cannot differentiate r 2 , r 5 and r 3 , r 6 . r 1 , r 2 , r 3 and r 6 can be uniquely differentiated by scheme U 2 , which illustrates the location of sensors has significant effect on differentiating routes when covering the same number of routes. Comparing U 1 and U 2 , there is only one different link (link 3 in U 1 and link 6 in U 2 ), but the number of unique identified route flow varies dramatically. U 3 can uniquely identify all routes flow in the network when adding one link to be scanned into U 1 and U 2 . The example implies that scanning sensors provide traffic flow information through covering routes and differentiating routes. In addition, different links have a varying weight to differentiate routes, which provides the direction of selecting observed links. There must exist a feasible scanning map to observe the full route flow. Therefore, the first level mathematical model locating scanning sensors to observe the full routes flow is as follows: where x a is a binary variable associated with each link a ∈ A and is equal to 1 when the scanning sensor is deployed on link a, 0 otherwise.λ a r i is link-route incidence parameter and is equal to 1 when route r i uses link a, 0 otherwise.
The objective function (8) is minimizing the sum of scanning sensors to be deployed on a network. Constraints (9) cover constraints that ensure each route is scanned by at least one link with a scanning sensor. These constraints guarantee all routes can be covered by scanning sensors. Constraints (10) are differentiating constraints that ensure each route is differentiated by at least one different link with a scanning sensor. (λ a r i + λ a r j )(1 − λ a r i λ a r j ) ensure that it is equal to 1 only if link a is in only one of route r i or r j , 0 otherwise. These constraints guarantee all routes can be differentiated by scanning sensors. Combining with the scanning map concept, constraints (9) ensure that all the scanning sets in SM are not empty (C r i = ∅). Constraints (10) ensure that all the scanning sets in SM are not repeating a subset (C r i = C r j ). Therefore, we can obtain the feasible near-optimal solutions by solving the programming model so that all routes flow can be uniquely determined, and then all flow information can be derived from Equations (1) and (2).

The Second Level Model
This level model aims at answering how to replace scanning sensors into counting sensors without loss of flow information, namely how to implement the combined deployment of two types of sensors in a network so that the total cost is minimum under the premise of full route flow observability. Assume each link has only one sensor. For illustration, consider again the example in Figure 2 and 3, 4}, U 5 = {4} and the responding scanning map set is shown in Table 3. Table 3. Illustration of the process to replace scanning sensor.

OD Pair Routes (r i )
Links As shown in Table 3, U 1 is covering and differentiating all routes. When scanning sensors on links 2 and 6 are removed from U 1 , r 1 , r 2 , r 4 and r 5 can be covered by U 4 , but r 2 and r 5 cannot be differentiated because of existing repeat subset in SM(U 4 ). Even if counting sensors are added on other links, we think this situation cannot identify all routes because it cannot record time stamp and license plate (introduced in Section 2). When scanning sensors in link 1 and 4 are removed from U 1 , U 2 can cover and differentiate r 2 , r 3 , r 5 , r 6 . Similarly, the part of routes flow can be covered and uniquely differentiated by U 3 and U 5 ( U 3 → {r 2 , r 3 , r 5 }, U 5 → {r 1 } ). The following problems arise: whether the rest of routes are uniquely determined by counting sensors? If there exist feasible replacement schemes, what requirements are satisfied?
For answering the above questions, the corresponding equations that known routes by scanning map and links with scanning sensors are excluded from equation system (4) are as shown in Table 4. The gray section elements are known by scanning sensors and bold section elements are equations coefficients between unknown routes and links. The route flow observability problem for rest parts (bold section) can be translated into counting sensors full observability in Section 2.2. As introduced in Section 2, when link-route incidence matrix is full rank, the corresponding routes flow can be uniquely determined by counting sensors. The unknown variables are r 1 , r 4 in U 2 scheme. The matrix rank of corresponding equations for rest parts is equal to 2, therefore full route flow can also be uniquely determined by replacing scanning sensors on link 1, 4 in U 1 with counting sensors on link (1, 4 or 1, 5 or 4, 5). In the same way, the corresponding rank of U 3 is equal to 3, and equal to the number of unknown routes, then we can say this replacement solution is feasible for full routes flow. However, when scanning sensors on link 1, 2, 3 and 6 are removed from U 1 , the corresponding rank of U 5 is equal to 3, less than the number of unknown routes (5), so this replacement solution is not feasible for full route flows.  (4).
Based on the above truth, we can define the requirements of full route flows through a matrix tool. When two types of sensors exist on a network at the same time, V s is a set of links with scanning sensors and V sw is a set of scanning in SM(V s ). V c is a set of links with counting sensors. V s and V c are not repeating a subset of links, namely V s ∩ V c = ∅. H s is the equation coefficient matrix from SM(V s ) and H c is the equation coefficient matrix from V c -route parameter. R s and R c are the set of routes by V s and V c respectively, and R s ∪ R c = R and R s ∩ R c = ∅. Therefore, the routes formulation can be expressed as follows:    When the rank of H s and H c are full rank at the same time, we can say all route flows in a network can be uniquely determined by the combined deployment of scanning and counting sensors. Therefore, the second level mathematical model can be stated as follows: ∑ a∈A λ a where x a , λ a r i are the same definition as the first level. y b is a binary variable associated with link b ∈ A and is equal to 1 when counting sensor is deployed on link b, 0 otherwise. c 1 and c 2 are the cost constant of scanning and counting sensors respectively. λ b r k is link-route parameter of counting sensors and is equal to 1 when route r k uses link b, 0 otherwise. ξ c is binary variable regarding matrix H c in Equation (12) and is equal to 1 when H c is a full rank matrix, 0 otherwise.
The objective function (13) minimizes the combined cost of scanning and counting sensors. Constraints (14) are joint coverage constraints that ensure all routes can be covered by sensors, irrespective of types, namely R s ∪ R c = R in Equation (12). The left half of joint differentiating constraints (15) ensures that links with scanning sensor can differentiate R s (i.e., H s is a full rank matrix). ξ c ∑ b =a∈A λ b r k y b in Equation (15) guarantees that the remainder of the routes can be uniquely determined by links with counting sensors (i.e., H c is full rank matrix).

Algorithm for Each Level Model
It has been proved that these types of models in first level are computationally NP-hard [20][21][22]. Therefore, in this Section, a greedy algorithm of differentiating first is put forward to obtain near-optimal solution in the first level model. Then a heuristic algorithm is presented to solve the second level model. Finally, we can obtain the feasible and near-optimal approaches for combination deployment.

Greedy Algorithm for First Level Model
We have defined two types of constraints as covering and differentiating. The above-mentioned example denotes the differentiating constraints play a more important role in identifying routes number. Based on this truth, the greedy algorithm considering 'differentiating first' principle is proposed to solve the first level model. This approach is inspired by research [9]. In this algorithm, there are two criteria: Differentiating criterion: Di f f er(U, a) is the sum of additional routes that can be uniquely differentiated by link a when adding scanning sensors on link a (U is a set of links with scanning sensors).
Covering criterion: Cover(U, a) is the sum of additional routes that can be covered by link a when adding scanning sensors on link a.
The 'differentiating first' principle is prioritizing to select the link to be scanned that can differentiate the maximum routes through ranking Di f f er(U, a). Consider the example again in Figure 1. Table 5 shows the process of a greedy algorithm considering 'differentiating first' principle.
The absolute values of difference between two random rows in link-route incidence matrix stand for the differentiated routes by different links. The absolute value is equal to 1 when link can differentiate specific routes, 0 otherwise. For example, v 5 can differentiate r 1 and r 4 , r 2 and r 4 , r 3 and r 4 , r 4 and r 5 , r 4 and r 6 through the subtraction of two random rows. Similarly, the differentiate features of other links can be calculated and the initial differentiating matrix can be presented (Table 5). First step, let U = U 0 = ∅ and select the link 1 with maximum summation (8) of column in initial differentiating matrix to deploy scanning sensors, then eliminate all rows (pattern of step 1 in Figure 3) of v 1 = 1 in initial differentiating matrix. At this moment, U = U 1 = {1} and changeable differentiating matrix consists of the rest rows of initial differentiating matrix, and select the link 3 with maximum (4) of differentiating routes to deploy scanning sensors. Repeat the above steps till differentiating matrix is empty and U = U 4 = {1, 3, 4, 6}. So far, the differentiating routes process is finished, and the next step is checking whether all routes are covered by selecting links or not. In this example, r 6 is not covered by U 4 = {1, 3, 4, 6} and the rest links are 2, 5, 7. In the same way, select the link 2 with maximum summation (1) of column in changeable differentiating matrix. Finally, one feasible solution U = U 5 = {1, 3, 4, 6, 2} is obtained so that all routes can be uniquely determined.

Covering criterion:
( , ) is the sum of additional routes that can be covered by link a when adding scanning sensors on link .
The 'differentiating first' principle is prioritizing to select the link to be scanned that can differentiate the maximum routes through ranking ( , ). Consider the example again in Figure 1. Table 5 shows the process of a greedy algorithm considering 'differentiating first' principle.
The absolute values of difference between two random rows in link-route incidence matrix stand for the differentiated routes by different links. The absolute value is equal to 1 when link can differentiate specific routes, 0 otherwise. For example, 5 can differentiate 1 and 4 , 2 and 4 , 3 and 4 , 4 and 5 , 4 and 6 through the subtraction of two random rows. Similarly, the differentiate features of other links can be calculated and the initial differentiating matrix can be presented (Table 5). First step, let = 0 = ∅ and select the link 1 with maximum summation (8) of column in initial differentiating matrix to deploy scanning sensors, then eliminate all rows (pattern of step 1 in Figure  3) of 1 = 1 in initial differentiating matrix. At this moment, = 1 = {1} and changeable differentiating matrix consists of the rest rows of initial differentiating matrix, and select the link 3 with maximum (4) of differentiating routes to deploy scanning sensors. Repeat the above steps till differentiating matrix is empty and = 4 = {1, 3, 4, 6}. So far, the differentiating routes process is finished, and the next step is checking whether all routes are covered by selecting links or not. In this example, 6 is not covered by 4 = {1, 3, 4, 6} and the rest links are 2, 5, 7. In the same way, select the link 2 with maximum summation (1) of column in changeable differentiating matrix. Finally, one feasible solution = 5 = {1, 3, 4, 6, 2} is obtained so that all routes can be uniquely determined.      INPUT: link-route incidence matrix of traffic network topology. OUTPUT: set of links to be scanned by scanning sensors.
Step 1: Initialization-U is the set of selected links and H is link-route incidence matrix. Based on the above process, the greedy algorithm for solving first level model can be expressed as follows: INPUT: link-route incidence matrix of traffic network topology. OUTPUT: set of links to be scanned by scanning sensors.
Step 1: Initialization-U is the set of selected links and H is link-route incidence matrix. U = ∅; Step 2: Initial differentiating matrix (H_differ) generate H_differ by subtraction of two random rows in H.
Step 3: Greedy process While H_differ is not empty select the link a ∈ A\U with maximum of Di f f er(U, a); eliminate all rows involved with link a; Step 4: Check coverage While H is not empty select the link a ∈ A\U with maximum of Cover(U, a); Step 5: Return U

Algorithm for Second Level Model
Equation (12) provides the key point of algorithm for the second level model. Let U = U s ∪ U c , U s ∩ U c = ∅. U s is the set of links with scanning sensors and U c is the set of links with counting sensors. N_re is the number of scanning sensors replaced by counting sensors. Consider the example in Figure 1 again. The process of replacement is shown in Table 6. Table 6. The process of replacing scanning with counting in Figure 1 As shown in Table 6, all possibilities of the replacement scheme are enumerated. When the requirement of full rank is satisfied, H s and H c are equal to 1, 0 otherwise. It's redundant to judge if H c is true or not, when H s is false. The bold parts are feasible combination schemes. There exist serval replacement schemes for a given original scanning location and exist different replaced links when the number of scanning sensors are fixed. In this process, the possibilities of combination iteration are C 1 5 = 5, C 2 5 = 10, C 3 5 = 10 respectively for N_re = 1, 2, 3. When N_re = 4, 5, full rank conditions are false, so the maximum of replaced scanning sensors is 3 in this example. Comparing the cost of different sachems, the maximum cost (5c 1 ) of single scanning sensors is reduced gradually with increase of replaced links (when N_re = 1, 2, 3, the combination cost is 4c 1 + c 2 , 3c 1 + 2c 2 and 2c 1 + 3c 2 respectively (c 1 > c 2 )).
Therefore, based on the feasible solution from the first level model, the possible combination schemes of minimizing combination cost can be searched by the following algorithm: INPUT: link-route incidence matrix of traffic network topology and set of links with scanning sensors for full routes flow observability.
OUTPUT: combination deployment schemes-set of links by scanning sensors and set of links by counting sensors.
Step 1: Initialization-U is the set of selected links with scanning sensors and H is link-route incidence matrix. n is the number of removed scanning sensors. U le f t is the rest links in initial U after removing n links. U = the result of first level. n = 1.
Step 2: Replacement process While n ≤ length of U select randomly n (n ≤ length of U) links to be removed from U and generate U le f t ; perform scanning map by U le f t and generate corresponding H s and H c . if H s and H c are full-rank, record the corresponding links and location of matrix element, and U s = U le f t , U c is set of links that make H c meet the requirement of full rank. This step can be finished by identify matrix.
Step 3: Return U s and U c .

Numerical Experiment
In this section, the proposed approach is applied to two more complicated networks for demonstrating its feasibility and availability. All algorithms are implemented using MATLAB.

Nguyen-Dupuis Network
The Nguyen-Dupuis network is used as an example in many similar studies and consist of 13 nodes and 38 links [5]. The network topology can be seen in Figure 4 and the routes, O-D pairs and links relationship can be seen in Table 7. Totally, there exist 18 O-D pairs and 50 routes in the Nguyen-Dupuis network. Based on the network topology, the corresponding incidence matrix can be generated, then the corresponding algorithm of bi-level model is implemented respectively. The result of bi-level model for full routes flow observability of Nguyen-Dupuis network can be obtained: First level (single scanning sensors): using the greedy algorithm considering 'differentiating first' principle, the set of links to be scanned by scanning sensors is obtained (cpu = 0.061s): 17, 29, 33, 22, 36, 6, 26, 16, 35, 3, 20, 5, 31, 2, 34, 1, 9, 4, 11, 13, 18} This algorithm provides a near optimal and feasible solution of 22 scanned links. The number of scanned links is similar to the previous studies in Nguyen-Dupuis network. However, the location of selected links is different from other researches [3,5], which indicates there exists a variety of layout schemes and different algorithms may generate different feasible solutions.
Second level (combining sensors): using the algorithm in Section 4.2, the set U s of links with scanning sensors and set U c of links with counting sensors are generated. The result is shown in Table 8 considering different number of replaced links. of selected links is different from other researches [3,5], which indicates there exists a variety of layout schemes and different algorithms may generate different feasible solutions.

2-
In this example, the deployment scheme of single scanning sensors is U = {14, 17, 29, 33, 22, 36, 6, 26, 16, 35, 3, 20, 5, 31, 2, 34, 1, 9, 4, 11, 13, 18}. Based on this scheme, the maximum of replaced sensors is equal to six without loss of observability. The different combination schemes of different replaced numbers can be calculated through running the proposed algorithm. The results indicate that there exist various available combination schemes of scanning and counting sensors to observe all route flows. The different combinations refer to the numbers of different types of sensors and replacement locations. Furthermore, different replacement locations could generate more economical schemes, such as the scheme in the first row of left half sheet in Table 8. The six scanning sensors are replaced by four counting sensors, which indicates some locations provide reductant information. It's critical to optimize the algorithm structure.

Case Study
In this numerical experiment, a larger size real-world network is selected to demonstrate the proposed approach. The real traffic network (left upper corner in Figure 5) is located at the H-tech district of Xi'an in China and has 49 nodes and 150 links. Except for links 26, 53 and 58 that are one-way links, the others have bi-directional flows between two nodes (as shown in Figure 5). The reason to consider the main routes is that parking is not permitted in many zones and users choose alternative routes as practical as possible rather than randomly. Therefore, in this real network, we consider 176 O-D pairs and 347 routes. It's a huge budget for a large traffic network to obtain full observability only considering a camera system. In other words, the budget is a critical constraint for extracting sufficient flow information. To illustrate this problem and determine full routes flow, the bi-level programming model as indicated in the previous section is applied to this case study.
is the set of 79 scanned links, which indicates 53% of the links to be scanned. Compared to the previous in the Cuenca network (the minimum 34% (175) scanned links sufficient for full observability) [3], the result is relatively higher because of the different network topology and route. The truth is important for a much larger network to estimate the cost of full observability. However, accounting for the high cost of scanning sensors and demand of optimizing the budget, the second level model and algorithm are implemented in the real network. In this real network, the maximum of replaced scanning sensors is equal to 21 based on the result of second level algorithm. The near optimal combination scheme is shown as follows: In this real network, the maximum of replaced scanning sensors is equal to 21 based on the result of second level algorithm. The near optimal combination scheme is shown as follows: This scheme consists of 56 scanning sensors and 21 counting sensors. It's necessary to emphasize this scheme is a relatively optimal feasible solution to observe all routes or routes of interest flow. The feasible schemes are far more than one, especially for a larger traffic network. The computational times increase exponentially with the increase of scanned links in the first level algorithm, therefore this paper only focuses on obtaining one near optimal solution in the real traffic network.
To illustrate the total cost of different combinations, inductive loop and video detection systems are chosen to represent counting and scanning sensors, respectively. The price of an inductive loop varies from $600 to $900 and the price of a video detection system varies from $2400 to $6000 [12]. Assume c 1 and c 2 are the prices of a video detection system and inductive loop, respectively, then c 1 /c 2 approximately varies from 3 to 10. n ws and n wc is the number of video detection systems and inductive loops in scheme w, respectively. As shown in Figure 6, the replacement number refers to the different combination schemes and the maximum value is equal to 21.
The total cost of different combination schemes can be calculated by the following formula: Total cost ws = n ws c 1 + n wc c 2 = (n wc + c 1 c 2 n ws )c 2 (18) As shown in Figure 6, the total cost is monotonously increasing in the horizontal and longitudinal direction. In other words, the total cost decreases as the number of replaced sensors increases and rises with the growth of ratio of c 1 to c 2 . The most economical combination scheme is composed of 56 scanning sensors and 21 counting sensors, and its total cost is equal to 195 units (c 2 ). The deployment scheme of 79 scanning sensors, namely a single type of sensors, is the most expensive and the total cost reaches up to 790 unit (c 2 ). The maximum cost is approximately four times higher than the minimum, as shown in the cost distribution diagram. In other words, the total cost of sensors layout for full flow observability is reduced by 75% through implementing the proposed approach in this case study. There exists different reductions because of different network topologies and scales. Obviously, the combination deployment scheme outperforms the scheme using a single type of sensors from a viewpoint of sensor deployment cost. Unfortunately, few previous studies paid attention to combine the multi-type of sensors for observability in their case studies. Therefore, it's not trivial to optimize and combine different types of sensors to implement full route observability, especially for a larger network. 101, 109, 41, 108, 98, 107, 115, 124, 50, 69, 140, 133, 27, 125, 14, 19, 80, 75, 84, 10, 104, 79,  150, 49, 147, 76, 97, 35, 120, 32, 148, 110, 38, 119, 36, 149, 31, 131, 139, 141, 6, 100, 77 ,136, 134, 59, 8, 24 ,33, 113, 34, 11, 4, 20, 81, 132} = {123, 39, 13, 137, 103, 12, 78, 43, 144, 114, 73, 5, 44, 117, 29, 60, 26, 96, 99, 23, 70} This scheme consists of 56 scanning sensors and 21 counting sensors. It's necessary to emphasize this scheme is a relatively optimal feasible solution to observe all routes or routes of interest flow. The feasible schemes are far more than one, especially for a larger traffic network. The computational times increase exponentially with the increase of scanned links in the first level algorithm, therefore this paper only focuses on obtaining one near optimal solution in the real traffic network.
To illustrate the total cost of different combinations, inductive loop and video detection systems are chosen to represent counting and scanning sensors, respectively. The price of an inductive loop varies from $600 to $900 and the price of a video detection system varies from $2400 to $6000 [12]. Assume 1 and 2 are the prices of a video detection system and inductive loop, respectively, then 1 / 2 approximately varies from 3 to 10. and is the number of video detection systems and inductive loops in scheme , respectively. As shown in Figure 6, the replacement number refers to the different combination schemes and the maximum value is equal to 21. The total cost of different combination schemes can be calculated by the following formula: As shown in Figure 6, the total cost is monotonously increasing in the horizontal and longitudinal direction. In other words, the total cost decreases as the number of replaced sensors increases and rises with the growth of ratio of 1 to 2 . The most economical combination scheme is composed of 56 scanning sensors and 21 counting sensors, and its total cost is equal to 195 units ( 2 ). The deployment scheme of 79 scanning sensors, namely a single type of sensors, is the most expensive and the total cost reaches up to 790 unit ( 2 ). The maximum cost is approximately four times higher than the minimum, as shown in the cost distribution diagram. In other words, the total cost of sensors layout for full flow observability is reduced by 75% through implementing the proposed approach in this case study. There exists different reductions because of different network topologies and scales. Obviously, the combination deployment scheme outperforms the scheme using a single type of sensors from a viewpoint of sensor deployment cost. Unfortunately, few previous studies paid attention to combine the multi-type of sensors for observability in their case studies. Therefore, it's not trivial to optimize and combine different types of sensors to implement full route observability, especially for a larger network.
It's necessary to indicate that the proposed approach requires the information of all or interesting routes. It's critical for the output result that extracting routes information be as practical as possible It's necessary to indicate that the proposed approach requires the information of all or interesting routes. It's critical for the output result that extracting routes information be as practical as possible before generating an input matrix. Again, one feasible near-optimal solution can be obtained from the proposed approach because it is computationally NP-hard. The proposed approach provides many different combination schemes that consist of different types and number of sensors. Considering the maintenance and stability of sensors, the transportation agency can replace old counting sensors with scanning sensors stepwise according to budget constraints, which give lower maintenance costs and more information.

Conclusion and Future Research
In this paper, combined deployment of different types of sensors in the network sensors location problem (NSLP) field is addressed. A novel bi-level programming model for full route flows is presented to resolve the problem of combined deployment of scanning and counting sensors. The contributions of this paper are theoretical and algorithmic, that is a programming model in the second level and differentiating matrix in the greedy algorithm are first put forward. Scanning maps and incidence matrices are incorporated into the programming model at the same time, which is also feasible when the first level model doesn't exist. The reason to present first level model is to provide a feasible input matrix for the second level and compare the total cost between single scanning sensors and combination schemes.
Using some illustrative examples, this study reveals the essential difference between scanning and counting sensors is in the aspect of extracting network information. Scanning sensors can provide more independent linear equations than counting sensors. It's impossible for counting sensors in some situations to observe the full flow information even this type of sensors are deployed at all links.
In addition, the matrix tool plays a pivotal role in the algorithm process, for example differentiating matrix, covering matrix, the empty matrix in elimination process and full-rank. Traffic sensors provide the flow information through covering and differentiating constraints from the viewpoint of mathematic inequalities. Therefore, covering and differentiating principles are defined in the algorithm process. Examples of different scale illustrate how the algorithm resolves the bi-level programming model, which provides a clear logic method to implement different types of sensors on a given network.
The proposed approach provides the location set of single scanning sensors and the corresponding location set combinations of scanning and counting sensors. A computational experiment in a real network is performed. The results emphasize the importance of the combined deployment problem, no matter the size of the traffic network. The proposed approach evidently outperforms the layout schemes using a single type of sensor from a viewpoint of total cost, especially for a large network, where the maximum cost is approximately four times higher than the minimum in the case study.
The study provides directions for implementing different types of sensors to extract full route flows. Transportation agencies can combine and replace sensors in a stepwise way at feasible locations according to management demand and budget through the proposed approaches. However, there are several extensions for future work: (i) it's critical for a large network to improve the efficiency of the algorithm; (ii) the methods described in this paper focus on the flow information. Future research must be extended to the travel time and reliability of the network; (iii) more work is needed to study dynamic traffic networks because of the changes of traffic information in short time intervals.