How to judge whether a car is in the road network?
Closed this issue · 5 comments
In info_step xxx.log file, if a car drived out of the roadnet, "step" will describe the moment it left. Without "step", we don't know the precise time the car left. In fact, agent.py indeed don't know the time. CBEngine passed in obs['info'] to agent.py but without "step"?
A car leaved the roadnet for a very long time, its obs['info']:
{'distance': [537.2222222222224], 'drivable': [374202.0], 'road': [3742.0], 'route': [3742.0], 'speed': [13.88888888888889], 'start_time': [0.0], 't_ff': [1638.1470000000002]}
By the information above, How to judge whether the car is in the road network?
Same for me.
Same, this is necessary
Thanks for your comment.
- The 'step' in log file "info_step *.json" is used to calculate the delay index. We check the vehicle information every 10 seconds. It means the last step the vehicle was last seen
- For agent.py , the "info" from env.step() is the current vehicles in roadnet. you can maintain your own data structure of the last step of vehicles.
For the granularity of 10 seconds, you can modify it in "report_log_rate" in simulator.cfg. But it will slow down the simulator.
Thanks!