_Fleet

Module Contents

Classes

Fleet

class _Fleet.Fleet(fleetId: str, fleetRoute: trasmapy.users._Route.Route, vehicleType: trasmapy.users._VehicleType.VehicleType, fleetStops: list[trasmapy.users.ScheduledStop.ScheduledStop], period: float, start: float = 0, end: float = INVALID_DOUBLE_VALUE)

Bases: trasmapy._IdentifiedObject.IdentifiedObject, trasmapy._SimUpdatable.SimUpdatable

property vehicleType: trasmapy.users._VehicleType.VehicleType
property route: trasmapy.users._Route.Route
property fleetStops: list[trasmapy.users.ScheduledStop.ScheduledStop]
property end: float
property period: float
property start: float
property lastSpawnTime: float

Last spawn vehicle simulation time. -1 means no spawn yet.

property nextSpawnTime: float

Simulation time of the next vehicle spawn. Note that due to update rates, the spawn might occur later than this time. -1 means first spawn.

property spawnedVehiclesIds: list[str]

Ids of all vehicles spawned until the current simulation step.

property vehicles: list[trasmapy.users._Vehicle.Vehicle]

The vehicles that are currently present in the simulation.

_doSimulationStep(*args, step: int, time: float) None
_spawnVehicle(time: float, users: trasmapy.users._Users.Users)