4. API
The goal :
Exporting relevant data from the
simulation at each time step.
DataTime Step – 60 seconds.
Simulation step - 0.8 second.
4/3/2016 4
Detectors Located at
the middle of sections
5. API
1. Accumulation (Detectors):
Mathematical calculation -
𝐴𝑐𝑐𝑖 =
𝑂𝑐𝑐𝑢𝑖
100
∗
1000
𝐿𝑉𝑒ℎ
∗
𝐿𝑆𝑒𝑐𝑡𝑖𝑜𝑛𝑖
1000
;
𝑖 − 0 … 𝑁𝑢𝑚𝑏𝑒𝑟𝑂𝑓𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠 ;
𝐿𝑆𝑒𝑐𝑡𝑖𝑜𝑛𝑖
− 𝐿𝑒𝑛𝑔𝑡ℎ 𝑜𝑓 𝑆𝑒𝑐𝑡𝑖𝑜𝑛 𝑖𝑛 𝑡ℎ𝑒 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑒𝑡𝑒𝑐𝑡𝑜𝑟 𝑖 [𝑚];
𝐿𝑉𝑒ℎ − 6 𝑚𝑒𝑡𝑒𝑟 𝑣𝑒ℎ𝑖𝑐𝑙𝑒𝑠 𝑙𝑒𝑛𝑔𝑡ℎ 𝑎𝑠𝑠𝑢𝑚𝑝𝑡𝑖𝑜𝑛 [𝑚];
𝑂𝑐𝑐𝑢𝑖 − the percentage of the time that the detector has been occupied
during the last detection interval [%];
We are getting occupancy by calling the following function for each
detector in the network :
Occu = AKIDetGetTimeOccupedAggregatedbyId(dete_id, 0);
In the API file , we will calculate and
export the following data :
1. Accumulation (Detectors)
2. Production (Detectors)
4/3/2016 5
6. API
2. Production (Detectors):
Mathematical calculation -
𝑃𝑟𝑜𝑑𝑖 = 𝑛𝑏_𝑣𝑒ℎ𝑖 ∗
3600
𝑡𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙
∗
𝐿𝑆𝑒𝑐𝑡𝑖𝑜𝑛𝑖
1000
;
𝑖 − 0 … 𝑁𝑢𝑚𝑏𝑒𝑟𝑂𝑓𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠 ;
𝐿𝑆𝑒𝑐𝑡𝑖𝑜𝑛𝑖
− 𝐿𝑒𝑛𝑔𝑡ℎ 𝑜𝑓 𝑆𝑒𝑐𝑡𝑖𝑜𝑛 𝑖𝑛 𝑡ℎ𝑒 𝑐𝑢𝑟𝑟𝑒𝑛𝑡 𝑑𝑒𝑡𝑒𝑐𝑡𝑜𝑟 𝑖 [𝑚];
𝑡𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙 − 60 𝑠𝑒𝑐𝑜𝑛𝑑 , 𝑡𝑖𝑚𝑒 𝑠𝑡𝑒𝑝 𝑖𝑛𝑡𝑒𝑟𝑣𝑎𝑙 [𝑠𝑒𝑐];
𝑛𝑏_𝑣𝑒ℎ𝑖 − the counter aggregated during the last detection interval[%];
We are getting counter by calling the following function for each detector
in the network :
Nb_Veh =AKIDetGetCounterAggregatedbyId(dete_id, 0);
In the API file , we will calculate and
export the following data :
1. Accumulation (Detectors)
2. Production (Detectors)
4/3/2016 6
7. API
As a result we export txt file with
the data for each detector in
different column and the time
interval in order row.
4/3/2016 7
9. Number of detectors - 720
Number of sections – 720
Number of Centroid– 180
Number of intersection – 96
Road type – Arterial
Maximum Speed – 50 Km/h
Capacity – 900 PCUs/h
TimeWindow for simulation – 180 min
Basic Network
4/3/2016 9
10. Demand Plan
O-DTable
A symmetrical demand between each
nodes
Total trips 32220 vehicles
4/3/2016 10
12. Traffic Signal Control
Two phases signal :
1.North-South Phase 2.East-West phase
-90 seconds cycle
-40 seconds green time for each phase
-All turns Allowed
4/3/2016 12
13. Matlab Analysis – Basic Network
By using Matlab Software we will analyze the result and plot
graph of MFD as follow :
𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛𝑡 =
𝑖 −𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠
𝐴𝑐𝑐𝑖 ;
𝑃𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛𝑡 =
𝑖 −𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠
𝑃𝑟𝑜𝑑𝑖 ;
N – number of detectors
t – Time Window ( 1 – 120 min )
4/3/2016 13
15. Number of detectors – 720 (Region 1 – 128)
Number of sections – 720
Number of Centroid– 180
Number of intersection – 96 (Region 1 – 16)
Road type – Arterial
Maximum Speed – 50 Km/h
Capacity – 900 PCUs/h
TimeWindow for simulation – 180 min
Control Signal Network
4/3/2016 15
Region 1
Region 2
16. Demand Plan
O-DTable
A symmetrical demand between each
nodes
Total trips 32220 vehicles
4/3/2016 16
17. Demand Plan – Control
Signal Network
30%
40%
50%
60%
66%
24%
0%
10%
20%
30%
40%
50%
60%
70%
06:00-06:30 06:30-07:00 07:00-07:30 07:30-08:00 08:00-08:30 08:30-09:00
Demand
4/3/2016 17
18. Traffic Signal Control - Control Signal Network
Two phases signal :
1.North-South Phase 2.East-West phase
-30 seconds -50 seconds
-90 seconds cycle
-All turns Allowed
4/3/2016 18
19. Matlab Analysis – Control Signal
Network
By using Matlab Software we will analyze the result and plot
graph of MFD as follow :
𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛𝑡 =
𝑖 −𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠
𝐴𝑐𝑐𝑖 ;
𝑃𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛𝑡 =
𝑖 −𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠
𝑃𝑟𝑜𝑑𝑖 ;
N – number of detectors
t – Time Window ( 1 – 180 min )
4/3/2016 19
20. Matlab Analysis – Control Signal
Network
MFD graph for each of the regions
4/3/2016 20
21. Number of detectors – 720 (Region 1 – 128)
Number of sections – 720
Number of Centroid– 180
Number of intersection – 96 (Region 1 – 16)
TimeWindow for simulation – 180 min
Speed Limit Network
4/3/2016 21
Region 1
Road type – Arterial
Maximum Speed – 50
Km/h
Capacity – 900 PCUs/h
Region 2
Road type – Road
Maximum Speed – 90 Km/h
Capacity – 1200 PCUs/h
22. Demand Plan
O-DTable
A symmetrical demand between each
nodes
Total trips 32220 vehicles
4/3/2016 22
24. Traffic Signal Control
Two phases signal :
1.North-South Phase 2.East-West phase
-90 seconds cycle
-40 seconds green time for each phase
-All turns Allowed
4/3/2016 24
25. Matlab Analysis – Speed Limit
Network
By using Matlab Software we will analyze the result and plot
graph of MFD as follow :
𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛𝑡 =
𝑖 −𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠
𝐴𝑐𝑐𝑖 ;
𝑃𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛𝑡 =
𝑖 −𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠
𝑃𝑟𝑜𝑑𝑖 ;
N – number of detectors
t – Time Window ( 1 – 180 min )
4/3/2016 25
26. Matlab Analysis – Speed Limit
Network
MFD graph for each of the regions
4/3/2016 26
27. Number of detectors – 720 (Region 1 – 128)
Number of sections – 720
Number of Nodes – 180
Number of intersection – 96 (Region 1 – 16)
TimeWindow for simulation – 180 min
Speed Limit(EastWest) Network
4/3/2016 27
Region 1
Road type – Arterial
Maximum Speed – 50
Km/h
Capacity – 900 PCUs/h
Region 2
Road type – Road
Maximum Speed – 90 Km/h
Capacity – 1200 PCUs/h
28. Demand Plan
O-DTable
A symmetrical demand between each
nodes
Total trips 32220 vehicles
4/3/2016 28
30. Traffic Signal Control
Two phases signal :
1.North-South Phase 2.East-West phase
-90 seconds cycle
-40 seconds green time for each phase
-All turns Allowed
4/3/2016 30
31. Matlab Analysis – Speed
Limit(EastWest) Network
By using Matlab Software we will analyze the result and plot
graph of MFD as follow :
𝐴𝑐𝑐𝑢𝑚𝑢𝑙𝑎𝑡𝑖𝑜𝑛𝑡 =
𝑖 −𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠
𝐴𝑐𝑐𝑖 ;
𝑃𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛𝑡 =
𝑖 −𝐷𝑒𝑡𝑒𝑐𝑡𝑜𝑟𝑠
𝑃𝑟𝑜𝑑𝑖 ;
N – number of detectors
t – Time Window ( 1 – 180 min )
4/3/2016 31
32. Matlab Analysis – Speed
Limit(EastWest) Network
MFD graph for each of the regions
4/3/2016 32
33. Conclusion
MFD – Basic Network
4/3/2016 33
Critical Point
Different Scenario
Curve Linear and
non-linear behavior
Maximum
Production and
Accumulation
Etc.?...
MFD – Control Network
MFD – Speed EW Network
MFD – Speed Network