Skip to content

Commit ab66e57

Browse files
author
fredshone
authored
Merge pull request #31 from arup-group/update-london-bms
adds new single mode bms for london
2 parents adbe8bd + 2a288fc commit ab66e57

11 files changed

+152
-63
lines changed

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ A command line utility for processing (in big batches or bit by bit) MATSim outp
2424

2525
* **Benchmarking and Scoring** of specific subselections of outputs:
2626
* ``ireland_highways``
27-
* ``london_rods``
28-
* ``london_central_cordon``
29-
* ``london_inner_cordon``
30-
* ``london_outer_cordon``
31-
* ``london_thames_screen``
27+
* ``london_board_alight_subway``
28+
* ``london_central_cordon_car``
29+
* ``london_central_cordon_bus``
30+
* ``london_inner_cordon_car``
31+
* ``london_inner_cordon_bus``
32+
* ``london_boundary_cordon_car``
33+
* ``london_boundary_cordon_bus``
34+
* ``london_thames_screen_car``
35+
* ``london_thames_screen_bus``
3236
* ``test_pt_interaction_counter``
3337
* ``test_link_cordon``
3438

@@ -256,11 +260,15 @@ Currently available benchmarks include:
256260
_newer formats (produced using `bench`):_
257261

258262
* ``ireland_highways``
259-
* ``london_rods``
260-
* ``london_central_cordon``
261-
* ``london_inner_cordon``
262-
* ``london_outer_cordon``
263-
* ``london_thames_screen``
263+
* ``london_board_alight_subway``
264+
* ``london_central_cordon_car``
265+
* ``london_central_cordon_bus``
266+
* ``london_inner_cordon_car``
267+
* ``london_inner_cordon_bus``
268+
* ``london_boundary_cordon_car``
269+
* ``london_boundary_cordon_bus``
270+
* ``london_thames_screen_car``
271+
* ``london_thames_screen_bus``
264272
* ``test_pt_interaction_counter``
265273
* ``test_link_cordon``
266274

@@ -281,6 +289,10 @@ transport modes but not private vehicles for example. Possible modes currently i
281289

282290
* eg ``car, bus, train, subway...``
283291

292+
However please note that benchmarks are often mode specific and should be configured as such, eg:
293+
294+
* ``london_central_cordon_car = ["car"]``
295+
284296
## Command Line Reference
285297

286298
Elara can also be more generally used via the CLI to process individual outputs. USed in this manner the CLI should be pretty discoverable, once installed, try the command `elara` in your terminal to find out about the available options:

elara/benchmark_data/london/london-GLA/boundary_london_bus_2017.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

elara/benchmark_data/london/london-GLA/boundary_london_car_2017.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

elara/benchmark_data/london/london-GLA/central_london_bus_2016.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

elara/benchmark_data/london/london-GLA/central_london_car_2016.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

elara/benchmark_data/london/london-GLA/inner_london_bus_2016.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

elara/benchmark_data/london/london-GLA/inner_london_car_2016.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

elara/benchmark_data/london/london-GLA/london_thames_screen_bus_2016.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

elara/benchmark_data/london/london-GLA/london_thames_screen_car_2016.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

elara/benchmarking.py

Lines changed: 114 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -309,90 +309,146 @@ class IrelandHighwayCountersNew(LinkCounter):
309309
weight = 1
310310

311311

312-
class LondonCentralCordon(LinkCounter):
312+
class LondonCentralCordonCar(LinkCounter):
313313

314314
name = 'london_central_cordon'
315315
benchmark_data_path = get_benchmark_data(
316-
os.path.join('london', 'london-GLA', 'central_cordon.json')
316+
os.path.join('london', 'london-GLA', 'central_london_car_2016.json')
317317
)
318318

319319
requirements = ['volume_counts']
320-
valid_options = ['car', 'bus']
320+
valid_options = ['car']
321321
options_enabled = True
322322

323323
weight = 1
324324

325325

326-
class LondonInnerCordon(LinkCounter):
326+
class LondonCentralCordonBus(LinkCounter):
327+
328+
name = 'london_central_cordon'
329+
benchmark_data_path = get_benchmark_data(
330+
os.path.join('london', 'london-GLA', 'central_london_bus_2016.json')
331+
)
332+
333+
requirements = ['volume_counts']
334+
valid_options = ['bus']
335+
options_enabled = True
336+
337+
weight = 1
338+
339+
340+
class LondonInnerCordonCar(LinkCounter):
327341

328342
name = 'london_inner_cordon'
329343
benchmark_data_path = get_benchmark_data(
330-
os.path.join('london', 'london-GLA', 'inner_cordon.json')
344+
os.path.join('london', 'london-GLA', 'inner_london_car_2016.json')
331345
)
332346

