Package de.tudresden.sumo.cmd
Class Vehicle
java.lang.Object
de.tudresden.sumo.cmd.Vehicle
The Class Vehicle.
- Author:
- Mario Krumnow, Evamarie Wiessner
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic SumoCommandAdd a new vehicle.static SumoCommandaddFull(String vehID, String routeID, String typeID, String depart, String departLane, String departPosition, String departSpeed, String arrivalLane, String arrivalPosition, String arrivalSpeed, String fromTAZ, String toTAZ, String line, int person_capacity, int person_number) Add a new vehicle.static SumoCommandchangeLane(String vehID, byte laneIndex, double 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 SumoCommandchangeSublane(String vehID, double latDist) Forces a lateral change by the given amount (negative values indicate changing to the right, positive to the left) This will override any other lane change motivations but conform to safety-constraints as configured by laneChangeMode.static SumoCommandchangeTarget(String vehID, String edgeID) The vehicle's destination edge is set to the given.static SumoCommandReturns the acceleration of the named vehicle within the last step.static SumoCommandgetAccumulatedWaitingTime(String vehID) Returns the vehicle class.static SumoCommandgetActionStepLength(String vehID) Returns the action step length for this vehicle.static SumoCommandgetAdaptedTraveltime(String vehID, double time, String edgeID) Returns the edge travel time for the given time as stored in the vehicle's internal container.static SumoCommandgetAllowedSpeed(String vehID) Returns the maximum allowed speed on the current lane regarding speed factor in m/s for this vehicle.static SumoCommandReturns the angle of the named vehicle within the last time step.static SumoCommandgetApparentDecel(String vehID) Returns the apparent deceleration in m/s^2 of this vehicle.static SumoCommandgetBestLanes(String vehID) getBestLanes.static SumoCommandgetCO2Emission(String vehID) Returns the CO2 emission in mg for the last time step.static SumoCommandgetCOEmission(String vehID) Returns the CO emission in mg for the last time step.static SumoCommandReturns the vehicle's color (RGBA).static SumoCommandReturns the deceleration of the named vehicle within the last time step.static SumoCommandgetDistance(String vehID) Get the distance to the starting point acts as a odometer.static SumoCommandgetDrivingDistance(String vehID, String edgeID, double pos, byte laneID) Returns the driving distance (in m) of the named vehicle within the last tine step.static SumoCommandgetDrivingDistance2D(String vehID, double x, double y) getDrivingDistance2D.static SumoCommandReturns the edge effort for the given time as stored in the vehicle's internal container.static SumoCommandgetElectricityConsumption(String vehID) Returns the electricity consumption in ml for the last time step.static SumoCommandgetEmergencyDecel(String vehID) Returns the maximal physically possible deceleration in m/s^2 of this vehicle.static SumoCommandgetEmissionClass(String vehID) Returns the emission class of the named vehicle.static SumoCommandgetFuelConsumption(String vehID) Returns the fuel consumption in ml for the last time step.static SumoCommandgetHCEmission(String vehID) Returns the HC emission (in mg) during the last time step.static SumoCommandReturns the height in m of this vehicle.static SumoCommandReturns the number of all vehicles in the network.static SumoCommandReturns a list of ids of all vehicles currently running within the scenario.static SumoCommandgetImperfection(String vehID) getImperfection.static SumoCommandgetLaneChangeMode(String vehID) Gets the vehicle's lane change mode as a bitset.static SumoCommandgetLaneChangeState(String vehID, int direction) Returns the maximal physically possible deceleration in m/s^2 of this vehicle.static SumoCommandReturns the id of the lane the named vehicle was at within the last step.static SumoCommandgetLaneIndex(String vehID) Returns the index of the lane the named vehicle was at within the last step.static SumoCommandgetLanePosition(String vehID) Returns the position of the vehicle along the lane (in m).static SumoCommandgetLastActionTime(String vehID) Returns the time of last action point for this vehicle.static SumoCommandgetLateralAlignment(String vehID) Returns The preferred lateral alignment of the vehicle.static SumoCommandgetLateralLanePosition(String vehID) Returns The lateral position of the vehicle on its current lane measured in m.static SumoCommandReturn the leading vehicle id together with the distance.static SumoCommandReturns the length (in m) of the named vehicle.static SumoCommandReturns the length (in m) of the named vehicle.static SumoCommandgetMaxSpeed(String vehID) Returns the maximum speed(in m/s) of the named vehicle.static SumoCommandgetMaxSpeedLat(String vehID) Returns the maximum lateral speed in m/s of this vehicle.static SumoCommandReturns the minimum gap (in m) between this vehicle and the vehicle before it.static SumoCommandgetMinGapLat(String vehID) Returns The desired lateral gap of this vehicle at 50km/h in m.static SumoCommandgetNextStops(String vehID) Return list of upcoming stops [(lane, endPos, stoppingPlaceID, stopFlags, duration, until), ...] where integer stopFlag is defined as: 1 * stopped + 2 * parking + 4 * personTriggered + 8 * containerTriggered + 16 * isBusStop + 32 * isContainerStop + 64 * chargingStation + 128 * parkingarea with each of these flags defined as 0 or 1.static SumoCommandgetNextTLS(String vehID) Return list of upcoming traffic lights [(tlsID, tlsIndex, distance, state), ...]static SumoCommandgetNoiseEmission(String vehID) Returns the noise emission (in db) generated by the vehicle during the last time step.static SumoCommandgetNOxEmission(String vehID) Returns the NOx emissions (in mg) generated by the vehicle during the last time step.static SumoCommandgetParameter(String vehID, String param) Returns the chosen parameter.static SumoCommandgetPersonIDList(String vehID) Returns the list of persons which includes those defined using attribute 'personNumber' as well as person-objects which are riding in this vehicle.static SumoCommandgetPersonNumber(String vehID) getPersonNumber.static SumoCommandgetPMxEmission(String vehID) Returns the particular matter emissions (in mg) generated by the vehicle during the last time step.static SumoCommandgetPosition(String vehID) Returns the position of the named vehicle within the last step [m,m].static SumoCommandgetPosition3D(String vehID) Returns the position of the named vehicle within the last step [m,m,m].static SumoCommandReturns the id of the edge the named vehicle was at within the last step.static SumoCommandReturns the ids of the edges the vehicle's route is made of.static SumoCommandgetRouteID(String vehID) Returns the id of the route of the named vehicle.static SumoCommandgetRouteIndex(String vehID) Returns the index of the current edge within the vehicles route or -1 if the vehicle has not yet departed.static SumoCommandgetRoutingMode(String vehID) returns the current routing mode: tc.ROUTING_MODE_DEFAULT : use weight storages and fall-back to edge speeds (default) tc.ROUTING_MODE_AGGREGATED : use global smoothed travel times from device.reroutingstatic SumoCommandgetShapeClass(String vehID) getShapeClass.static SumoCommandgetSignals(String vehID) getSignals.static SumoCommandgetSlope.static SumoCommandReturns the speed (in m/s) of the named vehicle within the last step.static SumoCommandgetSpeedDeviation(String vehID) Returns the standard deviation of the estimated maximum speed (see speed factor) divided by this speed.static SumoCommandgetSpeedFactor(String vehID) Returns the factor by which the driver multiplies the speed read from street signs to estimate "real" maximum allowed speed.static SumoCommandgetSpeedMode(String vehID) Returns the speed mode of a vehicle.static SumoCommandgetSpeedWithoutTraCI(String vehID) getSpeedWithoutTraCI.static SumoCommandgetStopState(String vehID) Returns information in regard to stopping: The returned integer is defined as 1 * stopped + 2 * parking + 4 * personTriggered + 8 * containerTriggered + 16 * isBusStop + 32 * isContainerStop with each of these flags defined as 0 or 1.static SumoCommandgetTau.static SumoCommandReturns the id of the type of the named vehicle.static SumoCommandgetVehicleClass(String vehID) Returns the vehicle class.static SumoCommandReturns the ids of via edges for this vehicle.static SumoCommandgetWaitingTime(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 SumoCommandReturns the vehicle's width (in m).static SumoCommandisAtBusStop(String vehID) isAtBusStop.static SumoCommandisAtContainerStop(String vehID) Return whether the vehicle is stopped at a container stop.static SumoCommandisRouteValid(String vehID) Returns whether the Route is valid.static SumoCommandisStopped.static SumoCommandisStoppedParking(String vehID) isStoppedParking.static SumoCommandisStoppedTriggered(String vehID) Return whether the vehicle is stopped and waiting for a person or container.static SumoCommandMoves the vehicle to a new position.static SumoCommandPlace vehicle at the given x,y coordinates and force it's angle to the given value (for drawing).static SumoCommandRemoves vehicle with the given ID for the given reason.static SumoCommandrerouteEffort(String vehID) Computes a new route using the vehicle's internal and the global edge effort information.static SumoCommandrerouteParkingArea(String vehID, String parkingAreaID) Changes the next parking area in parkingAreaID, updates the vehicle route, and preserve consistency in case of passengers/containers on board.static SumoCommandrerouteTraveltime(String vehID) Computes a new route using the vehicle's internal and the global edge travel time information.static SumoCommandContinue after a stop.static SumoCommandSets the acceleration of the named vehicle.static SumoCommandsetActionStepLength(String vehID, double actionStepLength, boolean resetActionOffset) Sets the action step length for this vehicle.static SumoCommandsetAdaptedTraveltime(String vehID, double begTime, double endTime, String edgeID, double time) Sets the edge travel time of the named vehicle.static SumoCommandsetApparentDecel(String vehID, double decel) Sets the apparent deceleration in m/s^2 for this vehicle.static SumoCommandsetBusStop(String vehID, String stopID, double duration, double until) Adds or modifies a bus stop with the given parameters.static SumoCommandsetChargingStationStop(String vehID, String stopID, double duration, double until) Adds or modifies a stop at a chargingStation with the given parameters.static SumoCommandSets the vehicle's color (RGBA).static SumoCommandsetContainerStop(String vehID, String stopID, double duration, double until) Adds or modifies a container stop with the given parameters.static SumoCommandSets the deceleration of the named vehicle.static SumoCommandSets the edge effort for the given time as stored in the vehicle's internal container.static SumoCommandsetEmergencyDecel(String vehID, double decel) Sets the maximal physically possible deceleration in m/s^2 for this vehicle.static SumoCommandsetEmissionClass(String vehID, String clazz) Sets the emission class of the named vehicle.static SumoCommandSets the height in m for this vehicle.static SumoCommandsetImperfection(String vehID, double imperfection) setImperfection.static SumoCommandsetLaneChangeMode(String vehID, int lcm) Sets the vehicle's lane change mode as a bitset.static SumoCommandsetLateralAlignment(String vehID, String align) Sets the preferred lateral alignment for this vehicle.static SumoCommandSets the length (in m) of the named vehicle.static SumoCommandSets the line information for this vehicle.static SumoCommandsetMaxSpeed(String vehID, double speed) Sets the maximum speed (in m/s) of the named vehicle.static SumoCommandsetMaxSpeedLat(String vehID, double speed) Sets the maximum lateral speed in m/s for this vehicle.static SumoCommandSets the minimum gap (in m) between this vehicle and the vehicle before it.static SumoCommandsetMinGapLat(String vehID, double minGapLat) Sets the minimum lateral gap of the vehicle at 50km/h in m.static SumoCommandsetParameter(String vehID, String param, String value) Sets the chosen parameter.static SumoCommandsetParkingAreaStop(String vehID, String stopID, double duration, double until) Adds or modifies a stop at a parkingArea with the given parameters.static SumoCommandsetRoute(String vehID, SumoStringList edgeList) Sets the IDs of the edges the vehicle's route is made of.static SumoCommandsetRouteID(String vehID, String routeID) Sets the id of the route of the named vehicle.static SumoCommandsetRoutingMode(String vehID, int routingMode) sets the current routing mode: tc.ROUTING_MODE_DEFAULT : use weight storages and fall-back to edge speeds (default) tc.ROUTING_MODE_AGGREGATED : use global smoothed travel times from device.reroutingstatic SumoCommandsetShapeClass(String vehID, String clazz) setShapeClass.static SumoCommandsetSignals(String vehID, int signals) setSignals.static SumoCommandSets the speed (in m/s) of the named vehicle.static SumoCommandsetSpeedDeviation(String vehID, double deviation) Sets the standard deviation of the estimated maximum speed.static SumoCommandsetSpeedFactor(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 SumoCommandsetSpeedMode(String vehID, int sm) Sets the vehicle's speed mode as a bitset.static SumoCommandsetStop(String vehID, String edgeID, double pos, byte laneIndex, double duration, SumoStopFlags sf, double startPos, double until) Lets the vehicle stop at the given edge, at the given position and lane.static SumoCommandsetTau.static SumoCommandSets the id of the type for the named vehicle.static SumoCommandsetVehicleClass(String vehID, String clazz) Sets the vehicle class.static SumoCommandsetVia(String vehID, SumoStringList edgeList) Sets the line information for this vehicle.static SumoCommandSets the vehicle's width (in m).static SumoCommandReduces the speed to the given for the given amount of time.static SumoCommandupdateBestLanes(String vehID) Inserts the information about the travel time of edge "edgeID" valid from begin time to end time into the vehicle's internal edge weights container.
- 
Constructor Details- 
Vehiclepublic Vehicle()
 
- 
- 
Method Details- 
getAccelReturns the acceleration of the named vehicle within the last step.- Parameters:
- vehID- id of the vehicle
- Returns:
- acceleration
 
- 
getActionStepLengthReturns the action step length for this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- action step length for this vehicle
 
- 
getIDCountReturns the number of all vehicles in the network.- Returns:
- current number of vehicles in the network
 
- 
getAdaptedTraveltimeReturns the edge travel time for the given time as stored in the vehicle's internal container.- Parameters:
- vehID- id of the vehicle
- time- time
- edgeID- id of the edge
- Returns:
- SumoCommand
 
- 
getAngleReturns the angle of the named vehicle within the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- angle
 
- 
getApparentDecelReturns the apparent deceleration in m/s^2 of this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- angle
 
- 
getMaxSpeedLatReturns the maximum lateral speed in m/s of this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- angle
 
- 
getMinGapLatReturns The desired lateral gap of this vehicle at 50km/h in m.- Parameters:
- vehID- id of the vehicle
- Returns:
- angle
 
- 
getAllowedSpeedReturns the maximum allowed speed on the current lane regarding speed factor in m/s for this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- allowed speed
 
- 
getHeightReturns the height in m of this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- height in m
 
- 
getLateralLanePositionReturns The lateral position of the vehicle on its current lane measured in m.- Parameters:
- vehID- id of the vehicle
- Returns:
- the leading vehicle
 
- 
getLaneChangeStateReturns the maximal physically possible deceleration in m/s^2 of this vehicle.- Parameters:
- vehID- id of the vehicle
- direction- direction
- Returns:
- SumoCommand
 
- 
getEmergencyDecelReturns the maximal physically possible deceleration in m/s^2 of this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- SumoCommand
 
- 
getLastActionTimeReturns the time of last action point for this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- time of last action point for this vehicle.
 
- 
getLateralAlignmentReturns The preferred lateral alignment of the vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- the leading vehicle
 
- 
getLaneChangeModeGets the vehicle's lane change mode as a bitset.- Parameters:
- vehID- id of the vehicle
- Returns:
- vehicle's lane change mode as a bitset.
 
- 
getLeaderReturn the leading vehicle id together with the distance. The dist parameter defines the maximum lookahead, 0 calculates a lookahead from the brake gap.- Parameters:
- vehID- id of the vehicle
- dist- distance
- Returns:
- the leading vehicle
 
- 
getPersonNumbergetPersonNumber.- Parameters:
- vehID- id of the vehicle
- Returns:
- person number
 
- 
getBestLanesgetBestLanes.- Parameters:
- vehID- id of the vehicle
- Returns:
- list of the best lanes
 
- 
getCO2EmissionReturns the CO2 emission in mg for the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- value for co2
 
- 
getCOEmissionReturns the CO emission in mg for the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- value for co2
 
- 
getColorReturns the vehicle's color (RGBA).- Parameters:
- vehID- id of the vehicle
- Returns:
- color
 
- 
getDecelReturns the deceleration of the named vehicle within the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- deceleration
 
- 
getDrivingDistanceReturns the driving distance (in m) of the named vehicle within the last tine step.- Parameters:
- vehID- id
- edgeID- edge id
- pos- pos
- laneID- lane id
- Returns:
- the distance
 
- 
getDrivingDistance2DgetDrivingDistance2D.- Parameters:
- vehID- id of the vehicle
- x- x
- y- y
- Returns:
- the distance
 
- 
getDistanceGet the distance to the starting point acts as a odometer.- Parameters:
- vehID- id of the vehicle
- Returns:
- the current distance of the vehicle (odometer)
 
- 
getEffortReturns the edge effort for the given time as stored in the vehicle's internal container.- Parameters:
- vehID- id of the vehicle
- time- time
- edgeID- edge id
- Returns:
- the effort
 
- 
getEmissionClassReturns the emission class of the named vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- emission class
 
- 
getElectricityConsumptionReturns the electricity consumption in ml for the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- energy consumption
 
- 
getFuelConsumptionReturns the fuel consumption in ml for the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- fuel consumption
 
- 
getHCEmissionReturns the HC emission (in mg) during the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- value for hc
 
- 
getIDListReturns a list of ids of all vehicles currently running within the scenario.- Returns:
- list of vehicles
 
- 
getImperfectiongetImperfection.- Parameters:
- vehID- id of the vehicle
- Returns:
- value for imperfection
 
- 
getLaneIDReturns the id of the lane the named vehicle was at within the last step.- Parameters:
- vehID- id of the vehicle
- Returns:
- lane id
 
- 
getLaneIndexReturns the index of the lane the named vehicle was at within the last step.- Parameters:
- vehID- id of the vehicle
- Returns:
- lane index
 
- 
getLanePositionReturns the position of the vehicle along the lane (in m).- Parameters:
- vehID- id of the vehicle
- Returns:
- lane position
 
- 
getLengthReturns the length (in m) of the named vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- length
 
- 
getLineReturns the length (in m) of the named vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- length
 
- 
getMaxSpeedReturns the maximum speed(in m/s) of the named vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- max speed
 
- 
getMinGapReturns the minimum gap (in m) between this vehicle and the vehicle before it.- Parameters:
- vehID- id of the vehicle
- Returns:
- min gap
 
- 
getNextTLSReturn list of upcoming traffic lights [(tlsID, tlsIndex, distance, state), ...]- Parameters:
- vehID- id of the vehicle
- Returns:
- next traffic lights (compound)
 
- 
getNextStopsReturn list of upcoming stops [(lane, endPos, stoppingPlaceID, stopFlags, duration, until), ...] where integer stopFlag is defined as: 1 * stopped + 2 * parking + 4 * personTriggered + 8 * containerTriggered + 16 * isBusStop + 32 * isContainerStop + 64 * chargingStation + 128 * parkingarea with each of these flags defined as 0 or 1.- Parameters:
- vehID- id of the vehicle
- Returns:
- next traffic lights (compound)
 
- 
getNOxEmissionReturns the NOx emissions (in mg) generated by the vehicle during the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- value for nox
 
- 
getNoiseEmissionReturns the noise emission (in db) generated by the vehicle during the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- value for noise emission
 
- 
getParameterReturns the chosen parameter.- Parameters:
- vehID- a string identifying the vehicle
- param- a string identifying the parameter
- Returns:
- SumoCommand (String)
 
- 
setParameterSets the chosen parameter.- Parameters:
- vehID- a string identifying the vehicle
- param- a string identifying the parameter
- value- a string identifying the new value
- Returns:
- SumoCommand
 
- 
getPMxEmissionReturns the particular matter emissions (in mg) generated by the vehicle during the last time step.- Parameters:
- vehID- id of the vehicle
- Returns:
- value for pmx
 
- 
getPositionReturns the position of the named vehicle within the last step [m,m].- Parameters:
- vehID- id of the vehicle
- Returns:
- position 2D
 
- 
getPosition3DReturns the position of the named vehicle within the last step [m,m,m].- Parameters:
- vehID- id of the vehicle
- Returns:
- position 3D
 
- 
getRoadIDReturns the id of the edge the named vehicle was at within the last step.- Parameters:
- vehID- id of the vehicle
- Returns:
- road id
 
- 
getRouteReturns the ids of the edges the vehicle's route is made of.- Parameters:
- vehID- id of the vehicle
- Returns:
- route
 
- 
getRouteIDReturns the id of the route of the named vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- route id
 
- 
getRouteIndexReturns the index of the current edge within the vehicles route or -1 if the vehicle has not yet departed.- Parameters:
- vehID- id of the vehicle
- Returns:
- route index
 
- 
getRoutingModereturns the current routing mode: tc.ROUTING_MODE_DEFAULT : use weight storages and fall-back to edge speeds (default) tc.ROUTING_MODE_AGGREGATED : use global smoothed travel times from device.rerouting- Parameters:
- vehID- id of the vehicle
- Returns:
- current routing mode
 
- 
getShapeClassgetShapeClass.- Parameters:
- vehID- id of the vehicle
- Returns:
- shape class
 
- 
getSignalsgetSignals.- Parameters:
- vehID- id of the vehicle
- Returns:
- the signal state of the vehicle
 
- 
getSlopegetSlope.- Parameters:
- vehID- id of the vehicle
- Returns:
- the slope at the current position of the vehicle in degrees
 
- 
getSpeedReturns the speed (in m/s) of the named vehicle within the last step.- Parameters:
- vehID- id of the vehicle
- Returns:
- speed in m/s
 
- 
getSpeedDeviationReturns the standard deviation of the estimated maximum speed (see speed factor) divided by this speed.- Parameters:
- vehID- id of the vehicle
- Returns:
- speed deviation
 
- 
getSpeedFactorReturns the factor by which the driver multiplies the speed read from street signs to estimate "real" maximum allowed speed.- Parameters:
- vehID- id of the vehicle
- Returns:
- speed factor
 
- 
getSpeedModeReturns the speed mode of a vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- speed mode
 
- 
getSpeedWithoutTraCIgetSpeedWithoutTraCI.- Parameters:
- vehID- id of the vehicle
- Returns:
- speed in m/s
 
- 
getStopStateReturns information in regard to stopping: The returned integer is defined as 1 * stopped + 2 * parking + 4 * personTriggered + 8 * containerTriggered + 16 * isBusStop + 32 * isContainerStop with each of these flags defined as 0 or 1.- Parameters:
- vehID- id of the vehicle
- Returns:
- speed in m/s
 
- 
getTaugetTau.- Parameters:
- vehID- id of the vehicle
- Returns:
- tau
 
- 
getViaReturns the ids of via edges for this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- ids of via edges for this vehicle
 
- 
getWaitingTimeThe 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. (basically, the waiting time of a vehicle is reset to 0 every time it moves).- Parameters:
- vehID- id of the vehicle
- Returns:
- waiting time
 
- 
getTypeIDReturns the id of the type of the named vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- type id
 
- 
getPersonIDListReturns the list of persons which includes those defined using attribute 'personNumber' as well as person-objects which are riding in this vehicle.- Parameters:
- vehID- id of the vehicle
- Returns:
- vehicle class
 
- 
getVehicleClassReturns the vehicle class.- Parameters:
- vehID- id of the vehicle
- Returns:
- vehicle class
 
- 
getAccumulatedWaitingTimeReturns the vehicle class.- Parameters:
- vehID- id of the vehicle
- Returns:
- vehicle class
 
- 
getWidthReturns the vehicle's width (in m).- Parameters:
- vehID- id of the vehicle
- Returns:
- width
 
- 
isStoppedisStopped.- Parameters:
- vehID- id of the vehicle
- Returns:
- stop
 
- 
isStoppedTriggeredReturn whether the vehicle is stopped and waiting for a person or container.- Parameters:
- vehID- id of the vehicle
- Returns:
- stop
 
- 
isAtContainerStopReturn whether the vehicle is stopped at a container stop.- Parameters:
- vehID- id of the vehicle
- Returns:
- stop
 
- 
isStoppedParkingisStoppedParking.- Parameters:
- vehID- id of the vehicle
- Returns:
- stop
 
- 
isAtBusStopisAtBusStop.- Parameters:
- vehID- id of the vehicle
- Returns:
- stop
 
- 
isRouteValidReturns whether the Route is valid.- Parameters:
- vehID- id of the vehicle
- Returns:
- route valid
 
- 
slowDownReduces the speed to the given for the given amount of time.- Parameters:
- vehID- id of the vehicle
- speed- speed
- duration- duration
- Returns:
- SumoCommand
 
- 
addpublic static SumoCommand add(String vehID, String typeID, String routeID, int depart, double pos, double speed, byte lane) Add a new vehicle.- Parameters:
- vehID- vehicle id
- typeID- type id
- routeID- route id
- depart- depart
- pos- position
- speed- speed
- lane- lane
- Returns:
- SumoCommand
 
- 
addFullpublic static SumoCommand addFull(String vehID, String routeID, String typeID, String depart, String departLane, String departPosition, String departSpeed, String arrivalLane, String arrivalPosition, String arrivalSpeed, String fromTAZ, String toTAZ, String line, int person_capacity, int person_number) Add a new vehicle.- Parameters:
- vehID- the veh ID
- routeID- the route ID
- typeID- the type ID
- depart- the depart
- departLane- the depart lane
- departPosition- the depart position
- departSpeed- the depart speed
- arrivalLane- the arrival lane
- arrivalPosition- the arrival position
- arrivalSpeed- the arrival speed
- fromTAZ- the from TAZ
- toTAZ- the to TAZ
- line- the line
- person_capacity- the person capacity
- person_number- the person number
- Returns:
- SumoCommand
 
- 
changeLaneForces a lane change to the lane with the given index; if successful, the lane will be chosen for the given amount of time.- Parameters:
- vehID- vehicle id
- laneIndex- lane index
- duration- duration
- Returns:
- SumoCommand
 
- 
changeTargetThe vehicle's destination edge is set to the given. The route is rebuilt.- Parameters:
- vehID- vehicle id
- edgeID- edge id
- Returns:
- SumoCommand
 
- 
changeSublaneForces a lateral change by the given amount (negative values indicate changing to the right, positive to the left) This will override any other lane change motivations but conform to safety-constraints as configured by laneChangeMode.- Parameters:
- vehID- vehicle id
- latDist- latDist
- Returns:
- SumoCommand
 
- 
moveToMoves the vehicle to a new position.- Parameters:
- vehID- vehicle id
- laneID- lane id
- pos- position
- Returns:
- SumoCommand
 
- 
moveToXYpublic static SumoCommand moveToXY(String vehID, String edgeID, int lane, double x, double y, double angle, byte keepRoute) Place vehicle at the given x,y coordinates and force it's angle to the given value (for drawing). If keepRoute is set to 1, the closest position within the existing route is taken. If keepRoute is set to 0, the vehicle may move to any edge in the network but it's route then only consists of that edge. If keepRoute is set to 2 the vehicle has all the freedom of keepRoute=1 but in addition to that may even move outside the road network. edgeID and lane are optional placement hints to resolve ambiguities- Parameters:
- vehID- vehicle id
- edgeID- edge id
- lane- lane
- x- x
- y- y
- angle- angle
- keepRoute- the keep route
- Returns:
- SumoCommand
 
- 
removeRemoves vehicle with the given ID for the given reason. Reasons are defined in module constants and start with REMOVE_- Parameters:
- vehID- vehicle id
- reason- reason
- Returns:
- SumoCommand
 
- 
rerouteEffortComputes a new route using the vehicle's internal and the global edge effort information.- Parameters:
- vehID- id of the vehicle
- Returns:
- SumoCommand
 
- 
rerouteTraveltimeComputes a new route using the vehicle's internal and the global edge travel time information.- Parameters:
- vehID- id of the vehicle
- Returns:
- SumoCommand
 
- 
setAccelSets the acceleration of the named vehicle.- Parameters:
- vehID- id of the vehicle
- accel- acceleration
- Returns:
- SumoCommand
 
- 
setAdaptedTraveltimepublic static SumoCommand setAdaptedTraveltime(String vehID, double begTime, double endTime, String edgeID, double time) Sets the edge travel time of the named vehicle.- Parameters:
- vehID- id of the vehicle
- begTime- begin time
- endTime- end time
- edgeID- edge id
- time- time
- Returns:
- SumoCommand
 
- 
setLateralAlignmentSets the preferred lateral alignment for this vehicle.- Parameters:
- vehID- id of the vehicle
- align- align
- Returns:
- SumoCommand
 
- 
setApparentDecelSets the apparent deceleration in m/s^2 for this vehicle.- Parameters:
- vehID- id of the vehicle
- decel- decel
- Returns:
- SumoCommand
 
- 
setMinGapLatSets the minimum lateral gap of the vehicle at 50km/h in m.- Parameters:
- vehID- id of the vehicle
- minGapLat- minGapLat
- Returns:
- SumoCommand
 
- 
setColorSets the vehicle's color (RGBA).- Parameters:
- vehID- id of the vehicle
- color- color
- Returns:
- SumoCommand
 
- 
setDecelSets the deceleration of the named vehicle.- Parameters:
- vehID- id of the vehicle
- decel- deceleration
- Returns:
- SumoCommand
 
- 
setHeightSets the height in m for this vehicle.- Parameters:
- vehID- id of the vehicle
- height- in m
- Returns:
- SumoCommand
 
- 
setLaneChangeModeSets the vehicle's lane change mode as a bitset.- Parameters:
- vehID- id of the vehicle
- lcm- lane change model
- Returns:
- SumoCommand
 
- 
setEmergencyDecelSets the maximal physically possible deceleration in m/s^2 for this vehicle.- Parameters:
- vehID- id of the vehicle
- decel- decel
- Returns:
- SumoCommand
 
- 
setRouteSets the IDs of the edges the vehicle's route is made of.- Parameters:
- vehID- id of the vehicle
- edgeList- edges list
- Returns:
- SumoCommand
 
- 
setRoutingModesets the current routing mode: tc.ROUTING_MODE_DEFAULT : use weight storages and fall-back to edge speeds (default) tc.ROUTING_MODE_AGGREGATED : use global smoothed travel times from device.rerouting- Parameters:
- vehID- id of the vehicle
- routingMode- routingMode
- Returns:
- SumoCommand
 
- 
setTypeSets the id of the type for the named vehicle.- Parameters:
- vehID- id of the vehicle
- typeID- type id
- Returns:
- SumoCommand
 
- 
setEffortpublic 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.- Parameters:
- vehID- id of the vehicle
- begTime- begin time
- endTime- end time
- edgeID- edge id
- effort- effort
- Returns:
- SumoCommand
 
- 
setEmissionClassSets the emission class of the named vehicle.- Parameters:
- vehID- id of the vehicle
- clazz- emission class
- Returns:
- SumoCommand
 
- 
setImperfectionsetImperfection.- Parameters:
- vehID- vehicle id
- imperfection- imperfection
- Returns:
- SumoCommand
 
- 
setLengthSets the length (in m) of the named vehicle.- Parameters:
- vehID- vehicle id
- length- length
- Returns:
- SumoCommand
 
- 
setActionStepLengthpublic static SumoCommand setActionStepLength(String vehID, double actionStepLength, boolean resetActionOffset) Sets the action step length for this vehicle. If resetActionOffset == True (default), the next action point is scheduled immediately. if If resetActionOffset == False, the interval between the last and the next action point is updated to match the given value, or if the latter is smaller than the time since the last action point, the next action follows immediately.- Parameters:
- vehID- vehicle id
- actionStepLength- actionStepLength
- resetActionOffset- resetActionOffset
- Returns:
- SumoCommand
 
- 
setLineSets the line information for this vehicle.- Parameters:
- vehID- vehicle id
- line- line
- Returns:
- SumoCommand
 
- 
setViaSets the line information for this vehicle. changes the via edges to the given edges list (to be used during subsequent rerouting calls). Note: a single edgeId as argument is allowed as shorthand for a list of length 1- Parameters:
- vehID- vehicle id
- edgeList- edges
- Returns:
- SumoCommand
 
- 
setMaxSpeedSets the maximum speed (in m/s) of the named vehicle.- Parameters:
- vehID- vehicle id
- speed- speed
- Returns:
- SumoCommand
 
- 
setMaxSpeedLatSets the maximum lateral speed in m/s for this vehicle.- Parameters:
- vehID- vehicle id
- speed- speed
- Returns:
- SumoCommand
 
- 
setMinGapSets the minimum gap (in m) between this vehicle and the vehicle before it.- Parameters:
- vehID- vehicle id
- minGap- minimum gap
- Returns:
- SumoCommand
 
- 
setRouteIDSets the id of the route of the named vehicle.- Parameters:
- vehID- vehicle id
- routeID- route id
- Returns:
- SumoCommand
 
- 
setShapeClasssetShapeClass.- Parameters:
- vehID- vehicle id
- clazz- shape class
- Returns:
- SumoCommand
 
- 
setSignalssetSignals.- Parameters:
- vehID- vehicle id
- signals- signals
- Returns:
- SumoCommand
 
- 
setSpeedSets the speed (in m/s) of the named vehicle.- Parameters:
- vehID- vehicle id
- speed- speed
- Returns:
- SumoCommand
 
- 
setSpeedDeviationSets the standard deviation of the estimated maximum speed.- Parameters:
- vehID- vehicle id
- deviation- deviation
- Returns:
- SumoCommand
 
- 
setSpeedFactorSets the factor by which the driver multiplies the speed read from street signs to estimate "real" maximum allowed speed.- Parameters:
- vehID- vehicle id
- factor- factor
- Returns:
- SumoCommand
 
- 
setSpeedModeSets the vehicle's speed mode as a bitset.- Parameters:
- vehID- vehicle id
- sm- speed mode
- Returns:
- SumoCommand
 
- 
setStoppublic static SumoCommand setStop(String vehID, String edgeID, double pos, byte laneIndex, double duration, SumoStopFlags sf, double startPos, double until) Lets the vehicle stop at the given edge, at the given position and lane. The vehicle will stop for the given duration. Re-issuing a stop command with the same lane and position allows changing the duration.- Parameters:
- vehID- vehicle id
- edgeID- edge id
- pos- positon
- laneIndex- lane index
- duration- duration
- sf- stop flags
- startPos- the start pos
- until- the until
- Returns:
- SumoCommand
 
- 
setChargingStationStoppublic static SumoCommand setChargingStationStop(String vehID, String stopID, double duration, double until) Adds or modifies a stop at a chargingStation with the given parameters. The duration and the until attribute are in seconds.- Parameters:
- vehID- the veh ID
- stopID- the stop ID
- duration- the duration
- until- the until
- Returns:
- SumoCommand
 
- 
setBusStopAdds or modifies a bus stop with the given parameters. The duration and the until attribute are in seconds.- Parameters:
- vehID- id of the vehicle
- stopID- the stop ID
- duration- the duration
- until- the until
- Returns:
- SumoCommand
 
- 
setContainerStoppublic static SumoCommand setContainerStop(String vehID, String stopID, double duration, double until) Adds or modifies a container stop with the given parameters. The duration and the until attribute are in seconds.- Parameters:
- vehID- id of the vehicle
- stopID- the stop ID
- duration- the duration
- until- the until
- Returns:
- SumoCommand
 
- 
setParkingAreaStoppublic static SumoCommand setParkingAreaStop(String vehID, String stopID, double duration, double until) Adds or modifies a stop at a parkingArea with the given parameters. The duration and the until attribute are in seconds.- Parameters:
- vehID- vehicle id
- stopID- stopID
- duration- duration
- until- the until
- Returns:
- SumoCommand
 
- 
resumeContinue after a stop.- Parameters:
- vehID- vehicle id
- Returns:
- SumoCommand
 
- 
setTausetTau.- Parameters:
- vehID- vehicle id
- tau- tau
- Returns:
- SumoCommand
 
- 
setVehicleClassSets the vehicle class.- Parameters:
- vehID- vehicle id
- clazz- vehicle class
- Returns:
- SumoCommand
 
- 
setWidthSets the vehicle's width (in m).- Parameters:
- vehID- vehicle id
- width- width
- Returns:
- SumoCommand
 
- 
updateBestLanesInserts the information about the travel time of edge "edgeID" valid from begin time to end time into the vehicle's internal edge weights container. If the time is not specified, any previously set values for that edge are removed. If begTime or endTime are not specified the value is set for the whole simulation duration.- Parameters:
- vehID- vehicle id
- Returns:
- SumoCommand
 
- 
rerouteParkingAreaChanges the next parking area in parkingAreaID, updates the vehicle route, and preserve consistency in case of passengers/containers on board.- Parameters:
- vehID- vehicle id
- parkingAreaID- parkingAreaID
- Returns:
- SumoCommand
 
 
-