Tutorial 3 - Traffic Signals
Vehicle-Actuated Signals using Rules
Signal rules are used at signalized intersections to switch phases depending on vehicle demand. Demand is measured using loops.
In this chapter we shall focus on four of the most common uses of signal rules, allowing:
- Phases to be skipped
- Phases to “gap out”
- Phases to be called on demand
- Phases to continue running into subsequent phases
- For Signal rules to be implemented we require a signalized intersection.
We will use a a simple 4-way junction as shown below. To create this intersection:
- In the graphic panel, right click mouse, select Road/New Road at cursor.
- In the pop-up window, select two-way road, and set number of lanes for “out” to 3 and “in” to 2.
- With the road just created still selected (it should be by default), right click the mouse again and select Road > New Intersection.
- In the pop up window, make sure the icon of the intersection is a four way intersection (like a big '+'). You can make this intersection a signalized one by selecting Signalized under the intersection icon. You will see that because we are creating a four way intersection and we have already created a road before we come here, we now have three groups of tables on each corner, each of them represent a road. Make sure each of them have both directions on, and number of out lanes being 2 and number of in lanes being 3.
- Click OK to create the intersection.
- Now in order to make the intersection work, you will need to create zones for each end of the intersection. To create a zone, pan the view so that the cursor is near the outward end of an approach road, right click mouse and select Zone > New Zone At Cursor. This will create a zone.
- Repeat this step for the other approaches.
- To add loops, you can zoom in a bit in the graphic panel if you can’t see the center of the intersection quite clearly. Double-click the left mouse button at the center of the intersection to select it. You will notice that lanes around the intersection changes to red indicating it is selected.
- Right click mouse and select Intersection/ New Loops At Stoplines. You will see that there are green rectangles added to the intersection. If not, you might need to switch on the Loops layer in the Layer Tab. If they are not showing the loop numbers within the rectangle, then turn on the Loop Names layer.
- Now create some trips. From the main menu choose Demand/Demands. This brings up a window for you to define your demand and generate trips later.
- Click Add Matrix. You can name your matrix with a different name or simply accept the default, then click OK.
- The next window asks you to Select Origins and Destinations. For this tutorial, because we want trips to be generated from all the directions so we don’t have to modify anything in this window, just click OK. Now you will notice that there is a table created in the Demand Editor window. This is where you can define how many trips you want Traffic Analyst to generate. The number 1,2,3,4
- represents the names of the 4 zones we created earlier. You can specify how many trips there will be between each of these zones by typing a value you want. But for this tutorial, we will simply type a total number (e.g. 1200) at the lower right, above the “Close” button.
- Press “Enter” key on keyboard after you type the value, and you will see the 1200 is automatically divided evenly for all the separate trips.
- Now you can click on “Save”.
- To generate trips, click on “Trips.” it will bring up another window, click on the “Generate Trips” button. Another window named “Accept Generated Trips?” will appear, you should see you have a Success Rate=100.0%.
- Click Yes to accept these trips. This will close the windows and bring you back to the main Graphics Panel.
- Now, you can start the simulation running with the play button.
Loop Numbering
If loops are added it is important they are correctly named to reference their relationship to the intersection in question, for instance if we were working with intersection 2 and added a loop number 10, we would need to rename this loop to “2_10” for the intersection controller to recognize the loop. If you select a loop, then Action Adjust you can view or modify the controller to which a loop is attached. The image below shows the loop numbering for this intersection:
Note that the names do not include the “2_” in the graphic – we can easily check associated loops in the “loops” tab of the signal controller dialogue).
The possible phases for this traffic control site are shown in the following image:
Actions and Tests
In terms of the rules, the three core actions available are:
- Terminate
- Extend
- Skip
The two key tests we will use relate to:
- Gap
- Occupancy (occ)
The available operators are:
- />, <, =, >=, <= (for numerical comparison)
- AND, OR (for logical)
The relevance of this will become apparent shortly
Skipping Phases
The requirement to skip phases is common when there is no demand for the relevant movements. We can see in the above image that A Phase is running the turning movement from the north and south approaches as filtered movements – Phase B then runs which operates these same movements in a protected state for up to 15 seconds of green time (+ 5 seconds intergreen). Skipping usually results in the surplus time being allocated to a phase that is yet to run in the plan. As an example, assume that B Phase is not required (as all of the traffic has managed to discharge during Phase A when those movements are filtered) and we want to give this surplus time to Phase C. Referring to the detector diagram, we can see that loop 3 is the relevant loop for the southbound right turn and loop 9 is related to the northbound approach right turn. This can be phrased as:
Skip B = When Phase B is about to start, if loops 3 and 9 are not occupied then do not run Phase B and give its time to Phase C.
To code this as a rule:
- From the main menu, open Control / Intersections / Controllers.
- Select the tab called “Rules”.
- Press [ + Rule ] - the "New Phase Rule" window will be raised.
- Type the new name for the rule: “Skip B”.
- Set the Action to Skip - the action phase is the phase to which the rule will be applied.
- Set Balance phase to C - the balancing phase for this type of rule is the phase that will receive the surplus time taken from B.
- Set the Test to occ3=0 and occ9=0.
Gapping Out
Gapping-out is a term used when a phase is terminated if there is a gap in the traffic that is serviced by that phase. It is an important part of locally optimizing the way a traffic control site operates and is a common requirement where some movements experience volatile or low demands.
Working again with B Phase in the above, lets say that B Phase is running. However, after a few seconds it is no longer required as demand for the movement falls and we want to give this extra time to Phase C. Again the action phase represents the phase during which the conditions are checked for, in this case Phase B. And again, Phase C is our balancing phase. The Action this time is “Terminate”.
In this instance the rule we would look to test is:
If as Phase B is running and the gap between subsequent vehicles on loops 3 and 9 exceeds an acceptable threshold (say 5 seconds) then terminate Phase B (with yellow and red time) and give its remaining time to Phase C.
The logic for the test is:
“ gap3>5 and gap9>5”
Calling a Phase
Although we are referring to this as “calling a phase” this is not strictly the case which will become apparent. The most common time we may want to do this in the above example is where we have Phase D which can also run as D1 or D2. In this case we may want to check to see which of these phases is actually required and run it appropriately. Note that according to the signal plan D Phase is allocated 20 seconds of green time and 5 seconds of intergreen and while we say this is calling a phase what we will actually do is skip D and give this time to D1 or D2 as required.
We are calling this rule “Call D1”.
The action phase represents the phase during which the conditions are checked for, in this case the split second Phase D runs. We will discuss the necessary “test” shortly. The Action in this instance will be “Skip” The balancing phase this time will be D1. Looking now at the actual Rule to test we refer to our detector diagram and see that loop 6 is the relevant loop for the westbound right turn and loop 12 is related to the eastbound approach right turn movement. D1 refers to the case where the westbound right turn is needed but the eastbound is not.
In this instance the rule we would look to test is:
If at the split second Phase D commences loop 6 is occupied and loop 12 is not currently occupied then do not run Phase D and instead run Phase D1.
The logic looks like:
“ occ6>0 and occ12=0”
To cover the alternative case we would then create a second rule which would consider the need for D2.
This is essentially the same except as you can see the balancing phase is now D2 and the test would be:
“ occ6=0 and occ12>0”
We could also employ the techniques learned above and have a third case that considered whether any form of D Phase is needed and if not we could allocate this time to a more deserving movement – essentially Skipping D Phase all together. This would again be a Skip rule and the logic quite simply would be:
“ occ6=0 and occ12=0”
The phase we allocate as the Balancing Phase would then receive this time.
Phase Extensions
Considering the phase extension case – we can see in figure 3 that A Phase is running the turning movement from the north and south approaches as filtered movements – Phase B then runs which operates these same turns in a protected state for up to 15 seconds of green time (+ 5 seconds intergreen). At the end of phase A we may want to check to see if B Phase is actually required and if it isn’t, continue to run the A Phase instead as clearly it is discharging the necessary traffic.
In this case we are calling our Rule “Extend A”
The action phase represents the phase during which the conditions are checked for, in this case during A Phase. We will discuss the necessary “test” shortly. The Action in this instance will be “Extend” The balancing phase for this type of rule represents the phase the extension will occur into – in this case we are stealing time from Phase B for Phase A if Phase B isn’t required. Looking now at the actual Rule to test we refer to our detector diagram and see that loop 3 is the relevant loop for the southbound right turn and loop 9 is related to the northbound approach right turn movement.
In this instance the rule we would look to test is:
If the gap on loop 3 and gap on loop 9 is greater than a certain value and those same loops are not currently occupied then allow A Phase to continue.
The logic looks like:
“ gap3>5 and gap9>5 and occ3=0 and occ9=0”
The value of 5 in the above represents 5 seconds of time, thus if there has been more than 5 seconds between the subsequent passing of vehicles and this isn’t a result of a vehicle being stopped due to an inability to filter (loop is not occupied), then the test is true and A Phase can continue to run until it has used up all of the allocated time for Phase B as well as its own time. The Extend rule is checked every second at the end of a phase as at any point while A Phase is running the allocated time for Phase B, there may still be a need to run B Phase. Another useful thing to consider at this point is the fact that the “occupied” (occ) parameter refers to time occupied and is not a true/false value – this means we may want to include a value for occupancy that is greater than zero. For instance in the above we may want to say “if the loop has been occupied for more than x seconds” as a further consideration.
Other Considerations
Understanding “Time”
The timing tab is where we nominate phase times along with their intergreen (yellow and red) and the Minimum and Maximum times. Below we will discuss the effect of minimum and maximum times on signal rules.
- Minimum Time (Min): No running phase can gap out before its minimum time has expired, that is if B phase were running and its minimum time is set as above at 5 seconds, it is not possible to gap this phase out until that 5 seconds has elapsed (provided the phase actually runs).
- Maximum Time (Max): If extra time is attempted to be allocated to a phase (through gapping or extensions etc.) that would cause that phase to have a green time that exceeds is maximum green time (as nominated in the timing tab of the controller dialogue – above all are set at 300 second), this rule will have no effect and in essence will be “false”. Note that if a phase has 0 green time as shown for phases D1 and D2 that even if minimum or red and yellow times are allocated these will not be run if the phase is not run – these only become active if the phase actually runs (has green time >0).
The Role of the Stretch Phase
Also note the ability to nominate a phase as the “Stretch Phase”. This becomes important in instances where no balancing phase is nominated in the rule – in this case the extra time would automatically be allocated to Phase A in the case above.
Rule Order is Important
The order in which rules are specified can be important. Rules can be easily re-ordered as shown below:
Summary
The key to the signal rule system is allowing for many actions on various phases during any given cycle without altering the overall cycle time of the site. This means progression and “green waves” can be maintained despite what might or might not be happening at any one signal site in the system. It should be clear by now that a lot of flexibility is provided with only a few simple concepts. Central to the approach is understanding that each traffic control site can have a multiple number of rules as required to replicate true localized optimization.
As an example when we discussed phase calling we could also embed rules that allowed those called phases to gap-out – we may want for instance D to gap into D1 or D2 and if D1 or D2 is called, for that phase to likewise be able to gap out into another higher demand phase. Each rule can have complex tests – those discussed above are simple, but we may want to for instance consider which phase to actually give our unused time to so we may not just be interested in loop occupancy for our particular movement – we may also want to check the occupancy for the loops of the phase we are considering using as the balancing phase. One of the other powerful elements is an ability to take action with respect to phases that are due to run in the next cycle. That is in the above if we were running D phase and gapped it out we may want to allocate this unused time to B phase in the next cycle – this is also possible where the phase nominated as the balancing phase does not occur in the current cycle (i.e. it has already passed).
Boom Gates
The boom gates tool allows you to add a movable boom gate, like those found on parking entrances and exits, or on restricted access lanes, such as bus-only lanes. The boom gate device will delay each vehicle for a variable time, taken from a specified time distribution.
Exercise: Create a boom gate
- Open Boom Gates window from the menu: Control / Boom Gates.
- Select a lane.
- Press the green [+] button on the Boom Gates window.
- Press OK.
- In the Layer Tab, switch on the Signs Layer.
- After creating a boom gate, there are some parameters you can modify:
- Stop Time: A new stop time distribution for a boom gate can be defined in Parameters / Time Distributions, or you can use an existing distribution. For example, if you select “Uniform Standard A” every vehicle will be stopped for 2 seconds. However, you may want to create a distribution where 40% of vehicles stop for 2 seconds, 30% for 3 seconds, 20% for 4 seconds, and 10% for 15 seconds. Note that the total stop time is the sum of the stop time taken from the distribution and the (fixed) time for the gate to open.
- Time to Open: This time is the same for all vehicles, and is added to the variable stop time. It can be set to zero, if not required.
- Limited Height: A visualization option, splits the boom gate bar into two parts so that it does not collide with the roof in a multi-level parking area.
Ramp Metering
The Ramp Metering Tool allows you to model traffic signal control used to limit the flow of traffic from an on-ramp onto a multi-lane road. The tool uses a logic module that takes its input from one or more loops and a set of variable parameters. The output from the logic module is the cycle time of the control signal. That is, each ramp meter generally has a fixed green time, and a variable red time, and the length of the red time is determined by flow or occupancy detected on one or more loops.
Exercise: Ramp Metering
- Open the model “Ramp_Metering_Before”. In this model, there are two groups of networks. Each with a main road and two arms merge into them. There are five intersections on each group of network. Two of them are at the merging intersections. One is on the single lane arm and two on the arm that starts with one lane but then splits into multiple lanes.
- Zoom in to the left merging intersection on the upper network.
- Make “Lane Centerlines”, “Lane Steams” and “Handle – End” visible. You will see there is a short lane on the arm near the merging intersection, and a long lane on the arm away from the
- merging intersection. These two lanes are connected by intersection 1. Loops are created on the main road on the left of the merging intersection, select them and check their parameters. They are all assigned to Controller 1.
- Now pan the view toward the right to see the other merging intersection on this network. There are also three loops added, and they are associated with intersection 4. This arm is similar to the arm we saw previously. The difference is that it starts with one lane and then splits into two. An intersection set at the split point. Whereas the other arm just has a single lane all the way to the intersection.
- Pan the view to see the other network at the bottom. It also has two merging arms. The configuration is very similar to the one we just checked.
- Intersection 18 connected the lanes on the merging arm near the merging point. And the loops on the main road near the merging point are associated with intersection 18.
- Similarly intersection 16 connects the lanes on the merging arm near the merging point on the right. And the loops near the merging intersection are associated with intersection 16.
- There are two OD matrices already set in the model, one for each network. Each matrix contains through flow of 1000 and merging traffic of 200 each arm. The other network has the same flow volume.
- Start simulation running and you should be able to see traffic flowing.
- Select intersection 2 and check its configurations. The through flow is set to free flow and the merging to give way. And flow to the main road from this arm is continuous.
- We want to control the ramp flow so that the volume released to the main road is limited. We will do this by using the “Ramp Metering” tool. Open the window from the Control menu. Once the window is open, you will see there are three tabs, each indicating a metering type.
- Let’s start from the left intersection on the upper network and experiment with the “Fixed Rate” type. Select the short lane on the arm and a loop on the main road. Then in the Ramp Metering window click “New”.
- Click “OK” to the default setting. A new meter is added, indication of meter and its type also appears in the graphic window.
- Rewind simulation and start it running again, notice the meter switches between red and green. When it is red, vehicles stops before the intersection and while it’s green, one vehicle is released.
- Check the parameter of this meter from the ramp metering widow. Under V/Cycle it is set as 1. This means only 1 vehicle is allowed to be released in every cycle.
- Let’s change this value to 3 so that 3 vehicles can be released.
- Rewind and start simulation again.
- Notice the setting is not making a difference, there is still only 1 vehicle released each time.
- This is because we have not changed the green time for the meter.
- 1 second is not enough to release 3 vehicles. Change the green time to 6 second for example and then start simulation again.
- Notice more vehicles are allowed to pass. When there are three of more vehicles waiting, three of them are released. This is true regardless of the number of lanes. If there were three lanes, the one vehicle per lane would be released.
- Now pan the view to the next arm on the same network. It has a single lane from the zoom and then splits into two lanes. This can be seen more clearly by turning on “Lane Centerline” and “Lane
- Streams”.
- Select a lane on the arm near the merging intersection and a loop on the main road.
- Under the Fixed Rate tab, create a new meter, accept the default settings. Notice now the V/Cycle is set to 2 automatically because there are two lanes.
- Rewind and start simulation and notice two vehicles are released each time.
- Now pan and zoom to the left merging intersection of the bottom network. It also has one single lane from the zone that splits into two lanes.
- This time, we will create another type of meter, called ALINEA ( Asservissement Lineaire d’entrée Autoroutiere). Select a lane on the merging arm and a loop on the left of the merging intersection.
- Ensure you are in “ALINEA” tab and create a new meter.
- Rewind and start simulation to see it work in action.
- Experiment changing the V/Cycle to 10 and Green to 5 to allow more vehicles to be released every cycle.
- Click the “ALINEA-Q” tab in the ramp metering window. We will experiment this with the right merging intersection.
- The difference between ALINEA-Q to ALINEA is that is has an additional loop to detect the queue length. Once the queue on the arm exceeds limit, the meter will be disabled and flow will be
- uncontrolled.
- The first thing to do is add the required additional loop; we will add this to the lane from the zone.
- Set its controller to 16, which is the intersection on the arm prior merging into the main road.
- This associates the loop to that intersection.
- Select a short lane near the merging intersection on the arm and a loop on the main road. Then create a new meter.
- Notice the ALINEA-Q meter comes with an “Off Occ” setting. This is the threshold value, when occupancy reaches this value, the meter will be disabled.
- The Occupancy is shown in “Occ[2]”. Start simulation to see the meter running.
- “Occ[2]” is currently 0.11, set the “Off Occ” to a value smaller than this.
- Re-start simulation; notice meters are on at the beginning, but goes to OFF when the “Occ [2]” is higher than “Off Occ”.
- The intersection signals are drawn as three green arrows, there is no longer controlling of vehicle flow.
- Increase the “Off Occ” to 0.30 and notice the meter control comes back when the “Occ[2]” is lower than “Off Occ”.
- Change “Off Occ” back to 0.05 and soon the signals go to all green if “Occ[2]” is more