333347
requirements = ['volume_counts']
334-
valid_options = ['car', 'bus']
348+
valid_options = ['car']
349+
options_enabled = True
350+
351+
weight = 1
352+
353+
354+
class LondonInnerCordonBus(LinkCounter):
355+
356+
name = 'london_inner_cordon'
357+
benchmark_data_path = get_benchmark_data(
358+
os.path.join('london', 'london-GLA', 'inner_london_bus_2016.json')
359+
)
360+
361+
requirements = ['volume_counts']
362+
valid_options = ['bus']
335363
options_enabled = True
336364

337365
weight = 1
338366

339367

340-
class LondonOuterCordon(LinkCounter):
368+
class LondonBoundaryCordonCar(LinkCounter):
341369

342370
name = 'london_outer_cordon'
343371
benchmark_data_path = get_benchmark_data(
344-
os.path.join('london', 'london-GLA', 'boundary_cordon.json')
372+
os.path.join('london', 'london-GLA', 'boundary_london_car_2017.json')
345373
)
346374

347375
requirements = ['volume_counts']
348-
valid_options = ['car', 'bus']
376+
valid_options = ['car']
349377
options_enabled = True
350378

351379
weight = 1
352380

353381

354-
class LondonThamesScreen(LinkCounter):
382+
class LondonBoundaryCordonBus(LinkCounter):
355383

356-
name = 'london_thames_screen'
384+
name = 'london_outer_cordon'
357385
benchmark_data_path = get_benchmark_data(
358-
os.path.join('london', 'london-GLA', 'thames_screen.json')
386+
os.path.join('london', 'london-GLA', 'boundary_london_bus_2017.json')
359387
)
360388

361389
requirements = ['volume_counts']
362-
valid_options = ['car', 'bus']
390+
valid_options = ['bus']
363391
options_enabled = True
364392

365393
weight = 1
366394

367395

368-
class LondonNorthScreen(LinkCounter):
396+
class LondonThamesScreenCar(LinkCounter):
369397

370-
name = 'london_northern_screen'
398+
name = 'london_thames_screen'
371399
benchmark_data_path = get_benchmark_data(
372-
os.path.join('london', 'london-GLA', 'northern_screen.json')
400+
os.path.join('london', 'london-GLA', 'london_thames_screen_car_2016.json')
373401
)
374402

375403
requirements = ['volume_counts']
376-
valid_options = ['car', 'bus']
404+
valid_options = ['car']
377405
options_enabled = True
378406

379407
weight = 1
380408

381409

382-
class LondonPeriphScreen(LinkCounter):
410+
class LondonThamesScreenBus(LinkCounter):
383411

384-
name = 'london_peripheral_screen'
412+
name = 'london_thames_screen'
385413
benchmark_data_path = get_benchmark_data(
386-
os.path.join('london', 'london-GLA', 'peripheral_screen.json')
414+
os.path.join('london', 'london-GLA', 'london_thames_screen_bus_2016.json')
387415
)
388416

389417
requirements = ['volume_counts']
390-
valid_options = ['car', 'bus']
418+
valid_options = ['bus']
391419
options_enabled = True
392420

393421
weight = 1
394422

395423

424+
# class LondonNorthScreen(LinkCounter):
425+
426+
# name = 'london_northern_screen'
427+
# benchmark_data_path = get_benchmark_data(
428+
# os.path.join('london', 'london-GLA', 'northern_screen.json')
429+
# )
430+
431+
# requirements = ['volume_counts']
432+
# valid_options = ['car', 'bus']
433+
# options_enabled = True
434+
435+
# weight = 1
436+
437+
438+
# class LondonPeriphScreen(LinkCounter):
439+
440+
# name = 'london_peripheral_screen'
441+
# benchmark_data_path = get_benchmark_data(
442+
# os.path.join('london', 'london-GLA', 'peripheral_screen.json')
443+
# )
444+
445+
# requirements = ['volume_counts']
446+
# valid_options = ['car', 'bus']
447+
# options_enabled = True
448+
449+
# weight = 1
450+
451+
396452

397453
class TransitInteraction(BenchmarkTool):
398454

@@ -1201,25 +1257,25 @@ class MultimodalTownCarCounters(PointsCounter):
12011257

12021258
# Cordons
12031259

1204-
class LondonInnerCordonCar(Cordon):
1260+
# class LondonInnerCordonCar(Cordon):
12051261

1206-
requirements = ['volume_counts']
1207-
valid_options = ['car']
1208-
options_enabled = True
1262+
# requirements = ['volume_counts']
1263+
# valid_options = ['car']
1264+
# options_enabled = True
12091265

