Package de.tudresden.sumo.cmd
Class Lane
java.lang.Object
de.tudresden.sumo.cmd.Lane
The Class Lane.
- Author:
- Mario Krumnow, Evamarie Wiessner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SumoCommand
getAllowed
(String laneID) Returns a list of allowed vehicle classes.static SumoCommand
getCO2Emission
(String laneID) Returns the CO2 emissions (in mg) on the given lane during the last time step.static SumoCommand
getCOEmission
(String laneID) Returns the CO emissions (in mg) on the given lane during the last time step.static SumoCommand
getDisallowed
(String laneID) Returns a list of disallowed vehicle classes.static SumoCommand
Returns the ID of the edge this lane belongs to.static SumoCommand
getElectricityConsumption
(String laneID) Returns the electricity consumption in ml for the last time step.static SumoCommand
Returns the ids of incoming lanes that have right of way over the connection from laneID to toLaneID.static SumoCommand
getFuelConsumption
(String laneID) Returns the fuel consumption (in ml) on the given lane during the last time step.static SumoCommand
getHCEmission
(String laneID) Returns the HC emissions (in mg) on the given lane during the last time step.static SumoCommand
Returns the number of all lanes in the network.static SumoCommand
Returns a list of IDs of all lanes in the network.static SumoCommand
getInternalFoes
(String laneID) Returns the ids of internal lanes that are in conflict with the given internal lane id.static SumoCommand
getLastStepHaltingNumber
(String laneID) Returns the total number of halting vehicles on the given lane within the last time step.static SumoCommand
getLastStepLength
(String laneID) Returns the total vehicle length (in m) on the given lane during the last time step.static SumoCommand
getLastStepMeanSpeed
(String laneID) Returns the mean speed (in m/s) on the given lane within the last time step.static SumoCommand
getLastStepOccupancy
(String laneID) Returns the occupancy (in %) on the given lane during the last time step.static SumoCommand
getLastStepVehicleIDs
(String laneID) Returns the IDs of the vehicles on the given lane within the last time step.static SumoCommand
getLastStepVehicleNumber
(String laneID) Returns number of vehicles on this lane within the last time step.static SumoCommand
Returns the length (in m) of the named lane.static SumoCommand
getLinkNumber
(String laneID) Returns the number of links outgoing from this lane.static SumoCommand
Returns descriptions of the links (in m) outgoing from this lane.static SumoCommand
getMaxSpeed
(String laneID) Returns the maximum speed (in m/s) allowed on this lane.static SumoCommand
getNoiseEmission
(String laneID) Returns the noise emissions (in db) on the given lane during the last time step.static SumoCommand
getNOxEmission
(String laneID) Returns the NOx emissions (in mg) on the given lane during the last time step.static SumoCommand
getParameter
(String laneID, String param) Returns the chosen parameter.static SumoCommand
getPMxEmission
(String laneID) Returns the particular matter emissions (in mg) on the given lane during the last time step.static SumoCommand
Returns this lane's shape.static SumoCommand
getTraveltime
(String laneID) Returns the estimated travel time (in s) on the given lane during the last time step.static SumoCommand
getWaitingTime
(String laneID) getWaitingTime.static SumoCommand
Returns the width (in m) of the named lane.static SumoCommand
setAllowed
(String laneID, SumoStringList allowedClasses) Set a list of allowed vehicle classes.static SumoCommand
setDisallowed
(String laneID, SumoStringList disallowedClasses) Set a list of disallowed vehicle classes.static SumoCommand
Set the length (in m) of the named lane.static SumoCommand
setMaxSpeed
(String laneID, double speed) Set the maximum speed (in m/s) allowed on this lane.static SumoCommand
setParameter
(String laneID, String param, String value) Sets the chosen parameter.
-
Constructor Details
-
Lane
public Lane()
-
-
Method Details
-
getAllowed
Returns a list of allowed vehicle classes.- Parameters:
laneID
- a string identifying a lane- Returns:
- list of allowed vehicle classes. An empty list means all vehicles are allowed.
-
getIDCount
Returns the number of all lanes in the network.- Returns:
- the number of lanes
-
getCO2Emission
Returns the CO2 emissions (in mg) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the CO2 emissions (in mg)
-
getCOEmission
Returns the CO emissions (in mg) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the CO emissions (in mg)
-
getDisallowed
Returns a list of disallowed vehicle classes.- Parameters:
laneID
- a string identifying a lane- Returns:
- list of disallowed vehicle classes
-
getEdgeID
Returns the ID of the edge this lane belongs to.- Parameters:
laneID
- a string identifying a lane- Returns:
- the id of the edge this lane belongs to
-
getElectricityConsumption
Returns the electricity consumption in ml for the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the energy consumption
-
getFoes
Returns the ids of incoming lanes that have right of way over the connection from laneID to toLaneID.- Parameters:
laneID
- a string identifying a lanetoLane
- a string identifying the target lane- Returns:
- the energy consumption
-
getInternalFoes
Returns the ids of internal lanes that are in conflict with the given internal lane id.- Parameters:
laneID
- a string identifying a lane- Returns:
- the energy consumption
-
getFuelConsumption
Returns the fuel consumption (in ml) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the fuel consumption (in ml)
-
getHCEmission
Returns the HC emissions (in mg) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the HC emissions (in mg)
-
getIDList
Returns a list of IDs of all lanes in the network.- Returns:
- a list of IDs of all lanes
-
getLastStepHaltingNumber
Returns the total number of halting vehicles on the given lane within the last time step. A speed of less than 0.1 m/s is considered a halt.- Parameters:
laneID
- a string identifying a lane- Returns:
- number of halting vehicles within the last time step
-
getLastStepLength
Returns the total vehicle length (in m) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- vehicle length (in m) within the last time step
-
getLastStepMeanSpeed
Returns the mean speed (in m/s) on the given lane within the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the average speed (in m/s) within the last time step
-
getLastStepOccupancy
Returns the occupancy (in %) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the percentage of time the lane was occupied
-
getLastStepVehicleIDs
Returns the IDs of the vehicles on the given lane within the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- list of IDs of vehicles
-
getLastStepVehicleNumber
Returns number of vehicles on this lane within the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- number of vehicles
-
getLength
Returns the length (in m) of the named lane.- Parameters:
laneID
- a string identifying a lane- Returns:
- length of the named lane (in m)
-
getLinkNumber
Returns the number of links outgoing from this lane.- Parameters:
laneID
- a string identifying a lane- Returns:
- number of connections to successive lanes
-
getLinks
Returns descriptions of the links (in m) outgoing from this lane.- Parameters:
laneID
- a string identifying a lane- Returns:
- a list containing IDs of sucessor lanes
-
getMaxSpeed
Returns the maximum speed (in m/s) allowed on this lane.- Parameters:
laneID
- a string identifying a lane- Returns:
- maximum allowed speed (in m/s)
-
getNOxEmission
Returns the NOx emissions (in mg) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the NOx emissions (in mg)
-
getNoiseEmission
Returns the noise emissions (in db) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the noise emissions (in mg)
-
getParameter
Returns the chosen parameter.- Parameters:
laneID
- a string identifying the edgeparam
- a string identifying the parameter- Returns:
- the specific parameter
-
setParameter
Sets the chosen parameter.- Parameters:
laneID
- the lane IDparam
- a string identifying the parametervalue
- a string identifying the new value- Returns:
- SumoCommand
-
getPMxEmission
Returns the particular matter emissions (in mg) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- the particular matter emissions (in mg)
-
getShape
Returns this lane's shape.- Parameters:
laneID
- a string identifying a lane- Returns:
- list of position describing the geometry
-
getTraveltime
Returns the estimated travel time (in s) on the given lane during the last time step.- Parameters:
laneID
- a string identifying a lane- Returns:
- estimated travel time (in s)
-
getWidth
Returns the width (in m) of the named lane.- Parameters:
laneID
- a string identifying a lane- Returns:
- width of lane (in m)
-
getWaitingTime
getWaitingTime.- Parameters:
laneID
- a string identifying a lane- Returns:
- the waiting time of the lane (in s)
-
setAllowed
Set a list of allowed vehicle classes.- Parameters:
laneID
- a string identifying a laneallowedClasses
- allowed vehicle classes- Returns:
- SumoCommand
-
setDisallowed
Set a list of disallowed vehicle classes.- Parameters:
laneID
- a string identifying a lanedisallowedClasses
- not allowed vehicle classes- Returns:
- SumoCommand
-
setLength
Set the length (in m) of the named lane.- Parameters:
laneID
- a string identifying a lanelength
- new length (in m) of the lane- Returns:
- SumoCommand
-
setMaxSpeed
Set the maximum speed (in m/s) allowed on this lane.- Parameters:
laneID
- a string identifying a lanespeed
- maximum velocity allowed (in m/s)- Returns:
- SumoCommand
-