Road regulation¶
A RegulatedRoad
is a Road
in which the behavior of vehicles take or give the right of way at an intersection based on the priority
lane attribute.
On such a road, some rules are enforced:
most of the time, vehicles behave as usual;
however, they try to predict collisions with other vehicles through the
is_conflict_possible()
method;when it is the case, right of way is arbitrated through the
respect_priorities()
method, and the yielding vehicle target velocity is set to 0 until the conflict is resolved.
API¶
- class highway_env.road.regulation.RegulatedRoad(network: Optional[RoadNetwork] = None, vehicles: Optional[List[Vehicle]] = None, obstacles: Optional[List[Obstacle]] = None, np_random: Optional[RandomState] = None, record_history: bool = False)[source]¶
- step(dt: float) None [source]¶
Step the dynamics of each entity on the road.
- Parameters
dt – timestep [s]