traci.vehicletype
index
/tmp/buildd/sumo-0.21.0+dfsg/tools/traci/vehicletype.py

@file    vehicletype.py
@author  Michael Behrisch
@author  Lena Kalleske
@date    2008-10-09
@version $Id: vehicletype.py 15692 2014-02-22 09:17:02Z behrisch $
 
Python implementation of the TraCI interface.
 
SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
Copyright (C) 2008-2014 DLR (http://www.dlr.de/) and contributors
 
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

 
Modules
       
struct
traci.constants
traci

 
Functions
       
getAccel(typeID)
getAccel(string) -> double
 
Returns the maximum acceleration in m/s^2 of vehicles of this type.
getColor(typeID)
getColor(string) -> (integer, integer, integer, integer)
 
Returns the color of this type.
getContextSubscriptionResults(typeID=None)
getDecel(typeID)
getDecel(string) -> double
 
Returns the maximum deceleration in m/s^2 of vehicles of this type.
getEmissionClass(typeID)
getEmissionClass(string) -> string
 
Returns the emission class of vehicles of this type.
getIDCount()
getIDCount() -> integer
 
Returns the number of currently loaded vehicle types.
getIDList()
getIDList() -> list(string)
 
Returns a list of ids of currently loaded vehicle types.
getImperfection(typeID)
getImperfection(string) -> double
 
.
getLength(typeID)
getLength(string) -> double
 
Returns the length in m of the vehicles of this type.
getMaxSpeed(typeID)
getMaxSpeed(string) -> double
 
Returns the maximum speed in m/s of vehicles of this type.
getMinGap(typeID)
getMinGap(string) -> double
 
Returns the offset (gap to front vehicle if halting) of vehicles of this type.
getShapeClass(typeID)
getShapeClass(string) -> string
 
Returns the shape class of vehicles of this type.
getSpeedDeviation(typeID)
getSpeedDeviation(string) -> double
 
Returns the maximum speed deviation of vehicles of this type.
getSpeedFactor(typeID)
getSpeedFactor(string) -> double
 
.
getSubscriptionResults(typeID=None)
getSubscriptionResults(string) -> dict(integer: <value_type>)
 
Returns the subscription results for the last time step and the given vehicle type.
If no vehicle type id is given, all subscription results are returned in a dict.
If the vehicle type id is unknown or the subscription did for any reason return no data,
'None' is returned.
It is not possible to retrieve older subscription results than the ones
from the last time step.
getTau(typeID)
getTau(string) -> double
 
Returns the driver's reaction time in s for vehicles of this type.
getVehicleClass(typeID)
getVehicleClass(string) -> string
 
Returns the class of vehicles of this type.
getWidth(typeID)
getWidth(string) -> double
 
Returns the width in m of vehicles of this type.
setAccel(typeID, accel)
setAccel(string, double) -> None
 
Sets the maximum acceleration in m/s^2 of vehicles of this type.
setColor(typeID, color)
setColor(string, (integer, integer, integer, integer)) -> None
 
Sets the color of this type.
setDecel(typeID, decel)
setDecel(string, double) -> None
 
Sets the maximum deceleration in m/s^2 of vehicles of this type.
setEmissionClass(typeID, clazz)
setEmissionClass(string, string) -> None
 
Sets the emission class of vehicles of this type.
setImperfection(typeID, imperfection)
setImperfection(string, double) -> None
 
.
setLength(typeID, length)
setLength(string, double) -> None
 
Sets the length in m of the vehicles of this type.
setMaxSpeed(typeID, speed)
setMaxSpeed(string, double) -> None
 
Sets the maximum speed in m/s of vehicles of this type.
setMinGap(typeID, minGap)
setMinGap(string, double) -> None
 
Sets the offset (gap to front vehicle if halting) of vehicles of this type.
setShapeClass(typeID, clazz)
setShapeClass(string, string) -> None
 
Sets the shape class of vehicles of this type.
setSpeedDeviation(typeID, deviation)
setSpeedDeviation(string, double) -> None
 
Sets the maximum speed deviation of vehicles of this type.
setSpeedFactor(typeID, factor)
setSpeedFactor(string, double) -> None
 
.
setTau(typeID, tau)
setTau(string, double) -> None
 
Sets the driver's reaction time in s for vehicles of this type.
setVehicleClass(typeID, clazz)
setVehicleClass(string, string) -> None
 
Sets the class of vehicles of this type.
setWidth(typeID, width)
setWidth(string, double) -> None
 
Sets the width in m of vehicles of this type.
subscribe(typeID, varIDs=(65,), begin=0, end=2147483647)
subscribe(string, list(integer), double, double) -> None
 
Subscribe to one or more vehicle type values for the given interval.
subscribeContext(typeID, domain, dist, varIDs=(65,), begin=0, end=2147483647)

 
Data
        subscriptionResults = <{}, {}>