Class Vehicle

java.lang.Object
de.tudresden.sumo.cmd.Vehicle

public class Vehicle extends Object
The Class Vehicle.
Author:
Mario Krumnow, Evamarie Wiessner
  • Constructor Details Link icon

    • Vehicle Link icon

      public Vehicle()
  • Method Details Link icon

    • getAccel Link icon

      public static SumoCommand getAccel(String vehID)
      Returns the acceleration of the named vehicle within the last step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      acceleration
    • getActionStepLength Link icon

      public static SumoCommand getActionStepLength(String vehID)
      Returns the action step length for this vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      action step length for this vehicle
    • getIDCount Link icon

      public static SumoCommand getIDCount()
      Returns the number of all vehicles in the network.
      Returns:
      current number of vehicles in the network
    • getAdaptedTraveltime Link icon

      public static SumoCommand getAdaptedTraveltime(String vehID, double time, String edgeID)
      Returns 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
    • getAngle Link icon

      public static SumoCommand getAngle(String vehID)
      Returns the angle of the named vehicle within the last time step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      angle
    • getApparentDecel Link icon

      public static SumoCommand getApparentDecel(String vehID)
      Returns the apparent deceleration in m/s^2 of this vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      angle
    • getMaxSpeedLat Link icon

      public static SumoCommand getMaxSpeedLat(String vehID)
      Returns the maximum lateral speed in m/s of this vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      angle
    • getMinGapLat Link icon

      public static SumoCommand getMinGapLat(String vehID)
      Returns The desired lateral gap of this vehicle at 50km/h in m.
      Parameters:
      vehID - id of the vehicle
      Returns:
      angle
    • getAllowedSpeed Link icon

      public static SumoCommand getAllowedSpeed(String vehID)
      Returns 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
    • getHeight Link icon

      public static SumoCommand getHeight(String vehID)
      Returns the height in m of this vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      height in m
    • getLateralLanePosition Link icon

      public static SumoCommand getLateralLanePosition(String vehID)
      Returns The lateral position of the vehicle on its current lane measured in m.
      Parameters:
      vehID - id of the vehicle
      Returns:
      the leading vehicle
    • getLaneChangeState Link icon

      public static SumoCommand getLaneChangeState(String vehID, int direction)
      Returns the maximal physically possible deceleration in m/s^2 of this vehicle.
      Parameters:
      vehID - id of the vehicle
      direction - direction
      Returns:
      SumoCommand
    • getEmergencyDecel Link icon

      public static SumoCommand getEmergencyDecel(String vehID)
      Returns the maximal physically possible deceleration in m/s^2 of this vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      SumoCommand
    • getLastActionTime Link icon

      public static SumoCommand getLastActionTime(String vehID)
      Returns the time of last action point for this vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      time of last action point for this vehicle.
    • getLateralAlignment Link icon

      public static SumoCommand getLateralAlignment(String vehID)
      Returns The preferred lateral alignment of the vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      the leading vehicle
    • getLaneChangeMode Link icon

      public static SumoCommand getLaneChangeMode(String vehID)
      Gets the vehicle's lane change mode as a bitset.
      Parameters:
      vehID - id of the vehicle
      Returns:
      vehicle's lane change mode as a bitset.
    • getLeader Link icon

      public static SumoCommand getLeader(String vehID, double dist)
      Return 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
    • getPersonNumber Link icon

      public static SumoCommand getPersonNumber(String vehID)
      getPersonNumber.
      Parameters:
      vehID - id of the vehicle
      Returns:
      person number
    • getBestLanes Link icon

      public static SumoCommand getBestLanes(String vehID)
      getBestLanes.
      Parameters:
      vehID - id of the vehicle
      Returns:
      list of the best lanes
    • getCO2Emission Link icon

      public static SumoCommand getCO2Emission(String vehID)
      Returns the CO2 emission in mg for the last time step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      value for co2
    • getCOEmission Link icon

      public static SumoCommand getCOEmission(String vehID)
      Returns the CO emission in mg for the last time step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      value for co2
    • getColor Link icon

      public static SumoCommand getColor(String vehID)
      Returns the vehicle's color (RGBA).
      Parameters:
      vehID - id of the vehicle
      Returns:
      color
    • getDecel Link icon

      public static SumoCommand getDecel(String vehID)
      Returns the deceleration of the named vehicle within the last time step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      deceleration
    • getDrivingDistance Link icon

      public static SumoCommand getDrivingDistance(String vehID, String edgeID, double pos, byte laneID)
      Returns 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
    • getDrivingDistance2D Link icon

      public static SumoCommand getDrivingDistance2D(String vehID, double x, double y)
      getDrivingDistance2D.
      Parameters:
      vehID - id of the vehicle
      x - x
      y - y
      Returns:
      the distance
    • getDistance Link icon

      public static SumoCommand getDistance(String vehID)
      Get the distance to the starting point acts as a odometer.
      Parameters:
      vehID - id of the vehicle
      Returns:
      the current distance of the vehicle (odometer)
    • getEffort Link icon

      public static SumoCommand getEffort(String vehID, double time, String edgeID)
      Returns 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
    • getEmissionClass Link icon

      public static SumoCommand getEmissionClass(String vehID)
      Returns the emission class of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      emission class
    • getElectricityConsumption Link icon

      public static SumoCommand getElectricityConsumption(String vehID)
      Returns the electricity consumption in ml for the last time step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      energy consumption
    • getFuelConsumption Link icon

      public static SumoCommand getFuelConsumption(String vehID)
      Returns the fuel consumption in ml for the last time step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      fuel consumption
    • getHCEmission Link icon

      public static SumoCommand getHCEmission(String vehID)
      Returns the HC emission (in mg) during the last time step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      value for hc
    • getIDList Link icon

      public static SumoCommand getIDList()
      Returns a list of ids of all vehicles currently running within the scenario.
      Returns:
      list of vehicles
    • getImperfection Link icon

      public static SumoCommand getImperfection(String vehID)
      getImperfection.
      Parameters:
      vehID - id of the vehicle
      Returns:
      value for imperfection
    • getLaneID Link icon

      public static SumoCommand getLaneID(String vehID)
      Returns the id of the lane the named vehicle was at within the last step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      lane id
    • getLaneIndex Link icon

      public static SumoCommand getLaneIndex(String vehID)
      Returns the index of the lane the named vehicle was at within the last step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      lane index
    • getLanePosition Link icon

      public static SumoCommand getLanePosition(String vehID)
      Returns the position of the vehicle along the lane (in m).
      Parameters:
      vehID - id of the vehicle
      Returns:
      lane position
    • getLength Link icon

      public static SumoCommand getLength(String vehID)
      Returns the length (in m) of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      length
    • getLine Link icon

      public static SumoCommand getLine(String vehID)
      Returns the length (in m) of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      length
    • getMaxSpeed Link icon

      public static SumoCommand getMaxSpeed(String vehID)
      Returns the maximum speed(in m/s) of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      max speed
    • getMinGap Link icon

      public static SumoCommand getMinGap(String vehID)
      Returns the minimum gap (in m) between this vehicle and the vehicle before it.
      Parameters:
      vehID - id of the vehicle
      Returns:
      min gap
    • getNextTLS Link icon

      public static SumoCommand getNextTLS(String vehID)
      Return list of upcoming traffic lights [(tlsID, tlsIndex, distance, state), ...]
      Parameters:
      vehID - id of the vehicle
      Returns:
      next traffic lights (compound)
    • getNextStops Link icon

      public static SumoCommand getNextStops(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.
      Parameters:
      vehID - id of the vehicle
      Returns:
      next traffic lights (compound)
    • getNOxEmission Link icon

      public static SumoCommand getNOxEmission(String vehID)
      Returns the NOx emissions (in mg) generated by the vehicle during the last time step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      value for nox
    • getNoiseEmission Link icon

      public static SumoCommand getNoiseEmission(String vehID)
      Returns 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
    • getParameter Link icon

      public static SumoCommand getParameter(String vehID, String param)
      Returns the chosen parameter.
      Parameters:
      vehID - a string identifying the vehicle
      param - a string identifying the parameter
      Returns:
      SumoCommand (String)
    • setParameter Link icon

      public static SumoCommand setParameter(String vehID, String param, String value)
      Sets 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
    • getPMxEmission Link icon

      public static SumoCommand getPMxEmission(String vehID)
      Returns 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
    • getPosition Link icon

      public static SumoCommand getPosition(String vehID)
      Returns the position of the named vehicle within the last step [m,m].
      Parameters:
      vehID - id of the vehicle
      Returns:
      position 2D
    • getPosition3D Link icon

      public static SumoCommand getPosition3D(String vehID)
      Returns the position of the named vehicle within the last step [m,m,m].
      Parameters:
      vehID - id of the vehicle
      Returns:
      position 3D
    • getRoadID Link icon

      public static SumoCommand getRoadID(String vehID)
      Returns the id of the edge the named vehicle was at within the last step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      road id
    • getRoute Link icon

      public static SumoCommand getRoute(String vehID)
      Returns the ids of the edges the vehicle's route is made of.
      Parameters:
      vehID - id of the vehicle
      Returns:
      route
    • getRouteID Link icon

      public static SumoCommand getRouteID(String vehID)
      Returns the id of the route of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      route id
    • getRouteIndex Link icon

      public static SumoCommand getRouteIndex(String vehID)
      Returns 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
    • getRoutingMode Link icon

      public static SumoCommand getRoutingMode(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.rerouting
      Parameters:
      vehID - id of the vehicle
      Returns:
      current routing mode
    • getShapeClass Link icon

      public static SumoCommand getShapeClass(String vehID)
      getShapeClass.
      Parameters:
      vehID - id of the vehicle
      Returns:
      shape class
    • getSignals Link icon

      public static SumoCommand getSignals(String vehID)
      getSignals.
      Parameters:
      vehID - id of the vehicle
      Returns:
      the signal state of the vehicle
    • getSlope Link icon

      public static SumoCommand getSlope(String vehID)
      getSlope.
      Parameters:
      vehID - id of the vehicle
      Returns:
      the slope at the current position of the vehicle in degrees
    • getSpeed Link icon

      public static SumoCommand getSpeed(String vehID)
      Returns the speed (in m/s) of the named vehicle within the last step.
      Parameters:
      vehID - id of the vehicle
      Returns:
      speed in m/s
    • getSpeedDeviation Link icon

      public static SumoCommand getSpeedDeviation(String vehID)
      Returns the standard deviation of the estimated maximum speed (see speed factor) divided by this speed.
      Parameters:
      vehID - id of the vehicle
      Returns:
      speed deviation
    • getSpeedFactor Link icon

      public 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.
      Parameters:
      vehID - id of the vehicle
      Returns:
      speed factor
    • getSpeedMode Link icon

      public static SumoCommand getSpeedMode(String vehID)
      Returns the speed mode of a vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      speed mode
    • getSpeedWithoutTraCI Link icon

      public static SumoCommand getSpeedWithoutTraCI(String vehID)
      getSpeedWithoutTraCI.
      Parameters:
      vehID - id of the vehicle
      Returns:
      speed in m/s
    • getStopState Link icon

      public static SumoCommand getStopState(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.
      Parameters:
      vehID - id of the vehicle
      Returns:
      speed in m/s
    • getTau Link icon

      public static SumoCommand getTau(String vehID)
      getTau.
      Parameters:
      vehID - id of the vehicle
      Returns:
      tau
    • getVia Link icon

      public static SumoCommand getVia(String vehID)
      Returns the ids of via edges for this vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      ids of via edges for this vehicle
    • getWaitingTime Link icon

      public 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. (basically, the waiting time of a vehicle is reset to 0 every time it moves).
      Parameters:
      vehID - id of the vehicle
      Returns:
      waiting time
    • getTypeID Link icon

      public static SumoCommand getTypeID(String vehID)
      Returns the id of the type of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      Returns:
      type id
    • getPersonIDList Link icon

      public static SumoCommand getPersonIDList(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.
      Parameters:
      vehID - id of the vehicle
      Returns:
      vehicle class
    • getVehicleClass Link icon

      public static SumoCommand getVehicleClass(String vehID)
      Returns the vehicle class.
      Parameters:
      vehID - id of the vehicle
      Returns:
      vehicle class
    • getAccumulatedWaitingTime Link icon

      public static SumoCommand getAccumulatedWaitingTime(String vehID)
      Returns the vehicle class.
      Parameters:
      vehID - id of the vehicle
      Returns:
      vehicle class
    • getWidth Link icon

      public static SumoCommand getWidth(String vehID)
      Returns the vehicle's width (in m).
      Parameters:
      vehID - id of the vehicle
      Returns:
      width
    • isStopped Link icon

      public static SumoCommand isStopped(String vehID)
      isStopped.
      Parameters:
      vehID - id of the vehicle
      Returns:
      stop
    • isStoppedTriggered Link icon

      public static SumoCommand isStoppedTriggered(String vehID)
      Return whether the vehicle is stopped and waiting for a person or container.
      Parameters:
      vehID - id of the vehicle
      Returns:
      stop
    • isAtContainerStop Link icon

      public static SumoCommand isAtContainerStop(String vehID)
      Return whether the vehicle is stopped at a container stop.
      Parameters:
      vehID - id of the vehicle
      Returns:
      stop
    • isStoppedParking Link icon

      public static SumoCommand isStoppedParking(String vehID)
      isStoppedParking.
      Parameters:
      vehID - id of the vehicle
      Returns:
      stop
    • isAtBusStop Link icon

      public static SumoCommand isAtBusStop(String vehID)
      isAtBusStop.
      Parameters:
      vehID - id of the vehicle
      Returns:
      stop
    • isRouteValid Link icon

      public static SumoCommand isRouteValid(String vehID)
      Returns whether the Route is valid.
      Parameters:
      vehID - id of the vehicle
      Returns:
      route valid
    • slowDown Link icon

      public static SumoCommand slowDown(String vehID, double speed, double duration)
      Reduces the speed to the given for the given amount of time.
      Parameters:
      vehID - id of the vehicle
      speed - speed
      duration - duration
      Returns:
      SumoCommand
    • add Link icon

      public 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
    • addFull Link icon

      public 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
    • changeLane Link icon

      public static SumoCommand changeLane(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.
      Parameters:
      vehID - vehicle id
      laneIndex - lane index
      duration - duration
      Returns:
      SumoCommand
    • changeTarget Link icon

      public static SumoCommand changeTarget(String vehID, String edgeID)
      The vehicle's destination edge is set to the given. The route is rebuilt.
      Parameters:
      vehID - vehicle id
      edgeID - edge id
      Returns:
      SumoCommand
    • changeSublane Link icon

      public static SumoCommand changeSublane(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.
      Parameters:
      vehID - vehicle id
      latDist - latDist
      Returns:
      SumoCommand
    • moveTo Link icon

      public static SumoCommand moveTo(String vehID, String laneID, double pos)
      Moves the vehicle to a new position.
      Parameters:
      vehID - vehicle id
      laneID - lane id
      pos - position
      Returns:
      SumoCommand
    • moveToXY Link icon

      public 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
    • remove Link icon

      public static SumoCommand remove(String vehID, byte reason)
      Removes 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
    • rerouteEffort Link icon

      public static SumoCommand rerouteEffort(String vehID)
      Computes a new route using the vehicle's internal and the global edge effort information.
      Parameters:
      vehID - id of the vehicle
      Returns:
      SumoCommand
    • rerouteTraveltime Link icon

      public static SumoCommand rerouteTraveltime(String vehID)
      Computes a new route using the vehicle's internal and the global edge travel time information.
      Parameters:
      vehID - id of the vehicle
      Returns:
      SumoCommand
    • setAccel Link icon

      public static SumoCommand setAccel(String vehID, double accel)
      Sets the acceleration of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      accel - acceleration
      Returns:
      SumoCommand
    • setAdaptedTraveltime Link icon

      public 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
    • setLateralAlignment Link icon

      public static SumoCommand setLateralAlignment(String vehID, String align)
      Sets the preferred lateral alignment for this vehicle.
      Parameters:
      vehID - id of the vehicle
      align - align
      Returns:
      SumoCommand
    • setApparentDecel Link icon

      public static SumoCommand setApparentDecel(String vehID, double decel)
      Sets the apparent deceleration in m/s^2 for this vehicle.
      Parameters:
      vehID - id of the vehicle
      decel - decel
      Returns:
      SumoCommand
    • setMinGapLat Link icon

      public static SumoCommand setMinGapLat(String vehID, double minGapLat)
      Sets the minimum lateral gap of the vehicle at 50km/h in m.
      Parameters:
      vehID - id of the vehicle
      minGapLat - minGapLat
      Returns:
      SumoCommand
    • setColor Link icon

      public static SumoCommand setColor(String vehID, SumoColor color)
      Sets the vehicle's color (RGBA).
      Parameters:
      vehID - id of the vehicle
      color - color
      Returns:
      SumoCommand
    • setDecel Link icon

      public static SumoCommand setDecel(String vehID, double decel)
      Sets the deceleration of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      decel - deceleration
      Returns:
      SumoCommand
    • setHeight Link icon

      public static SumoCommand setHeight(String vehID, double height)
      Sets the height in m for this vehicle.
      Parameters:
      vehID - id of the vehicle
      height - in m
      Returns:
      SumoCommand
    • setLaneChangeMode Link icon

      public static SumoCommand setLaneChangeMode(String vehID, int lcm)
      Sets the vehicle's lane change mode as a bitset.
      Parameters:
      vehID - id of the vehicle
      lcm - lane change model
      Returns:
      SumoCommand
    • setEmergencyDecel Link icon

      public static SumoCommand setEmergencyDecel(String vehID, double decel)
      Sets the maximal physically possible deceleration in m/s^2 for this vehicle.
      Parameters:
      vehID - id of the vehicle
      decel - decel
      Returns:
      SumoCommand
    • setRoute Link icon

      public static SumoCommand setRoute(String vehID, SumoStringList edgeList)
      Sets the IDs of the edges the vehicle's route is made of.
      Parameters:
      vehID - id of the vehicle
      edgeList - edges list
      Returns:
      SumoCommand
    • setRoutingMode Link icon

      public static SumoCommand setRoutingMode(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.rerouting
      Parameters:
      vehID - id of the vehicle
      routingMode - routingMode
      Returns:
      SumoCommand
    • setType Link icon

      public static SumoCommand setType(String vehID, String typeID)
      Sets the id of the type for the named vehicle.
      Parameters:
      vehID - id of the vehicle
      typeID - type id
      Returns:
      SumoCommand
    • setEffort Link icon

      public 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
    • setEmissionClass Link icon

      public static SumoCommand setEmissionClass(String vehID, String clazz)
      Sets the emission class of the named vehicle.
      Parameters:
      vehID - id of the vehicle
      clazz - emission class
      Returns:
      SumoCommand
    • setImperfection Link icon

      public static SumoCommand setImperfection(String vehID, double imperfection)
      setImperfection.
      Parameters:
      vehID - vehicle id
      imperfection - imperfection
      Returns:
      SumoCommand
    • setLength Link icon

      public static SumoCommand setLength(String vehID, double length)
      Sets the length (in m) of the named vehicle.
      Parameters:
      vehID - vehicle id
      length - length
      Returns:
      SumoCommand
    • setActionStepLength Link icon

      public 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
    • setLine Link icon

      public static SumoCommand setLine(String vehID, String line)
      Sets the line information for this vehicle.
      Parameters:
      vehID - vehicle id
      line - line
      Returns:
      SumoCommand
    • setVia Link icon

      public static SumoCommand setVia(String vehID, SumoStringList edgeList)
      Sets 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
    • setMaxSpeed Link icon

      public static SumoCommand setMaxSpeed(String vehID, double speed)
      Sets the maximum speed (in m/s) of the named vehicle.
      Parameters:
      vehID - vehicle id
      speed - speed
      Returns:
      SumoCommand
    • setMaxSpeedLat Link icon

      public static SumoCommand setMaxSpeedLat(String vehID, double speed)
      Sets the maximum lateral speed in m/s for this vehicle.
      Parameters:
      vehID - vehicle id
      speed - speed
      Returns:
      SumoCommand
    • setMinGap Link icon

      public static SumoCommand setMinGap(String vehID, double minGap)
      Sets the minimum gap (in m) between this vehicle and the vehicle before it.
      Parameters:
      vehID - vehicle id
      minGap - minimum gap
      Returns:
      SumoCommand
    • setRouteID Link icon

      public static SumoCommand setRouteID(String vehID, String routeID)
      Sets the id of the route of the named vehicle.
      Parameters:
      vehID - vehicle id
      routeID - route id
      Returns:
      SumoCommand
    • setShapeClass Link icon

      public static SumoCommand setShapeClass(String vehID, String clazz)
      setShapeClass.
      Parameters:
      vehID - vehicle id
      clazz - shape class
      Returns:
      SumoCommand
    • setSignals Link icon

      public static SumoCommand setSignals(String vehID, int signals)
      setSignals.
      Parameters:
      vehID - vehicle id
      signals - signals
      Returns:
      SumoCommand
    • setSpeed Link icon

      public static SumoCommand setSpeed(String vehID, double speed)
      Sets the speed (in m/s) of the named vehicle.
      Parameters:
      vehID - vehicle id
      speed - speed
      Returns:
      SumoCommand
    • setSpeedDeviation Link icon

      public static SumoCommand setSpeedDeviation(String vehID, double deviation)
      Sets the standard deviation of the estimated maximum speed.
      Parameters:
      vehID - vehicle id
      deviation - deviation
      Returns:
      SumoCommand
    • setSpeedFactor Link icon

      public 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.
      Parameters:
      vehID - vehicle id
      factor - factor
      Returns:
      SumoCommand
    • setSpeedMode Link icon

      public static SumoCommand setSpeedMode(String vehID, int sm)
      Sets the vehicle's speed mode as a bitset.
      Parameters:
      vehID - vehicle id
      sm - speed mode
      Returns:
      SumoCommand
    • setStop Link icon

      public 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
    • setChargingStationStop Link icon

      public 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
    • setBusStop Link icon

      public static SumoCommand setBusStop(String vehID, String stopID, double duration, double until)
      Adds 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
    • setContainerStop Link icon

      public 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
    • setParkingAreaStop Link icon

      public 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
    • resume Link icon

      public static SumoCommand resume(String vehID)
      Continue after a stop.
      Parameters:
      vehID - vehicle id
      Returns:
      SumoCommand
    • setTau Link icon

      public static SumoCommand setTau(String vehID, double tau)
      setTau.
      Parameters:
      vehID - vehicle id
      tau - tau
      Returns:
      SumoCommand
    • setVehicleClass Link icon

      public static SumoCommand setVehicleClass(String vehID, String clazz)
      Sets the vehicle class.
      Parameters:
      vehID - vehicle id
      clazz - vehicle class
      Returns:
      SumoCommand
    • setWidth Link icon

      public static SumoCommand setWidth(String vehID, double width)
      Sets the vehicle's width (in m).
      Parameters:
      vehID - vehicle id
      width - width
      Returns:
      SumoCommand
    • updateBestLanes Link icon

      public static SumoCommand updateBestLanes(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. 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
    • rerouteParkingArea Link icon

      public static SumoCommand rerouteParkingArea(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.
      Parameters:
      vehID - vehicle id
      parkingAreaID - parkingAreaID
      Returns:
      SumoCommand