Links outside viewport not considered for events
This commit is contained in:
parent
35ec942d94
commit
47b26c4882
|
@ -102,7 +102,7 @@ class MatsimVisualizer:
|
||||||
current_time = float(event.get('time'))
|
current_time = float(event.get('time'))
|
||||||
ticked = False
|
ticked = False
|
||||||
|
|
||||||
if link_id is not None and event_type is not None and time is not None:
|
if link_id is not None and event_type is not None and time is not None and any(link['id'] == link_id for link in self._links):
|
||||||
if event_type in ['entered link', 'vehicle enters traffic']:
|
if event_type in ['entered link', 'vehicle enters traffic']:
|
||||||
self._traffic_per_tick[self._tick][link_id] += 1
|
self._traffic_per_tick[self._tick][link_id] += 1
|
||||||
ticked = True
|
ticked = True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user