SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SUMOVTypeParameter Class Reference

Structure representing possible vehicle parameter. More...

#include <SUMOVTypeParameter.h>

Public Types

typedef std::map< SumoXMLAttr,
SUMOReal
CFParams
 Car-following parameter. More...
 

Public Member Functions

SUMOReal get (const SumoXMLAttr attr, const SUMOReal defaultValue) const
 Returns the named value from the map, or the default if it is ot contained there. More...
 
 SUMOVTypeParameter ()
 Constructor. More...
 
void validateCFParameter () const
 Validates stored car-following parameter. More...
 
bool wasSet (int what) const
 Returns whether the given parameter was set. More...
 
void write (OutputDevice &dev) const
 Writes the vtype. More...
 

Data Fields

SumoXMLTag cfModel
 The enum-representation of the car-following model to use. More...
 
CFParams cfParameter
 
RGBColor color
 The color. More...
 
SUMOReal defaultProbability
 The probability when being added to a distribution without an explicit probability. More...
 
SUMOEmissionClass emissionClass
 The emission class of this vehicle. More...
 
std::string id
 The vehicle type's id. More...
 
std::string lcModel
 The name of the lane-change model to use. More...
 
SUMOReal length
 The physical vehicle length. More...
 
SUMOReal maxSpeed
 The vehicle type's maximum speed [m/s]. More...
 
SUMOReal minGap
 This class' free space in front of the vehicle itself. More...
 
bool onlyReferenced
 Information whether this is a type-stub, being only referenced but not defined (needed by routers) More...
 
bool saved
 Information whether this type was already saved (needed by routers) More...
 
int setParameter
 Information for the router which parameter were set. More...
 
SUMOReal speedDev
 The standard deviation for speed variations. More...
 
SUMOReal speedFactor
 The factor by which the maximum speed may deviate from the allowed max speed on the street. More...
 
SUMOVehicleClass vehicleClass
 The vehicle's class. More...
 
Values for drawing this class' vehicles
SUMOReal width
 This class' width. More...
 
SUMOReal height
 This class' height. More...
 
SUMOVehicleShape shape
 This class' shape. More...
 
std::string osgFile
 3D model file for this class More...
 
std::string imgFile
 Image file for this class. More...
 

Detailed Description

Structure representing possible vehicle parameter.

Definition at line 75 of file SUMOVTypeParameter.h.

Member Typedef Documentation

Car-following parameter.

Definition at line 160 of file SUMOVTypeParameter.h.

Constructor & Destructor Documentation

Member Function Documentation

SUMOReal SUMOVTypeParameter::get ( const SumoXMLAttr  attr,
const SUMOReal  defaultValue 
) const

Returns the named value from the map, or the default if it is ot contained there.

Parameters
[in]attrThe corresponding xml attribute
[in]defaultValueThe value to return if the given map does not contain the named variable
Returns
The named value from the map or the default if it does not exist there

Definition at line 133 of file SUMOVTypeParameter.cpp.

References cfParameter.

Referenced by MSVehicleType::build(), ROEdge::getCO2Effort(), ROEdge::getCOEffort(), ROEdge::getFuelEffort(), ROEdge::getHCEffort(), ROEdge::getNOxEffort(), and ROEdge::getPMxEffort().

void SUMOVTypeParameter::validateCFParameter ( ) const

Validates stored car-following parameter.

bool SUMOVTypeParameter::wasSet ( int  what) const
inline

Returns whether the given parameter was set.

Parameters
[in]whatThe parameter which one asks for
Returns
Whether the given parameter was set

Definition at line 88 of file SUMOVTypeParameter.h.

References setParameter.

Referenced by write().

Field Documentation

SumoXMLTag SUMOVTypeParameter::cfModel

The enum-representation of the car-following model to use.

Definition at line 157 of file SUMOVTypeParameter.h.

Referenced by MSVehicleType::build(), SUMOVehicleParserHelper::parseVTypeEmbedded(), and write().

CFParams SUMOVTypeParameter::cfParameter

Definition at line 161 of file SUMOVTypeParameter.h.

Referenced by get(), SUMOVehicleParserHelper::parseVTypeEmbedded(), and write().

SUMOReal SUMOVTypeParameter::defaultProbability

The probability when being added to a distribution without an explicit probability.

Definition at line 123 of file SUMOVTypeParameter.h.

Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::getDefaultProbability(), RORouteHandler::myEndElement(), MSVehicleType::saveState(), MSVehicleType::setDefaultProbability(), and write().

SUMOReal SUMOVTypeParameter::height

This class' height.

Definition at line 143 of file SUMOVTypeParameter.h.

Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::getHeight(), and write().

std::string SUMOVTypeParameter::imgFile

Image file for this class.

Definition at line 152 of file SUMOVTypeParameter.h.

Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::getImgFile(), and write().

std::string SUMOVTypeParameter::lcModel

The name of the lane-change model to use.

Definition at line 164 of file SUMOVTypeParameter.h.

Referenced by MSVehicleType::saveState().

SUMOReal SUMOVTypeParameter::minGap
bool SUMOVTypeParameter::onlyReferenced
mutable

Information whether this is a type-stub, being only referenced but not defined (needed by routers)

Definition at line 174 of file SUMOVTypeParameter.h.

Referenced by RONet::getVehicleTypeSecure(), RONet::RONet(), and write().

std::string SUMOVTypeParameter::osgFile

3D model file for this class

Definition at line 149 of file SUMOVTypeParameter.h.

Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::getOSGFile(), and write().

bool SUMOVTypeParameter::saved
mutable

Information whether this type was already saved (needed by routers)

Definition at line 171 of file SUMOVTypeParameter.h.

Referenced by ROVehicle::saveAllAsXML().

int SUMOVTypeParameter::setParameter

Information for the router which parameter were set.

Definition at line 167 of file SUMOVTypeParameter.h.

Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), wasSet(), and MSVehicleType::wasSet().

SUMOReal SUMOVTypeParameter::speedFactor

The factor by which the maximum speed may deviate from the allowed max speed on the street.

Definition at line 125 of file SUMOVTypeParameter.h.

Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::computeChosenSpeedDeviation(), MSVehicleType::getSpeedFactor(), MSVehicleType::saveState(), MSVehicleType::setSpeedFactor(), and write().


The documentation for this class was generated from the following files: