_Edge

Module Contents

Classes

Edge

class _Edge.Edge(edgeId: str, laneList: list[trasmapy.network._Lane.Lane])

Bases: trasmapy._IdentifiedObject.IdentifiedObject

property streetName: str

Returns the street name of the edge.

property travelTime: float

Returns the estimated travel time for the last time step on the edge (s).

property CO2Emissions: float

Sum of CO2 emissions on this edge during this time step (mg).

property COEmissions: float

Sum of CO emissions on this edge during this time step (mg).

property HCEmissions: float

Sum of HC emissions on this edge during this time step (mg).

property PMxEmissions: float

Sum of PMx emissions on this edge during this time step (mg).

property NOxEmissions: float

Sum of NOx emissions on this edge during this time step (mg).

property fuelConsumption: float

Sum of fuel consumption on this edge during this time step (ml).

property electricityConsumption: float

Sum of electricity consumption on this edge during this time step (kWh).

property vehicleCount: int

The number of vehicles on this edge within the last time step.

property vehicleMeanSpeed: float

Returns the mean speed of vehicles that were on this edge within the last simulation step (m/s).

property vehicleIds: list[str]

Returns the list of ids of vehicles that were on the edge in the last simulation step. The order is from rightmost to leftmost lane and downstream for each lane.

property occupancy: float

Returns the percentage of time the edge was occupied by a vehicle (%).

property vehicleMeanLength: float

Returns the mean length of the vehicles on the edge in the last time step (m).

property vehicleWaitingTime: float

Returns the sum of the waiting times for all vehicles on the edge (s).

property vehicleHaltCount: int

Returns the total number of halting vehicles for the last time step on the edge. A speed of less than 0.1 m/s is considered a halt.

property lanes: list[trasmapy.network._Lane.Lane]
property stops: list[trasmapy.network._Stop.Stop]
getLane(laneId) trasmapy.network._Lane.Lane
getAdaptedTravelTime(time: float) float

Returns the edge travel time for the given time as stored in the global container. If no such value exists, -1 is returned.

setAdaptedTravelTime(travelTime: float, beginTime: float = None, endTime: float = None) None
getEffort(time: float) float

Returns the edge effort for the given time as stored in the global container. If no such value exists, -1 is returned.

setEffort(travelTime: float, beginTime: float = None, endTime: float = None) None

Inserts the information about the effort of the named edge valid from begin time to end time into the global edge weights container.

setMaxSpeed(maxSpeed: float) None

Sets the maximum speed for the vehicles in this edge (for all lanes) to the given value.

limitMaxSpeed(maxSpeed: float) None

Limits the maximum speed for the vehicles in this edge to the given value. Only affects lanes with higher maximum vehicle speeds than the given value.

setAllowed(allowedVehicleClasses: list[trasmapy.users.VehicleClass.VehicleClass]) None

Set the classes of vehicles allowed to move on this edge.

setDisallowed(disallowedVehicleClasses: list[trasmapy.users.VehicleClass.VehicleClass]) None

Set the classes of vehicles disallowed to move on this edge.

allowAll() None

Allow all vehicle classes to move on this edge.

forbidAll() None

Forbid all vehicle classes to move on this edge.