• No results found

7.4 Planner Implementation

7.4.1 Planner Implementation Assumptions

The network state maintains the numeric counts (continuous approximation) of queue length at different abstractions of locations based on the following: route (R) explored by the planner during search space; queue (Q) denoting the numeric value of each road object at any instance of time; Source (Sc) which represents the entering road to the networks and sink (Si) which represents the exit roads. Vehicles originate from the source, passes through roads, connectors and junctions, then end up in sink upon reaching the destination.

At each time instant, a road may be active or inactive. For the instants during which a road is active, vehicles are assumed to move on that road at the flow rate of the road (veh/s). We assumed the flow rate of the roads were known and fixed at the initial state. When a link is inactive, it means there is no vehicles movement through the road and flowrate of such road is zero.

Each of the junctions has two phase (1 and 2). Traffic can move from north to south or from east to west at junctions. Two conflicting roads cannot be activated at the same time at a junction. The domain model, incorporate declarative descriptions of grounded eventthat monitors the movement of traffic within linking roads. The planner select the appropriate green phase duration to controls the traffic of roads connected at a junction. All dynamic inputs, such as turning rates, with an exception of the state variables and controlled variables, are assumed to be constant. The flow rate of individual junc- tions is also assumed to be constant. Rate of flow of vehicles is represented as a unit value per seconds of time (veh/sec).

traffic light cycles. We denote the network state vector by x(k) and the control vector is denoted by g(k). We assume we cannot control drivers behaviour; thus, we only control the green split (the controlled variable). We also assumed that the traffic flow dynamics are fully defined and included in the domain file.

We consider a linearised version of the quadratic problem that simplifies real-time calculations. The objective is to minimise the total numbers of vehicles in a queue on all roads at any instance of time within the traffic network. See Chapter 5. for details of domain constraints and objective function. The optimisation problem is solved using an embedded API to Java called OjAlgo Solver.

OjAlgo is a solver that contains LP (Linear Programming), QP (Quadratic Program- ming) and MIP (Mixed Integer Programming) solvers. ojAlgo is Open Source Java code that has to do with mathematics, linear algebra and optimisation. The core of ojAlgo is a linear algebra framework complete with various matrix decompositions using highly efficient multidimensional arrays. It can use double, BigDecimal or ComplexNumber as matrix elements. Though, there are lots of commercial solvers that are better than ojAlgo; however, ojAlgo is chosen due to it open source advantage. It also a simple framework to model problems using standardised expressions as well as the ability to read MPS (Mathematical Programming System) files.

Linearised methods often led to suboptimal solutions and could not consider the limits of some constraints exhaustively. Therefore, exploring more complex optimisa- tion solution that can scale better in preferred for future purpose. The main objective of this implementation is not to scale the output metrics, but to investigate the feasibility of using our UTCPLAN approach in this domain of interest(UTC).

7.5

Conclusion

We propose an integration of MPC approach into existing planning techniques to create a hybrid algorithm(UTCPLAN) for a continuous planner. This algorithm works with a

blend of planning and constraint optimisation to optimise a given traffic flow problem from initial state to a state that satisfies the goal conditions. The node exploration in search space of UTCPLAN is modified to compensate for the MPC approach. This is achieved by introducing a feedback strategy into the search space to sample the state at a node whenever the value of controlled horizon window is exceeded. Constraints are optimised over a future horizon value while the optimisation effect is only used within the next control horizon window. This repetition is continued within the search space until the goal conditions are satisfied. The algorithm is implemented in Java Netbeans 8.0 and tested with a declarative description of an urban traffic network.

7.6

Summary

This chapter describes the design and implementation of a planner that can input ex- pressive domain descriptions containing continuous processes, events and actions and produce solution plans through the integration of MPC with AI search - based planning techniques. The next chapter explains the result and evaluation of our implementation.

Chapter 8

Evaluation and Results

The main evaluation criterion is to show that UTCPLAN can accept inputs expressive domain descriptions containing continuous processes, events and actions and output so- lution plans through the integration of MPC with AI search - based planning techniques. This evaluation is measured by creating an expressive declarative description of a UTC domain with traffic flow problems to test if UTCPLAN can generate execution plans that can transform any given traffic condition to a state that meets the specified goal conditions.

The experimental traffic network(domain) is designed to have more than one con- nected junctions in other to test the centralise reasoning of UTCPLAN to manage up- stream and downstream of traffic from connected road to the junction. This also allows us to test the feasibility of junction to junction traffic relationship within the network. Each junction is designed to have more than one signal phase to test the ability of UTC- PLAN to split the green time between the two phases at a junction base on the current state of the queue length associated with each road at the junction. The network model also has connected roads linking other roads without a signalled junction, in other to test the ability of UTCPLAN to reason with the dynamic state of those connected roads that are not directly linked to a junction in the network. Figure 8.1shows a sample output plan generated by UTCPLAN from an urban traffic control problem of Appendix F. and

a UTC domain declaration of Appendix E.

Having achieved the main evaluation criteria, we also evaluate the effectiveness of the embedded MPC approach in the UTCPLAN algorithm to optimise traffic flow during changes in the traffic situation. We test the performance of the planner base on its ability at controlling the signalled junctions to accommodate for the changes in the traffic situation.

To achieve this, we create two signalled situation in our experiment:

Fixed The signal at the junctions are fixed from initial state to goal state, the planner cannot alter the signal duration during search space. It would reason with the domain and generate solution plans using the fix signal value at the junction. Controlled The signal is controlled by the planner. In this case, the signal is set at

the initial state, but the planner can change the signal value during search space using the embedded MPC approach in UTCPLAN to optimise the green phase at junction base on traffic demands within the network.

We investigate the speed of UTCPLAN on selected volume of traffic to test the performance of UTCPLAN during traffic congestion. This is achieved by increasing the queue length on roads and comparing the time taken to generate plan when the signal is fixed or controlled. We also evaluate the quality of plans generated by comparing the number of actions and processes in the fix signalled plan to the controlled signalled plan.

8.1

Results

The output of the planner is a sequence of steps that takes the problem from it initial state to a state that satisfies the goal condition. Figure 8.1 shows a sample of plan generated by UTCPLAN to solve an urban traffic control problem of Appendix using a domain description of Appendix. The plan contains the sequence of action operators

needed to optimise traffic flow within an urban traffic network, until the goal condition is satisfied. The plan also shows the status of processes at junctions and between con- nected roads. The status of event are not displaced in the plan, but the effect of events on processes within the connected roads is reflected in the plan(example : [process] Rtraffic flow).