smarts.core.traffic_provider module
- class smarts.core.traffic_provider.TrafficProvider[source]
A TrafficProvider is a Provider that controls/owns a (sub)set of vehicles that all share the same action space.
- reserve_traffic_location_for_vehicle(vehicle_id: str, reserved_location: Polygon)[source]
Reserve an area around a location where vehicles cannot spawn until a given vehicle is added. :param vehicle_id: The vehicle to wait for. :param reserved_location: The space the vehicle takes up.
- route_for_vehicle(vehicle_id: str) Route | None [source]
Gets the current Route for the specified vehicle, if known.
- update_route_for_vehicle(vehicle_id: str, new_route: Route)[source]
Set a new route for the given vehicle.