Skip to content

Instantly share code, notes, and snippets.

@leodido
Last active December 18, 2015 05:39
Show Gist options
  • Save leodido/5733991 to your computer and use it in GitHub Desktop.
Save leodido/5733991 to your computer and use it in GitHub Desktop.
TSIS-CORSIM™ model for Viale Cesare Battisti, Monza - Italia
Informations about TSIS-CORSIM™ model for Viale Cesare Battisti, Monza - Italia.
Aggregated real-world volumes for week
[[1]]
detector total
1: 5094 130
2: 5095 20
3: 5096 153
4: 5097 370
5: 5098 80
6: 5099 275
[[2]]
detector total
1: 5094 17
2: 5095 2
3: 5096 51
4: 5097 117
5: 5098 22
6: 5099 84
[[3]]
detector total
1: 5094 32
2: 5095 7
3: 5096 189
4: 5097 302
5: 5098 36
6: 5099 291
[[4]]
detector total
1: 5094 297
2: 5095 174
3: 5096 848
4: 5097 1205
5: 5098 397
6: 5099 1283
[[5]]
detector total
1: 5094 455
2: 5095 214
3: 5096 1030
4: 5097 1444
5: 5098 554
6: 5099 1469
[[6]]
detector total
1: 5094 539
2: 5095 179
3: 5096 882
4: 5097 1258
5: 5098 566
6: 5099 1374
[[7]]
detector total
1: 5094 518
2: 5095 185
3: 5096 894
4: 5097 1284
5: 5098 575
6: 5099 1360
[[8]]
detector total
1: 5094 558
2: 5095 198
3: 5096 1000
4: 5097 1461
5: 5098 628
6: 5099 1496
[[9]]
detector total
1: 5094 649
2: 5095 191
3: 5096 975
4: 5097 1494
5: 5098 592
6: 5099 1495
[[10]]
detector total
1: 5094 600
2: 5095 144
3: 5096 809
4: 5097 1294
5: 5098 438
6: 5099 1329
[[11]]
detector total
1: 5094 295
2: 5095 80
3: 5096 572
4: 5097 912
5: 5098 229
6: 5099 835
[[12]]
detector total
1: 5094 167
2: 5095 29
3: 5096 223
4: 5097 388
5: 5098 88
6: 5099 323

Substitute time periods

  • Execute sensors2dataset.

    E.g. ./sensors2dataset -v -t -r -b 2,3,5,8,10,12 -i ~/week-base/week-base-1-mon.csv

Split file into chunks

  • Execute splitfile.

    E.g. ./splitfile.sh -i ~/week-base/week-base-1-mon_dataset.csv -n 1000

Optimize dataset.

  • Execute killconsdup.

    E.g. ./killconsdup.sh -i ~/week-base/1/

# Detector ID
01 D782
02 D781
03 D1687
04 D1681
05 D1682
06 D981
07 D982
08 D1480
09 D892
10 D891
11 D192
12 D191
13 D1290
14 D912
15 D911
16 D1092
17 D1091
18 D212
19 D211
20 D110
21 D5098*
22 D5099*
23 D5097*
24 D421
25 D5096*
26 D321
27 D241
28 D242
29 D5094*
30 D642
31 D5095*
32 D541

The sensors with (*) are the real world sensors, highlighted with a red number in the figure.

