SUMO - Simulation of Urban MObility
|
Structure representing possible vehicle parameter. More...
#include <SUMOVTypeParameter.h>
Public Types | |
typedef std::map< SumoXMLAttr, SUMOReal > | CFParams |
Car-following parameter. |
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. | |
SUMOVTypeParameter () | |
Constructor. | |
void | validateCFParameter () const |
Validates stored car-following parameter. | |
bool | wasSet (int what) const |
Returns whether the given parameter was set. | |
void | write (OutputDevice &dev) const |
Writes the vtype. |
Data Fields | |
SumoXMLTag | cfModel |
The enum-representation of the car-following model to use. | |
CFParams | cfParameter |
RGBColor | color |
The color. | |
SUMOReal | defaultProbability |
The probability when being added to a distribution without an explicit probability. | |
SUMOEmissionClass | emissionClass |
The emission class of this vehicle. | |
std::string | id |
The vehicle type's id. | |
std::string | lcModel |
The name of the lane-change model to use. | |
SUMOReal | length |
The physical vehicle length + the standing gap in m. | |
SUMOReal | maxSpeed |
The vehicle type's maximum speed [m/s]. | |
SUMOReal | minGap |
This class' free space in front of the vehicle itself. | |
bool | onlyReferenced |
Information whether this is a type-stub, being only referenced but not defined (needed by routers) | |
bool | saved |
Information whether this type was already saved (needed by routers) | |
int | setParameter |
Information for the router which parameter were set. | |
SUMOReal | speedDev |
The standard deviation for speed variations. | |
SUMOReal | speedFactor |
The factor by which the maximum speed may deviate from the allowed max speed on the street. | |
SUMOVehicleClass | vehicleClass |
The vehicle's class. | |
Values for drawing this class' vehicles | |
SUMOReal | width |
This class' width. | |
SUMOReal | height |
This class' height. | |
SUMOVehicleShape | shape |
This class' shape. | |
std::string | osgFile |
This class 3D model file. |
Structure representing possible vehicle parameter.
Definition at line 74 of file SUMOVTypeParameter.h.
typedef std::map<SumoXMLAttr, SUMOReal> SUMOVTypeParameter::CFParams |
Car-following parameter.
Definition at line 156 of file SUMOVTypeParameter.h.
SUMOVTypeParameter::SUMOVTypeParameter | ( | ) |
Constructor.
Initialises the structure with default values
Definition at line 50 of file SUMOVTypeParameter.cpp.
References DEFAULT_VEH_FOLLOW_MODEL, DEFAULT_VEH_HEIGHT, DEFAULT_VEH_LANE_CHANGE_MODEL, DEFAULT_VEH_LENGTH, DEFAULT_VEH_MAXSPEED, DEFAULT_VEH_MINGAP, DEFAULT_VEH_PROB, DEFAULT_VEH_SHAPE, DEFAULT_VEH_SPEEDDEV, DEFAULT_VEH_SPEEDFACTOR, DEFAULT_VEH_WIDTH, and DEFAULT_VTYPE_ID.
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.
[in] | attr | The corresponding xml attribute |
[in] | defaultValue | The value to return if the given map does not contain the named variable |
Definition at line 130 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.
Returns whether the given parameter was set.
[in] | what | The parameter which one asks for |
Definition at line 87 of file SUMOVTypeParameter.h.
References setParameter.
Referenced by write().
void SUMOVTypeParameter::write | ( | OutputDevice & | dev | ) | const |
Writes the vtype.
[in,out] | dev | The device to write into |
IOError | not yet implemented |
Definition at line 64 of file SUMOVTypeParameter.cpp.
References cfModel, cfParameter, OutputDevice::closeTag(), color, defaultProbability, emissionClass, getVehicleEmissionTypeName(), getVehicleShapeName(), height, length, maxSpeed, minGap, onlyReferenced, OutputDevice::openTag(), osgFile, shape, speedDev, speedFactor, SUMO_ATTR_COLOR, SUMO_ATTR_EMISSIONCLASS, SUMO_ATTR_GUISHAPE, SUMO_ATTR_HEIGHT, SUMO_ATTR_ID, SUMO_ATTR_LENGTH, SUMO_ATTR_MAXSPEED, SUMO_ATTR_MINGAP, SUMO_ATTR_OSGFILE, SUMO_ATTR_PROB, SUMO_ATTR_SPEEDDEV, SUMO_ATTR_SPEEDFACTOR, SUMO_ATTR_VCLASS, SUMO_ATTR_WIDTH, SUMO_TAG_VTYPE, toString(), vehicleClass, VTYPEPARS_COLOR_SET, VTYPEPARS_EMISSIONCLASS_SET, VTYPEPARS_HEIGHT_SET, VTYPEPARS_LENGTH_SET, VTYPEPARS_MAXSPEED_SET, VTYPEPARS_MINGAP_SET, VTYPEPARS_OSGFILE_SET, VTYPEPARS_PROBABILITY_SET, VTYPEPARS_SHAPE_SET, VTYPEPARS_SPEEDDEVIATION_SET, VTYPEPARS_SPEEDFACTOR_SET, VTYPEPARS_VEHICLECLASS_SET, VTYPEPARS_WIDTH_SET, wasSet(), width, and OutputDevice::writeAttr().
Referenced by ROVehicle::saveAllAsXML().
SumoXMLTag SUMOVTypeParameter::cfModel |
The enum-representation of the car-following model to use.
Definition at line 153 of file SUMOVTypeParameter.h.
Referenced by MSVehicleType::build(), SUMOVehicleParserHelper::parseVTypeEmbedded(), and write().
CFParams SUMOVTypeParameter::cfParameter |
Definition at line 157 of file SUMOVTypeParameter.h.
Referenced by get(), SUMOVehicleParserHelper::parseVTypeEmbedded(), and write().
RGBColor SUMOVTypeParameter::color |
The color.
Definition at line 130 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
SUMOReal SUMOVTypeParameter::defaultProbability |
The probability when being added to a distribution without an explicit probability.
Definition at line 122 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
SUMOEmissionClass SUMOVTypeParameter::emissionClass |
The emission class of this vehicle.
Definition at line 128 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), ROEdge::getCO2Effort(), ROEdge::getCOEffort(), ROEdge::getFuelEffort(), ROEdge::getHCEffort(), ROEdge::getNoiseEffort(), ROEdge::getNOxEffort(), ROEdge::getPMxEffort(), and write().
SUMOReal SUMOVTypeParameter::height |
This class' height.
Definition at line 142 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
std::string SUMOVTypeParameter::id |
The vehicle type's id.
Definition at line 113 of file SUMOVTypeParameter.h.
Referenced by RONet::addVehicleType(), SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), RONet::getVehicleTypeSecure(), SUMOVehicleParserHelper::parseVTypeEmbedded(), and RONet::RONet().
std::string SUMOVTypeParameter::lcModel |
The name of the lane-change model to use.
Definition at line 160 of file SUMOVTypeParameter.h.
Referenced by MSVehicleType::build().
SUMOReal SUMOVTypeParameter::length |
The physical vehicle length + the standing gap in m.
Definition at line 116 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
SUMOReal SUMOVTypeParameter::maxSpeed |
The vehicle type's maximum speed [m/s].
Definition at line 120 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), ROEdge::getCO2Effort(), ROEdge::getCOEffort(), ROEdge::getEffort(), ROEdge::getFuelEffort(), ROEdge::getHCEffort(), ROVehicle::getMaxSpeed(), ROEdge::getMinimumTravelTime(), ROEdge::getNoiseEffort(), ROEdge::getNOxEffort(), ROEdge::getPMxEffort(), and write().
SUMOReal SUMOVTypeParameter::minGap |
This class' free space in front of the vehicle itself.
Definition at line 118 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
|
mutable |
Information whether this is a type-stub, being only referenced but not defined (needed by routers)
Definition at line 170 of file SUMOVTypeParameter.h.
Referenced by RONet::getVehicleTypeSecure(), RONet::RONet(), and write().
std::string SUMOVTypeParameter::osgFile |
This class 3D model file.
Definition at line 148 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
|
mutable |
Information whether this type was already saved (needed by routers)
Definition at line 167 of file SUMOVTypeParameter.h.
Referenced by ROVehicle::saveAllAsXML().
int SUMOVTypeParameter::setParameter |
Information for the router which parameter were set.
Definition at line 163 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), and wasSet().
SUMOVehicleShape SUMOVTypeParameter::shape |
This class' shape.
Definition at line 145 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
SUMOReal SUMOVTypeParameter::speedDev |
The standard deviation for speed variations.
Definition at line 126 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
SUMOReal SUMOVTypeParameter::speedFactor |
The factor by which the maximum speed may deviate from the allowed max speed on the street.
Definition at line 124 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().
SUMOVehicleClass SUMOVTypeParameter::vehicleClass |
The vehicle's class.
Definition at line 132 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), ROVehicle::getVClass(), and write().
SUMOReal SUMOVTypeParameter::width |
This class' width.
Definition at line 139 of file SUMOVTypeParameter.h.
Referenced by SUMOVehicleParserHelper::beginVTypeParsing(), MSVehicleType::build(), and write().