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)
public static SumoCommand getIDCount()
public static SumoCommand getAdaptedTraveltime(String vehID, int time, String edgeID)
public static SumoCommand getAngle(String vehID)
public static SumoCommand getAllowedSpeed(String vehID)
public static SumoCommand getLeader(String vehID, double dist)
public static SumoCommand getPersonNumber(String vehID)
public static SumoCommand getBestLanes(String vehID)
public static SumoCommand getCO2Emission(String vehID)
public static SumoCommand getCOEmission(String vehID)
public static SumoCommand getColor(String vehID)
public static SumoCommand getDecel(String vehID)
public static SumoCommand getDrivingDistance(String vehID, String edgeID, double pos, int laneID)
public static SumoCommand getDrivingDistance2D(String vehID, double x, double y)
public static SumoCommand getDistance(String vehID)
public static SumoCommand getEffort(String vehID, int time, String edgeID)
public static SumoCommand getEmissionClass(String vehID)
public static SumoCommand getFuelConsumption(String vehID)
public static SumoCommand getHCEmission(String vehID)
public static SumoCommand getIDList()
public static SumoCommand getImperfection(String vehID)
public static SumoCommand getLaneID(String vehID)
public static SumoCommand getLaneIndex(String vehID)
public static SumoCommand getLanePosition(String vehID)
public static SumoCommand getLength(String vehID)
public static SumoCommand getMaxSpeed(String vehID)
public static SumoCommand getMinGap(String vehID)
public static SumoCommand getNOxEmission(String vehID)
public static SumoCommand getNoiseEmission(String vehID)
public static SumoCommand getPMxEmission(String vehID)
public static SumoCommand getPosition(String vehID)
public static SumoCommand getPosition3D(String vehID)
public static SumoCommand getRoadID(String vehID)
public static SumoCommand getRoute(String vehID)
public static SumoCommand getRouteID(String vehID)
public static SumoCommand getShapeClass(String vehID)
public static SumoCommand getSignals(String vehID)
public static SumoCommand getSpeed(String vehID)
public static SumoCommand getSpeedDeviation(String vehID)
public static SumoCommand getSpeedFactor(String vehID)
public static SumoCommand getSpeedWithoutTraCI(String vehID)
public static SumoCommand getTau(String vehID)
public static SumoCommand getWaitingTime(String vehID)
public static SumoCommand getTypeID(String vehID)
public static SumoCommand getVehicleClass(String vehID)
public static SumoCommand getWidth(String vehID)
public static SumoCommand isRouteValid(String vehID)
public static SumoCommand slowDown(String vehID, double speed, int duration)
public static SumoCommand add(String vehID, String typeID, String routeID, int depart, double pos, double speed, byte lane)
public static SumoCommand changeLane(String vehID, byte laneIndex, int duration)
public static SumoCommand changeTarget(String vehID, String edgeID)
public static SumoCommand moveTo(String vehID, String laneID, double pos)
public static SumoCommand moveToVTD(String vehID, String edgeID, int lane, double x, double y)
public static SumoCommand remove(String vehID, byte reason)
public static SumoCommand rerouteEffort(String vehID)
public static SumoCommand rerouteTraveltime(String vehID)
public static SumoCommand setAccel(String vehID, double accel)
public static SumoCommand setAdaptedTraveltime(String vehID, int begTime, int endTime, String edgeID, double time)
public static SumoCommand setColor(String vehID, SumoColor color)
public static SumoCommand setDecel(String vehID, double decel)
public static SumoCommand setLaneChangeMode(String vehID, int lcm)
public static SumoCommand setRoute(String vehID, SumoStringList edgeList)
public static SumoCommand setType(String vehID, String typeID)
public static SumoCommand setEffort(String vehID, int begTime, int endTime, String edgeID, double effort)
public static SumoCommand setEmissionClass(String vehID, String clazz)
public static SumoCommand setImperfection(String vehID, double imperfection)
public static SumoCommand setLength(String vehID, double length)
public static SumoCommand setMaxSpeed(String vehID, double speed)
public static SumoCommand setMinGap(String vehID, double minGap)
public static SumoCommand setRouteID(String vehID, String routeID)
public static SumoCommand setShapeClass(String vehID, String clazz)
public static SumoCommand setSignals(String vehID, String signals)
public static SumoCommand setSpeed(String vehID, double speed)
public static SumoCommand setSpeedDeviation(String vehID, double deviation)
public static SumoCommand setSpeedFactor(String vehID, double factor)
public static SumoCommand setspeedMode(String vehID, int sm)
public static SumoCommand setStop(String vehID, String edgeID, double pos, byte laneIndex, int duration, byte stopType)
public static SumoCommand Resume(String vehID)
public static SumoCommand setTau(String vehID, double tau)
public static SumoCommand setVehicleClass(String vehID, String clazz)
public static SumoCommand setWidth(String vehID, double width)