Aggregated real-world volumes for saturday
[[1]]
detector total
1: 5094 277
2: 5095 38
3: 5096 326
4: 5097 646
5: 5098 134
6: 5099 522
[[2]]
detector total
1: 5094 70
2: 5095 12
3: 5096 100
4: 5097 257
5: 5098 51
6: 5099 239
[[3]]
detector total
1: 5094 37
2: 5095 8
3: 5096 135
4: 5097 255
5: 5098 37
6: 5099 227
[[4]]
detector total
1: 5094 199
2: 5095 136
3: 5096 573
4: 5097 790
5: 5098 250
6: 5099 766
[[5]]
detector total
1: 5094 368
2: 5095 142
3: 5096 921
4: 5097 1279
5: 5098 491
6: 5099 1330
[[6]]
detector total
1: 5094 565
2: 5095 193
3: 5096 966
4: 5097 1425
5: 5098 484
6: 5099 1464
[[7]]
detector total
1: 5094 526
2: 5095 187
3: 5096 878
4: 5097 1314
5: 5098 469
6: 5099 1286
[[8]]
detector total
1: 5094 492
2: 5095 183
3: 5096 952
4: 5097 1399
5: 5098 501
6: 5099 1462
[[9]]
detector total
1: 5094 598
2: 5095 206
3: 5096 1002
4: 5097 1446
5: 5098 410
6: 5099 1478
[[10]]
detector total
1: 5094 548
2: 5095 169
3: 5096 913
4: 5097 1335
5: 5098 409
6: 5099 1418
[[11]]
detector total
1: 5094 365
2: 5095 123
3: 5096 613
4: 5097 951
5: 5098 305
6: 5099 972
[[12]]
detector total
1: 5094 241
2: 5095 48
3: 5096 306
4: 5097 493
5: 5098 141
6: 5099 481
Aggregated real-world volumes for sunday
[[1]]
detector total
1: 5094 356
2: 5095 61
3: 5096 405
4: 5097 768
5: 5098 178
6: 5099 698
[[2]]
detector total
1: 5094 100
2: 5095 20
3: 5096 146
4: 5097 363
5: 5098 76
6: 5099 321
[[3]]
detector total
1: 5094 34
2: 5095 4
3: 5096 86
4: 5097 186
5: 5098 40
6: 5099 147
[[4]]
detector total
1: 5094 92
2: 5095 18
3: 5096 227
4: 5097 373
5: 5098 228
6: 5099 311
[[5]]
detector total
1: 5094 265
2: 5095 69
3: 5096 549
4: 5097 811
5: 5098 549
6: 5099 849
[[6]]
detector total
1: 5094 439
2: 5095 127
3: 5096 756
4: 5097 1118
5: 5098 529
6: 5099 1165
[[7]]
detector total
1: 5094 344
2: 5095 86
3: 5096 689
4: 5097 973
5: 5098 399
6: 5099 1007
[[8]]
detector total
1: 5094 421
2: 5095 165
3: 5096 888
4: 5097 1236
5: 5098 537
6: 5099 1367
[[9]]
detector total
1: 5094 551
2: 5095 217
3: 5096 982
4: 5097 1445
5: 5098 390
6: 5099 1453
[[10]]
detector total
1: 5094 480
2: 5095 144
3: 5096 820
4: 5097 1170
5: 5098 325
6: 5099 1273
[[11]]
detector total
1: 5094 312
2: 5095 70
3: 5096 523
4: 5097 831
5: 5098 204
6: 5099 800
[[12]]
detector total
1: 5094 127
2: 5095 34
3: 5096 218
4: 5097 389
5: 5098 72
6: 5099 336

How-to use: create corrispettive .rns files and load them into the TSIS-CORSIM™ IDE.

Week number seeds

Scope models: week-base.trf, week-exte.trf.

5
   32317	   22061	   28769
   19372	   19528	    8812
   10695	     338	   20744
   16724	   27350	   29969
    8267	   26189	    3302

Saturday number seeds

Scope models: satu-base.trf, satu-base.trf.

1
    9927	    8219	   24007

Sunday number seeds

Scope models: sund-base.trf, sund-exte.trf.

1
    9927	    8219	   24007

Datasets

  1. battisti-monza-week-base-100s-o
  2. battisti-monza-satu-base-100s-o
  3. battisti-monza-sund-base-100s-o
  4. battisti-monza-week-exte-100s-o
  5. battisti-monza-satu-exte-100s-o
  6. battisti-monza-sund-exte-100s-o
  7. battisti-monza-base-100s-o: 1 + 2 + 3
  8. battisti-monza-exte-100s-o: 4 + 5 + 6

Notes

Idem for dataset composed by files of 300 seconds.

Base model detectors

  1. da P.zza Citterio: 5094 - MB17.DP_L1
  2. da Boccaccio verso Centro: 5095 - MB17.DP_L3
  3. da Brianza verso Vedano: 5096 - MB18.DP_L1
  4. da Regina Margherita sv sx in Battisti: 5097 - MB18.DP_L2
  5. Battisti sv sx verso Vedano: 5098 - MB18.DP_L3
  6. Battisti verso Centro Monza: 5099 - MB18.DP_L6

Extended model detectors

<upstream_node><downstream_node><lane>

lane = 0 only one lane, 1 right, 2 left, 7 other right, 8 other left (according to the driving direction).

