public class Vehicle
extends Object
| Constructor and Description |
|---|
Vehicle() |
| Modifier and Type | Method and Description |
|---|---|
static SumoCommand |
add(String vehID,
String typeID,
String routeID,
int depart,
double pos,
double speed,
byte lane)
Add a new vehicle.
|
static SumoCommand |
changeLane(String vehID,
byte laneIndex,
int duration)
Forces a lane change to the lane with the given index; if successful, the lane will be chosen for the given amount of time.
|
static SumoCommand |
changeTarget(String vehID,
String edgeID)
The vehicle's destination edge is set to the given.
|
static SumoCommand |
getAccel(String vehID)
Returns the acceleration of the named vehicle within the last step.
|
static SumoCommand |
getAdaptedTraveltime(String vehID,
int time,
String edgeID)
Returns the edge travel time for the given time as stored in the vehicle's internal container.
|
static SumoCommand |
getAllowedSpeed(String vehID)
Returns the maximum allowed speed on the current lane regarding speed factor in m/s for this vehicle.
|
static SumoCommand |
getAngle(String vehID)
Returns the angle of the named vehicle within the last time step.
|
static SumoCommand |
getBestLanes(String vehID)
getBestLanes
|
static SumoCommand |
getCO2Emission(String vehID)
Returns the CO2 emission in mg for the last time step.
|
static SumoCommand |
getCOEmission(String vehID)
Returns the CO emission in mg for the last time step.
|
static SumoCommand |
getColor(String vehID)
Returns the vehicle's color (RGBA).
|
static SumoCommand |
getDecel(String vehID)
Returns the deceleration of the named vehicle within the last time step.
|
static SumoCommand |
getDistance(String vehID)
Get the distance to the starting point acts as a odometer
|
static SumoCommand |
getDrivingDistance(String vehID,
String edgeID,
double pos,
int laneID)
Returns the driving distance (in m) of the named vehicle within the last tine step.
|
static SumoCommand |
getDrivingDistance2D(String vehID,
double x,
double y)
getDrivingDistance2D
|
static SumoCommand |
getEffort(String vehID,
int time,
String edgeID)
Returns the edge effort for the given time as stored in the vehicle's internal container.
|
static SumoCommand |
getEmissionClass(String vehID)
Returns the emission class of the named vehicle.
|
static SumoCommand |
getFuelConsumption(String vehID)
Returns the fuel consumption in ml for the last time step.
|
static SumoCommand |
getHCEmission(String vehID)
Returns the HC emission (in mg) during the last time step.
|
static SumoCommand |
getIDCount()
Returns the number of all vehicles in the network.
|
static SumoCommand |
getIDList()
Returns a list of ids of all vehicles currently running within the scenario.
|
static SumoCommand |
getImperfection(String vehID)
getImperfection
|
static SumoCommand |
getLaneID(String vehID)
Returns the id of the lane the named vehicle was at within the last step.
|
static SumoCommand |
getLaneIndex(String vehID)
Returns the index of the lane the named vehicle was at within the last step.
|
static SumoCommand |
getLanePosition(String vehID)
Returns the position of the vehicle along the lane (in m).
|
static SumoCommand |
getLeader(String vehID,
double dist)
Return the leading vehicle id together with the distance.
|
static SumoCommand |
getLength(String vehID)
Returns the length (in m) of the named vehicle.
|
static SumoCommand |
getMaxSpeed(String vehID)
Returns the maximum speed(in m/s) of the named vehicle.
|
static SumoCommand |
getMinGap(String vehID)
Returns the minimum gap (in m) between this vehicle and the vehicle before it.
|
static SumoCommand |
getNoiseEmission(String vehID)
Returns the noise emission (in db) generated by the vehicle during the last time step.
|
static SumoCommand |
getNOxEmission(String vehID)
Returns the NOx emissions (in mg) generated by the vehicle during the last time step.
|
static SumoCommand |
getPersonNumber(String vehID)
getPersonNumber
|
static SumoCommand |
getPMxEmission(String vehID)
Returns the particular matter emissions (in mg) generated by the vehicle during the last time step.
|
static SumoCommand |
getPosition(String vehID)
Returns the position of the named vehicle within the last step [m,m].
|
static SumoCommand |
getPosition3D(String vehID)
Returns the position of the named vehicle within the last step [m,m,m].
|
static SumoCommand |
getRoadID(String vehID)
Returns the id of the edge the named vehicle was at within the last step.
|
static SumoCommand |
getRoute(String vehID)
Returns the ids of the edges the vehicle's route is made of.
|
static SumoCommand |
getRouteID(String vehID)
Returns the id of the route of the named vehicle.
|
static SumoCommand |
getShapeClass(String vehID)
getShapeClass
|
static SumoCommand |
getSignals(String vehID)
getSignals
|
static SumoCommand |
getSpeed(String vehID)
Returns the speed (in m/s) of the named vehicle within the last step.
|
static SumoCommand |
getSpeedDeviation(String vehID)
Returns the standard deviation of the estimated maximum speed (see speed factor) divided by this speed.
|
static SumoCommand |
getSpeedFactor(String vehID)
Returns the factor by which the driver multiplies the speed read from street signs to estimate "real" maximum allowed speed.
|
static SumoCommand |
getSpeedWithoutTraCI(String vehID)
getSpeedWithoutTraCI
|
static SumoCommand |
getTau(String vehID)
getTau
|
static SumoCommand |
getTypeID(String vehID)
Returns the id of the type of the named vehicle.
|
static SumoCommand |
getVehicleClass(String vehID)
Returns the vehicle class.
|
static SumoCommand |
getWaitingTime(String vehID)
The waiting time of a vehicle is defined as the time (in seconds) spent with a speed below 0.1m/s since the last time it was faster than 0.1m/s.
|
static SumoCommand |
getWidth(String vehID)
Returns the vehicle's width (in m).
|
static SumoCommand |
isRouteValid(String vehID)
Returns whether the Route is valid.
|
static SumoCommand |
moveTo(String vehID,
String laneID,
double pos)
Moves the vehicle to a new position.
|
static SumoCommand |
moveToVTD(String vehID,
String edgeID,
int lane,
double x,
double y)
moveToVTD
|
static SumoCommand |
remove(String vehID,
byte reason)
Removes vehicle with the given ID for the given reason.
|
static SumoCommand |
rerouteEffort(String vehID)
Computes a new route using the vehicle's internal and the global edge effort information.
|
static SumoCommand |
rerouteTraveltime(String vehID)
Computes a new route using the vehicle's internal and the global edge travel time information.
|
static SumoCommand |
resume(String vehID)
Continue after a stop
|
static SumoCommand |
setAccel(String vehID,
double accel)
Sets the acceleration of the named vehicle.
|
static SumoCommand |
setAdaptedTraveltime(String vehID,
int begTime,
int endTime,
String edgeID,
double time)
Sets the edge travel time of the named vehicle.
|
static SumoCommand |
setColor(String vehID,
SumoColor color)
Sets the vehicle's color (RGBA).
|
static SumoCommand |
setDecel(String vehID,
double decel)
Sets the deceleration of the named vehicle.
|
static SumoCommand |
setEffort(String vehID,
int begTime,
int endTime,
String edgeID,
double effort)
Sets the edge effort for the given time as stored in the vehicle's internal container.
|
static SumoCommand |
setEmissionClass(String vehID,
String clazz)
Sets the emission class of the named vehicle.
|
static SumoCommand |
setImperfection(String vehID,
double imperfection)
setImperfection
|
static SumoCommand |
setLaneChangeMode(String vehID,
int lcm)
Sets the vehicle's lane change mode as a bitset.
|
static SumoCommand |
setLength(String vehID,
double length)
Sets the length (in m) of the named vehicle.
|
static SumoCommand |
setMaxSpeed(String vehID,
double speed)
Sets the maximum speed (in m/s) of the named vehicle.
|
static SumoCommand |
setMinGap(String vehID,
double minGap)
Sets the minimum gap (in m) between this vehicle and the vehicle before it.
|
static SumoCommand |
setRoute(String vehID,
SumoStringList edgeList)
Sets the IDs of the edges the vehicle's route is made of.
|
static SumoCommand |
setRouteID(String vehID,
String routeID)
Sets the id of the route of the named vehicle.
|
static SumoCommand |
setShapeClass(String vehID,
String clazz)
setShapeClass
|
static SumoCommand |
setSignals(String vehID,
String signals)
setSignals
|
static SumoCommand |
setSpeed(String vehID,
double speed)
Sets the speed (in m/s) of the named vehicle.
|
static SumoCommand |
setSpeedDeviation(String vehID,
double deviation)
Sets the standard deviation of the estimated maximum speed.
|
static SumoCommand |
setSpeedFactor(String vehID,
double factor)
Sets the factor by which the driver multiplies the speed read from street signs to estimate "real" maximum allowed speed.
|
static SumoCommand |
setSpeedMode(String vehID,
int sm)
Sets the vehicle's speed mode as a bitset.
|
static SumoCommand |
setStop(String vehID,
String edgeID,
double pos,
byte laneIndex,
int duration,
byte stopType)
Lets the vehicle stop at the given edge, at the given position and lane.
|
static SumoCommand |
setTau(String vehID,
double tau)
setTau
|
static SumoCommand |
setType(String vehID,
String typeID)
Sets the id of the type for the named vehicle.
|
static SumoCommand |
setVehicleClass(String vehID,
String clazz)
Sets the vehicle class.
|
static SumoCommand |
setWidth(String vehID,
double width)
Sets the vehicle's width (in m).
|
static SumoCommand |
slowDown(String vehID,
double speed,
int duration)
Reduces the speed to the given for the given amount of time.
|
public static SumoCommand getAccel(String vehID)
vehID - id of the vehiclepublic static SumoCommand getIDCount()
public static SumoCommand getAdaptedTraveltime(String vehID, int time, String edgeID)
vehID - id of the vehicletime - timeedgeID - id of the edgepublic static SumoCommand getAngle(String vehID)
vehID - id of the vehiclepublic static SumoCommand getAllowedSpeed(String vehID)
vehID - id of the vehiclepublic static SumoCommand getLeader(String vehID, double dist)
vehID - id of the vehicledist - distancepublic static SumoCommand getPersonNumber(String vehID)
vehID - id of the vehiclepublic static SumoCommand getBestLanes(String vehID)
vehID - id of the vehiclepublic static SumoCommand getCO2Emission(String vehID)
vehID - id of the vehiclepublic static SumoCommand getCOEmission(String vehID)
vehID - id of the vehiclepublic static SumoCommand getColor(String vehID)
vehID - id of the vehiclepublic static SumoCommand getDecel(String vehID)
vehID - id of the vehiclepublic static SumoCommand getDrivingDistance(String vehID, String edgeID, double pos, int laneID)
vehID - idedgeID - edge idpos - poslaneID - lane idpublic static SumoCommand getDrivingDistance2D(String vehID, double x, double y)
vehID - id of the vehiclex - xy - ypublic static SumoCommand getDistance(String vehID)
vehID - id of the vehiclepublic static SumoCommand getEffort(String vehID, int time, String edgeID)
vehID - id of the vehicletime - timeedgeID - edge idpublic static SumoCommand getEmissionClass(String vehID)
vehID - id of the vehiclepublic static SumoCommand getFuelConsumption(String vehID)
vehID - id of the vehiclepublic static SumoCommand getHCEmission(String vehID)
vehID - id of the vehiclepublic static SumoCommand getIDList()
public static SumoCommand getImperfection(String vehID)
vehID - id of the vehiclepublic static SumoCommand getLaneID(String vehID)
vehID - id of the vehiclepublic static SumoCommand getLaneIndex(String vehID)
vehID - id of the vehiclepublic static SumoCommand getLanePosition(String vehID)
vehID - id of the vehiclepublic static SumoCommand getLength(String vehID)
vehID - id of the vehiclepublic static SumoCommand getMaxSpeed(String vehID)
vehID - id of the vehiclepublic static SumoCommand getMinGap(String vehID)
vehID - id of the vehiclepublic static SumoCommand getNOxEmission(String vehID)
vehID - id of the vehiclepublic static SumoCommand getNoiseEmission(String vehID)
vehID - id of the vehiclepublic static SumoCommand getPMxEmission(String vehID)
vehID - id of the vehiclepublic static SumoCommand getPosition(String vehID)
vehID - id of the vehiclepublic static SumoCommand getPosition3D(String vehID)
vehID - id of the vehiclepublic static SumoCommand getRoadID(String vehID)
vehID - id of the vehiclepublic static SumoCommand getRoute(String vehID)
vehID - id of the vehiclepublic static SumoCommand getRouteID(String vehID)
vehID - id of the vehiclepublic static SumoCommand getShapeClass(String vehID)
vehID - id of the vehiclepublic static SumoCommand getSignals(String vehID)
vehID - id of the vehiclepublic static SumoCommand getSpeed(String vehID)
vehID - id of the vehiclepublic static SumoCommand getSpeedDeviation(String vehID)
vehID - id of the vehiclepublic static SumoCommand getSpeedFactor(String vehID)
vehID - id of the vehiclepublic static SumoCommand getSpeedWithoutTraCI(String vehID)
vehID - id of the vehiclepublic static SumoCommand getTau(String vehID)
vehID - id of the vehiclepublic static SumoCommand getWaitingTime(String vehID)
vehID - id of the vehiclepublic static SumoCommand getTypeID(String vehID)
vehID - id of the vehiclepublic static SumoCommand getVehicleClass(String vehID)
vehID - id of the vehiclepublic static SumoCommand getWidth(String vehID)
vehID - id of the vehiclepublic static SumoCommand isRouteValid(String vehID)
vehID - id of the vehiclepublic static SumoCommand slowDown(String vehID, double speed, int duration)
vehID - id of the vehiclespeed - speedduration - durationpublic static SumoCommand add(String vehID, String typeID, String routeID, int depart, double pos, double speed, byte lane)
vehID - vehicle idtypeID - type idrouteID - route iddepart - departpos - positionspeed - speedlane - lanepublic static SumoCommand changeLane(String vehID, byte laneIndex, int duration)
vehID - vehicle idlaneIndex - lane indexduration - durationpublic static SumoCommand changeTarget(String vehID, String edgeID)
vehID - vehicle idedgeID - edge idpublic static SumoCommand moveTo(String vehID, String laneID, double pos)
vehID - vehicle idlaneID - lane idpos - positionpublic static SumoCommand moveToVTD(String vehID, String edgeID, int lane, double x, double y)
vehID - vehicle idedgeID - edge idlane - lanex - xy - ypublic static SumoCommand remove(String vehID, byte reason)
vehID - vehicle idreason - reasonpublic static SumoCommand rerouteEffort(String vehID)
vehID - id of the vehiclepublic static SumoCommand rerouteTraveltime(String vehID)
vehID - id of the vehiclepublic static SumoCommand setAccel(String vehID, double accel)
vehID - id of the vehicleaccel - accelerationpublic static SumoCommand setAdaptedTraveltime(String vehID, int begTime, int endTime, String edgeID, double time)
vehID - id of the vehiclebegTime - begin timeendTime - end timeedgeID - edge idtime - timepublic static SumoCommand setColor(String vehID, SumoColor color)
vehID - id of the vehiclecolor - colorpublic static SumoCommand setDecel(String vehID, double decel)
vehID - id of the vehicledecel - decelerationpublic static SumoCommand setLaneChangeMode(String vehID, int lcm)
vehID - id of the vehiclelcm - lane change modelpublic static SumoCommand setRoute(String vehID, SumoStringList edgeList)
vehID - id of the vehicleedgeList - edges listpublic static SumoCommand setType(String vehID, String typeID)
vehID - id of the vehicletypeID - type idpublic static SumoCommand setEffort(String vehID, int begTime, int endTime, String edgeID, double effort)
vehID - id of the vehiclebegTime - begin timeendTime - end timeedgeID - edge ideffort - effortpublic static SumoCommand setEmissionClass(String vehID, String clazz)
vehID - id of the vehicleclazz - emission classpublic static SumoCommand setImperfection(String vehID, double imperfection)
vehID - vehicle idimperfection - imperfectionpublic static SumoCommand setLength(String vehID, double length)
vehID - vehicle idlength - lengthpublic static SumoCommand setMaxSpeed(String vehID, double speed)
vehID - vehicle idspeed - speedpublic static SumoCommand setMinGap(String vehID, double minGap)
vehID - vehicle idminGap - minimum gappublic static SumoCommand setRouteID(String vehID, String routeID)
vehID - vehicle idrouteID - route idpublic static SumoCommand setShapeClass(String vehID, String clazz)
vehID - vehicle idclazz - shape classpublic static SumoCommand setSignals(String vehID, String signals)
vehID - vehicle idsignals - signalspublic static SumoCommand setSpeed(String vehID, double speed)
vehID - vehicle idspeed - speedpublic static SumoCommand setSpeedDeviation(String vehID, double deviation)
vehID - vehicle iddeviation - deviationpublic static SumoCommand setSpeedFactor(String vehID, double factor)
vehID - vehicle idfactor - factorpublic static SumoCommand setSpeedMode(String vehID, int sm)
vehID - vehicle idsm - speed modepublic static SumoCommand setStop(String vehID, String edgeID, double pos, byte laneIndex, int duration, byte stopType)
vehID - vehicle idedgeID - edge idpos - positonlaneIndex - lane indexduration - durationstopType - stop typepublic static SumoCommand resume(String vehID)
vehID - vehicle idpublic static SumoCommand setTau(String vehID, double tau)
vehID - vehicle idtau - taupublic static SumoCommand setVehicleClass(String vehID, String clazz)
vehID - vehicle idclazz - vehicle classpublic static SumoCommand setWidth(String vehID, double width)
vehID - vehicle idwidth - width