Solving Optimal Location of Traffic Count Posts in CLP(FD)

An application of Constraint Logic Programming (CLP) for finding the minimum number and location of count-posts at urban roundabouts to obtain origin-destination data at minimum cost is given. By finding interesting mathematical properties, we were able to model this problem as a constraint satisfaction problem in finite domains, and use CLP(FD) systems to solve it, with almost no implementation effort and quite fast. The model is biased to allow effective propagation of values and constraints. This application illustrates how an adequate usage of problem-specific knowledge, namely to deduce some global constraints, helps reduce the computational effort. In particular, we needed no advanced search techniques for finding optimal solutions. This may not hold for another novel application of CLP this paper points to, that of sensor location problems (SLP) for traffic networks, which we are investigating. It is also crucial now to find the right model to the problem, but it is not easy to state declaratively that, in the end, some variables should have their value fixed by constraint propagation. If we may overcome this problem, we think that the SLP for networks may be efficiently solved using Constraint Programming, since they have very good features for strong constraint propagation. 1 Motivation and Introduction Traffic studies require origin-destination (OD) data whose acquisition is difficult and expensive. Important, but often insufficient, data is collected by counting the vehicles that pass at specific points of the traffic network, either manually or automatically. In the past two decades, there has been a considerable amount of research on the difficult problem of OD matrix estimation from (link) traffic counts, with economic issues as a major motivation. Some authors have examined various errors that may arise in the estimation, but with very limited discussion about how to identify the subset of network links where flow information should be collected and used [12]. Two recent publications [3, 12] address the optimization of the number and location of traffic counting points for traffic ? Extended Version of [15] ?? This work was supported by funds granted to LIACC through Programa de Financiamento Plurianual, Fundação para a Ciência e Tecnologia and Programa POSI. networks. In [3], a model and heuristic based algorithms are given to solve the minimum-cost Sensor Location Problem (SLP). This problem is that of finding the minimum number and location of count-posts in order to obtain the complete set of traffic flows on a transport network at minimum cost. Traffic studies for urban intersections are far less complex but still of prime importance in traffic engineering. In order to obtain OD data, it is typically necessary to carry out OD surveys, such as manually recording of registration numbers or roadside video surveys, in combination with some number plate tagging scheme. In this work, we present results from our research on the problem of finding the minimal number of exits and entries where OD surveys must be done, when some user-defined subset of traffic counts can be obtained at a relatively negligible cost (e.g., by direct observation in site). This can be viewed as a variant of the minimum-cost SLP. The model we propose is that of a constraint satisfaction problem in finite domains (CSP). No prior knowledge of turning movement coefficients is assumed or used in our work, which makes the problem clearly distinct from that in [3], so that we needed another approach. This paper complements a previous work [13, 14], whose goal was to look for possible patterns for optimal cost solutions, that could eventually be used as practical rules by traffic engineers. The former involved a systematic case analysis of all hypothetical roundabouts with n legs (i.e., where n roads/streets intersect), for increasing values of n, in computer. Hypothetical since all strings R1R2 . . . Rn ∈ {E,D,S} were seen as possible roundabouts, with Ri ∈ {E,D,S} indicating whether road i is just an entry (E), just an exit (S) or both an entry and exit (D) road. In this way, we did not care whether some of these strings would ever represent real-world roundabouts. Notice that both E and S refer to one-way streets, whereas D means double-way. Computer programs were developed (in C) to enumerate minimal subsets of OD flows that, when counted and used in conjunction with total counts at entries and exits and cross-sections, allow to deduce the complete OD matrix (qij) for a given time period. A major result of [13] is the conclusion that if the cost c(qij) of measuring qij is known, for each qij , overall cost is minimized if the OD flows that should not be measured are selected in non-decreasing order of cost to form an independent set. In fact, in this case the problem is an instance of that of computing a maximum-weight independent subset in a linear matroid which may always be solved by a Greedy Algorithm (see e.g. [4]). This means that, in such case, there exists a polynomial algorithm for computing the optimal solution. Actually, this independence is the linear independence of the columns of the constraint matrix that are related to the selected OD flows, and can be checked in polynomial time by Gaussian elimination, for instance. Another important contribution of [13] was the development of a rather simple method to test for linear independence, for this specific problem, which involves only exact operations. By further exploiting the mathematical properties underlying such method, it is shown in [14] the existence of an exact characterization of the optimal cost for the SLP at roundabouts when the OD flows qi i+1’s are set a negligible measuring cost. The work we now present was motivated by the claim [1] that the cost criteria should be more flexible to encompass specific features of the particular roundabout in study. By contrast to [13], the idea is no longer that of finding possible patterns of optimal solutions but rather to solve the minimum-cost SLP for every given real-world roundabout, the relevant data being input by the enduser of the application. The problem structure is further exploited, putting some effort on the formulation of a fairly clean mathematical model of the problem so that, in the end, CLP(FD) systems could be used to solve it. For space reasons, we shall not include experimental results, but just say that problems are solved in fractions of a second. The use of CP not only has led to a drastic reduction in the implementation effort but allows to easily extend the model to cater for other constraints that may be useful in practice. Although this work seems at first sight too focused, its methodology is of wider interest. The proposed solution for encoding the non-trivial constraint (6) (see section 3) represents a compromise between generate and test and constrain and generate techniques. It is an example of the tradeoff between efficiency and declarativeness. Significant pruning is achieved by extracting global, although incomplete, information. Furthermore, our approach clearly shows the advantage of exploiting links to well-known problems when facing a new one. In the following section, we give a formal description of the problem and some of its mathematical properties. Finally, the CSP model and aspects of its implementation in CLP(FD) systems are discussed in section 3. 2 The Problem and Some Background After we have numbered the n intersecting streets in the way traffic circulates, the roundabout is perfectly identified by a string R1R2 . . . Rn ∈ {E,D,S}, as defined above. Let O = {ı1, . . . , ıe} and D = {1, . . . , s} be the ordered sets of origins and destinations, e = |O| and s = |D|. The traffic flow from the entry i to the exit j is denoted by qij , for i ∈ O and j ∈ D. These flows are related to the total volumes at entries, exits and passing through the crosssections of the circulatory roadway in frontal alignment with the intersecting roads (respectively, Oi, Dj and Fk) by (1)–(3). ∑ j∈D qij = Oi, for i ∈ O (1) ∑ i∈O qij = Dj , for j ∈ D (2) ∑