trasmapy
Submodules
Package Contents
Classes
- class trasmapy.TraSMAPy(sumoCfg: str, useGui: bool = True, log: bool = False)
- property network: trasmapy.network._Network.Network
- property users: trasmapy.users._Users.Users
- property publicServices: trasmapy.publicservices._PublicServices.PublicServices
- property control: trasmapy.control._Control.Control
- property step: int
- property stepLength: float
The length of one simulation step (s).
- property time: float
The current simulation time (s).
- property minExpectedNumber: int
The minimum number of vehicles expected to be in the simulation.
- property collectedStatistics: dict[int, dict]
The accumulated statistics of the queries.
- query(query: Union[str, Callable]) dict
Run a query once and get its current result.
- registerQuery(queryName: str, query: Union[str, Callable], tickInterval: int = 1) None
Register query to be run every tick (by default). The tickInterval param can be customized to change the frequency of the statistics collection. Results are accumulated and can be obtained through the collectedStatistics property.
- doSimulationStep() None
- closeSimulation() None
- _genQueryMap() dict
- _startSimulation(sumoCfg: str, useGui: bool, log: bool) None