get_safe_phases module
- get_safe_phases.get_safe_phases(net_xml_path: str, junction_id: str)
For a given traffic-light-controlled junction return all connection combinations that can receive a green signal at the same time without leading to collisions.
- Parameters
net_xml_path (str) – Path to SUMO net xml file
junction_id (str) – SUMO junction ID
- Returns
Two values: the number of connections in the junction & List of all safe phase combinations as list of lists where each inner list is a combination of connections that can share green signals without colliding
- Return type
int, list