(without frames contens library)
4. MODELLINGFirst, let us consider phases B14 and B20 where two traffic flows cross and exclude mutually.
For each traffic light we distinguish the usual three phases, resp. states: Red (Stop!), Green (Go!), and Intermediate (amber phase). Unlike the phases R and G, the duration of the phase I is fixed.
We introduce the notion of time (Riedel, 1991) and we distinguish between states and sets of states (a sequence of consecutive states). Thus the following four elements of a timed state diagram are defined:
By introducing the state I and the time consuming transition I the timed state diagram is obtained, see Fig. 4. (R has degenerated to a bar, as an all-red-state makes no sense.) In a second step, the timed state diagram is further simplified by neglecting the uncontrollable states.

Fig. 4. Timed state diagrams.
We now consider the approach roads at time t = 0. The situation is represented by the diagram shown in Fig. 5. (For both directions, the position of the traffic light is placed at the left side of the diagram.)

Fig. 5. Diagram of customers and their locations at time t = 0.
On the horizontal axis denoted by s (s represents the distance of a customer from the traffic light), the arrival-pattern of customers at t = 0 is shown. For simplicity we assume here that the customers can instantaneously stop and re-accelerate. Suppose that the traffic light of access road B14 has been red for a time tr and the arriving customers have stopped. The corresponding waiting time diagram is shown in Fig. 6. As time is going on, customers are being scrolled left with constant speed according to a default speed. When a customer cannot be scrolled farther along the horizontal axis because of red light or a stopped customer in front of him, he gets "scrolled" along the vertical axis. Thus the accumulated waiting time of a customer is displayed on his vertical axis. You can think of the customer's waiting time as an additional road-mile he has to cover.

Fig. 6. Delayed traffic of approach B14 at t = tr.
The height of the bars on each customer is equal to the customers waiting time.
The intersection spans a two-dimensional grid (see the upper part of Fig. 7). Below the grid the two diagrams are re-drawn, and the dashed lines represent the projection of the customers onto the axes of the state space. Due to the projection the information about the arrival time of a customer is lost.
In Fig. 7, when we give green to phase B14, we move through the graph along the positive A-axis correspondingly to the number of passing customers (the bold line represents a possible switching plan). Thus, the vertices of the graph represent the state space of the intersection and the edges the transition respectively.
Moving from one vertex to the next produces some costs (depending on the choice of the objective) given by the weight of the edges. The goal is to reach the vertex which is most far from the origin, i.e. the rearmost corner vertex. By then all customers will have passed the intersection.

Fig. 7. State space representation.