smarts.core.utils.centralized_traci_server module

class smarts.core.utils.centralized_traci_server.CentralizedTraCIServer(host, port)[source]

A centralized server for handling SUMO instances to prevent race conditions.

async handle_client(reader, writer)[source]

Read data from the client.

async start(timeout: float | None = 3600.0)[source]

Start the server.

smarts.core.utils.centralized_traci_server.main(*_, _host=None, _port=None, timeout: float | None = 600)[source]

The program entrypoint.

smarts.core.utils.centralized_traci_server.spawn_if_not(remote_host: str, remote_port: int)[source]

Create a new server if it does not already exist.

Parameters:
  • remote_host (str) – The host name.

  • remote_port (int) – The host port.