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>

Inheritance diagram for SUMOVTypeParameter:
Parameterised

Public Types

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

Public Member Functions

void addParameter (const std::string &key, const std::string &value)
 Adds a parameter. More...
 
void addParameter (const std::map< std::string, std::string > &mapArg)
 Adds all given parameter. More...
 
void addParameter (const Parameterised &p)
 Adds all given parameter. More...
 
void clearParameter ()
 Clears the parameter map. More...
 
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...
 
const std::map< std::string,
std::string > & 
getMap () const
 Returns the inner key/value map. More...
 
const std::string & getParameter (const std::string &key, const std::string &defaultValue) const
 Returns the value for a given key. More...
 
bool knowsParameter (const std::string &key) const
 Returns whether the parameter is known. 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...
 
SUMOReal impatience
 The vehicle's impatience (willingness to obstruct others) 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 77 of file SUMOVTypeParameter.h.

Member Typedef Documentation

Car-following parameter.

Definition at line 164 of file SUMOVTypeParameter.h.

Constructor & Destructor Documentation

Member Function Documentation

void Parameterised::addParameter ( const std::string &  key,
const std::string &  value 
)
inherited

Adds a parameter.

Parameters
[in]keyThe parameter's name
[in]valueThe parameter's value

Definition at line 53 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by NLHandler::addParam(), SUMORouteHandler::addParam(), PCLoaderOSM::addPOI(), PCLoaderOSM::addPolygon(), and NIImporter_MATSim::EdgesHandler::myStartElement().

void Parameterised::addParameter ( const std::map< std::string, std::string > &  mapArg)
inherited

Adds all given parameter.

Parameters
[in]mapArgThe keys/values to insert

Definition at line 59 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::addParameter ( const Parameterised p)
inherited

Adds all given parameter.

Parameters
[in]pThe keys/values to insert

Definition at line 67 of file Parameterised.cpp.

References Parameterised::myMap.

void Parameterised::clearParameter ( )
inherited

Clears the parameter map.

Definition at line 91 of file Parameterised.cpp.

References Parameterised::myMap.

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 141 of file SUMOVTypeParameter.cpp.

References cfParameter.

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

const std::map<std::string, std::string>& Parameterised::getMap ( ) const
inlineinherited

Returns the inner key/value map.

Returns
the inner map

Definition at line 106 of file Parameterised.h.

References Parameterised::myMap.

Referenced by PCPolyContainer::save().

const std::string & Parameterised::getParameter ( const std::string &  key,
const std::string &  defaultValue 
) const
inherited
bool Parameterised::knowsParameter ( const std::string &  key) const
inherited

Returns whether the parameter is known.

Parameters
[in]keyThe key to ask for
Returns
Whether the key is known

Definition at line 75 of file Parameterised.cpp.

References Parameterised::myMap.

Referenced by MSDevice_Example::buildVehicleDevices(), and TraCIServerAPI_Vehicle::vtdMap_matchingNearest().

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 90 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 161 of file SUMOVTypeParameter.h.

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

CFParams SUMOVTypeParameter::cfParameter

Definition at line 165 of file SUMOVTypeParameter.h.

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

RGBColor SUMOVTypeParameter::color
SUMOReal SUMOVTypeParameter::defaultProbability

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

Definition at line 125 of file SUMOVTypeParameter.h.

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

SUMOReal SUMOVTypeParameter::height

This class' height.

Definition at line 147 of file SUMOVTypeParameter.h.

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

std::string SUMOVTypeParameter::imgFile

Image file for this class.

Definition at line 156 of file SUMOVTypeParameter.h.

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

SUMOReal SUMOVTypeParameter::impatience

The vehicle's impatience (willingness to obstruct others)

Definition at line 137 of file SUMOVTypeParameter.h.

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

std::string SUMOVTypeParameter::lcModel

The name of the lane-change model to use.

Definition at line 168 of file SUMOVTypeParameter.h.

SUMOReal SUMOVTypeParameter::length
SUMOReal SUMOVTypeParameter::minGap

This class' free space in front of the vehicle itself.

Definition at line 121 of file SUMOVTypeParameter.h.

Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::getLengthWithGap(), MSVehicleType::getMinGap(), MSVehicleType::setMinGap(), and write().

bool SUMOVTypeParameter::onlyReferenced
mutable

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

Definition at line 178 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 153 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 175 of file SUMOVTypeParameter.h.

Referenced by ROVehicle::saveAllAsXML().

int SUMOVTypeParameter::setParameter

Information for the router which parameter were set.

Definition at line 171 of file SUMOVTypeParameter.h.

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

SUMOVehicleShape SUMOVTypeParameter::shape
SUMOReal SUMOVTypeParameter::speedDev
SUMOReal SUMOVTypeParameter::speedFactor

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

Definition at line 127 of file SUMOVTypeParameter.h.

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

SUMOVehicleClass SUMOVTypeParameter::vehicleClass
SUMOReal SUMOVTypeParameter::width

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