1210-
weight = 1
1211-
cordon_counter = HourlyCordonDirectionCount
1212-
benchmark_path = get_benchmark_data(
1213-
os.path.join('london', 'inner_cordon', 'InnerCordon2016.csv')
1214-
)
1215-
cordon_path = get_benchmark_data(
1216-
os.path.join('london', 'inner_cordon', 'cordon_links.csv')
1217-
)
1266+
# weight = 1
1267+
# cordon_counter = HourlyCordonDirectionCount
1268+
# benchmark_path = get_benchmark_data(
1269+
# os.path.join('london', 'inner_cordon', 'InnerCordon2016.csv')
1270+
# )
1271+
# cordon_path = get_benchmark_data(
1272+
# os.path.join('london', 'inner_cordon', 'cordon_links.csv')
1273+
# )
12181274

1219-
directions = {'in': 1, 'out': 2}
1220-
year = 2016
1221-
hours = None
1222-
modes = ['car']
1275+
# directions = {'in': 1, 'out': 2}
1276+
# year = 2016
1277+
# hours = None
1278+
# modes = ['car']
12231279

12241280

12251281
class DublinCanalCordonCar(Cordon):
@@ -1316,21 +1372,24 @@ class BenchmarkWorkStation(WorkStation):
13161372

13171373
tools = {
13181374
"ireland_highways": IrelandHighwayCountersNew,
1319-
"london_board_alight": LondonRODS,
1320-
"london_boundary_cordon": LondonOuterCordon,
1321-
"london_central_cordon": LondonCentralCordon,
1322-
"london_inner_cordon": LondonInnerCordon,
1323-
"london_northern_screen": LondonNorthScreen,
1324-
"london_peripheral_screen": LondonPeriphScreen,
1325-
"london_thames_screen": LondonThamesScreen,
1375+
"london_board_alight_subway": LondonRODS,
1376+
"london_boundary_cordon_car": LondonBoundaryCordonCar,
1377+
"london_boundary_cordon_bus": LondonBoundaryCordonBus,
1378+
"london_central_cordon_car": LondonCentralCordonCar,
1379+
"london_central_cordon_bus": LondonCentralCordonBus,
1380+
"london_inner_cordon_car": LondonInnerCordonCar,
1381+
"london_inner_cordon_bus": LondonInnerCordonBus,
1382+
"london_thames_screen_car": LondonThamesScreenCar,
1383+
"london_thames_screen_bus": LondonThamesScreenBus,
1384+
# "london_northern_screen": LondonNorthScreen,
1385+
# "london_peripheral_screen": LondonPeriphScreen,
13261386

1387+
# old style:
13271388
"test_pt_interaction_counter": TestPTInteraction,
13281389
"test_town_highways": TestHighwayCounters,
13291390
"squeeze_town_highways": SqueezeTownHighwayCounters,
13301391
"multimodal_town_modeshare": MultimodalTownModeShare,
13311392
"multimodal_town_cars_counts": MultimodalTownCarCounters,
1332-
# "ireland_highways": IrelandHighwayCounters, # replaced with new
1333-
"london_inner_cordon_car": LondonInnerCordonCar,
13341393
"dublin_canal_cordon_car": DublinCanalCordonCar,
13351394
"ireland_commuter_modeshare": IrelandCommuterStats,
13361395
"test_link_cordon": TestCordon,
@@ -1341,20 +1400,22 @@ class BenchmarkWorkStation(WorkStation):
13411400

13421401
BENCHMARK_WEIGHTS = {
13431402
"test_pt_interaction_counter": 1,
1344-
"london_rods": 1,
13451403
"test_link_cordon": 1,
13461404
"ireland_highways": 1,
1347-
"london_central_cordon": 1,
1348-
"london_inner_cordon": 1,
1349-
"london_outer_cordon": 1,
1350-
"london_thames_screen": 1,
1405+
"london_board_alight_subway": 1,
1406+
"london_boundary_cordon_car": 1,
1407+
"london_boundary_cordon_bus": 1,
1408+
"london_central_cordon_car": 1,
1409+
"london_central_cordon_bus": 1,
1410+
"london_inner_cordon_car": 1,
1411+
"london_inner_cordon_bus": 1,
1412+
"london_thames_screen_car": 1,
1413+
"london_thames_screen_bus": 1,
13511414

13521415
"test_town_highways": 1,
13531416
"squeeze_town_highways": 1,
13541417
"multimodal_town_modeshare": 1,
13551418
"multimodal_town_cars_counts": 1,
1356-
# "ireland_highways": 1, # replaced with new
1357-
"london_inner_cordon_car": 1,
13581419
"dublin_canal_cordon_car": 1,
13591420
"ireland_commuter_modeshare": 1,
13601421
"test_town_cordon": 1,

0 commit comments

Comments
 (0)