Support for other routed modes
KasiaKoz opened this issue · 1 comments
KasiaKoz commented
Running Elara on a sim with routed bike mode fails with:
07-15 11:42 elara.event_handlers INFO parsed 1024 events
Traceback (most recent call last):
File "/usr/local/bin/elara", line 33, in <module>
sys.exit(load_entry_point('elara', 'console_scripts', 'elara')())
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.8/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/elara/main.py", line 64, in run
main(config=config, dry_run=dry)
File "/elara/main.py", line 79, in main
factory.build(requirements)
File "/elara/factory.py", line 735, in build
return build_dag(queue=queue, write_path=write_path)
File "/elara/factory.py", line 792, in build_dag
current.build(write_path=write_path)
File "/elara/event_handlers.py", line 2523, in build
handler.process_event(event)
File "/elara/event_handlers.py", line 456, in process_event
x, y, z = table_position(
File "/elara/event_handlers.py", line 2567, in table_position
x = elem_indices[elem_id]
KeyError: '262_bike'
where '262_bike'
is a bike only network link. I think this is due to: https://github.com/arup-group/elara/blob/main/elara/event_handlers.py#L52-L61 where a vehicle mode can only be a PT mode or 'car'
; I don't understand everything that's happening but I think the links might be getting subsetted on the vehicle mode and so the 'bike'
only links are not there anymore resulting in this key error.