Nodes Intersection/Street
1 dante
2 villa
3 viale brianza
4 boccaccio
5 via boccaccio
6 p.zza citterio
7 viale cesare battisti
8 boito
9 volta
10 via dante alighieri
11 via g. rossini
12 via donizzetti
13 via a. volta
14 via tognetti
16 via boito

Examples

  • Detector 912 is on the left lane of the street from volta intersection to dante intersection.
  • Detector 1480 is on the unique lane of via tognetti approaching boito intersection.

Various global configs

  • Min green time: 2 sec
  • Max green time: 90 sec
  • Average speed
    • Viale C. Battisti: 67 km/h
    • Altre strade: 56 km/h
  • Passage time: 2 sec
  • All-red clearance: 0 sec
  • Time interval duration: 100 sec
  • Vehicle entry headway: erlang with alpha = 2

Detector configs

  • Length: 1/10 foot
  • All directions sensing zone: 6.1 feet
  • Distance from downstream node: 21 feet

Time period labels

Hours Time Period Phase Class
00:00 - 02:05 1 night 1
02:05 - 04:10 2 night 1
04:10 - 06:15 3 sunrise 2
06:15 - 08:20 4 morning 3
08:20 - 10:25 5 morning 3
10:25 - 12:30 6 middle 4
12:30 - 14:35 7 middle 4
14:35 - 16:40 8 middle 4
16:40 - 18:45 9 afternoon 5
18:45 - 20:50 10 afternoon 5
20:50 - 22:55 11 evening 6
22:55 - 24:00 12 evening 6

Notes

Saturday classes: 11, 12, ..., 16.

Sunday classes: 21, 22, ..., 26.

TODO

  • simulation configs
  • network: geometry
  • network: streets
  • network: base detectors
  • netwrok: fix detector sensing zones
  • network: lanes properties
  • network: time periods
  • network: ingoing vehicle volumes from the real detectors count for each time period
  • network: setup ingoing volumes
  • network: fix ingoing volumes to reflect real-world counts
  • network: setup availabe turn movements and their percentage for each time period
  • network: setup time periods
  • pre-timed traffic plans: turns
  • pre-timed traffic plans: timing
  • pre-timed traffic plans: offsets
  • pre-timed traffic plans: remove fixed all-right signal
  • pre-timed traffic plans: fix yellow signals
  • pre-timed traffic plans: fix wrong phase times
  • pre-timed traffic plans: substitute cyan signal with a red on
  • create week-base.trf
  • create week-exte.trf
  • network: extend model adding other detectors
  • create satu-base.trf
  • network: setup ingoing volumes for saturday model
  • create satu-exte.trf
  • create sund-base.trf
  • network: setup ingoing volumes for sunday model
  • create sund-exte.trf
  • multi-run simulation (n = 5) of week-base.trf
  • save random seed numbers in an external file for reproducibility
  • multi-run simulation (n = 5) of week-exte.trf
  • base dataset generation: substitute week time periods with corresponding week classes
  • base dataset generation: substitute saturday time periods with corresponding saturday classes
  • base dataset generation: substitute sunday time periods with corresponding sunday classes
  • base dataset generation: cut week log file in 100 and 300 seconds files
  • base dataset generation: cut saturday log file in 100 and 300 seconds files
  • base dataset generation: cut sunday log file in 100 and 300 seconds files
  • base dataset generation: optimized generated week files removing duplicated consecutive rows
  • base dataset generation: optimized generated saturday files removing duplicated consecutive rows
  • base dataset generation: optimized generated sunday files removing duplicated consecutive rows
  • extended dataset generation: substitute week time periods with corresponding week classes
  • extended dataset generation: substitute saturday time periods with corresponding saturday classes
  • extended dataset generation: substitute sunday time periods with corresponding sunday classes
  • extended dataset generation: cut week log file in 100 and 300 seconds files
  • extended dataset generation: cut saturday log file in 100 and 300 seconds files
  • extended dataset generation: cut sunday log file in 100 and 300 seconds files
  • extended dataset generation: optimized generated week files removing duplicated consecutive rows
  • extended dataset generation: optimized generated saturday files removing duplicated consecutive rows
  • extended dataset generation: optimized generated sunday files removing duplicated consecutive rows
  • merge week, saturday and sunday dataset into a all-week one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment