43 #ifdef CHECK_MEMORY_LEAKS
45 #endif // CHECK_MEMORY_LEAKS
52 : id(vtid), length(5.), minGap(2.5), maxSpeed(200. / 3.6),
54 speedFactor(1.0), speedDev(0.0),
56 vehicleClass(vclass), impatience(0.0), personCapacity(4), containerCapacity(0), boardingDuration(500),
57 loadingDuration(90000), width(1.8), height(1.5), shape(
SVS_UNKNOWN), osgFile(
"car-normal-citrus.obj"),
60 setParameter(0), saved(false), onlyReferenced(false) {
100 osgFile =
"car-microcargo-citrus.obj";
110 osgFile =
"car-microcargo-citrus.obj";
120 osgFile =
"car-minibus-citrus.obj";
129 osgFile =
"car-minibus-citrus.obj";
276 std::vector<SumoXMLAttr> attrs;
278 attrs.push_back(i->first);
280 std::sort(attrs.begin(), attrs.end());
281 for (std::vector<SumoXMLAttr>::const_iterator i = attrs.begin(); i != attrs.end(); ++i) {
287 std::vector<SumoXMLAttr> attrs;
289 attrs.push_back(i->first);
291 std::sort(attrs.begin(), attrs.end());
292 for (std::vector<SumoXMLAttr>::const_iterator i = attrs.begin(); i != attrs.end(); ++i) {
297 for (std::map<std::string, std::string>::const_iterator j =
getMap().begin(); j !=
getMap().end(); ++j) {
415 return defaultParams;
const int VTYPEPARS_MAXSPEED_SET
const int VTYPEPARS_MINGAP_SET
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
SumoXMLTag cfModel
The enum-representation of the car-following model to use.
const int VTYPEPARS_LATALIGNMENT_SET
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
vehicle is a not electrified rail
SUMOVehicleShape shape
This class' shape.
Structure representing possible vehicle parameter.
const int VTYPEPARS_MINGAP_LAT_SET
SUMOReal getCFParam(const SumoXMLAttr attr, const SUMOReal defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
SUMOVTypeParameter(const std::string &vtid, const SUMOVehicleClass vc=SVC_IGNORING)
Constructor.
render as a transport vehicle
SUMOReal speedDev
The standard deviation for speed variations.
vehicle is a small delivery vehicle
int containerCapacity
The container capacity of the vehicle.
SUMOReal length
The physical vehicle length.
const int VTYPEPARS_BOARDING_DURATION
const SUMOReal DEFAULT_PEDESTRIAN_SPEED
SUMOReal getLCParam(const SumoXMLAttr attr, const SUMOReal defaultValue) const
Returns the named value from the map, or the default if it is not contained there.
SUMOVehicleClass vehicleClass
The vehicle's class.
const SUMOReal DEFAULT_VEH_PROB
render as a delivery vehicle
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
const std::map< std::string, std::string > & getMap() const
Returns the inner key/value map.
SUMOReal width
This class' width.
const int VTYPEPARS_CAR_FOLLOW_MODEL
const int VTYPEPARS_OSGFILE_SET
const int VTYPEPARS_MAXSPEED_LAT_SET
const int VTYPEPARS_PROBABILITY_SET
vehicle is a (possibly fast moving) electric rail
std::string getVehicleShapeName(SUMOVehicleShape id)
Returns the class name of the shape class given by its id.
const int VTYPEPARS_LANE_CHANGE_MODEL_SET
vehicle is a large transport vehicle
static SUMOReal getDefaultImperfection(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default driver's imperfection (sigma or epsilon in Krauss' model) for the given vehicle c...
SUMOReal speedFactor
The factor by which the maximum speed may deviate from the allowed max speed on the street...
SUMOTime boardingDuration
The time a person needs to board the vehicle.
std::string osgFile
3D model file for this class
SUMOReal maxSpeedLat
The vehicle type's maximum lateral speed [m/s].
std::string imgFile
Image file for this class.
render as a (city) rail without locomotive
static std::string getName(const SUMOEmissionClass c)
Checks whether the string describes a known vehicle class.
render as a passenger vehicle
const int VTYPEPARS_SPEEDDEVIATION_SET
const int VTYPEPARS_LOADING_DURATION
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
const int VTYPEPARS_CONTAINER_CAPACITY
vehicle is a passenger car (a "normal" car)
bool onlyReferenced
Information whether this is a type-stub, being only referenced but not defined (needed by routers) ...
const int VTYPEPARS_SPEEDFACTOR_SET
void write(OutputDevice &dev) const
Writes the vtype.
SUMOReal maxSpeed
The vehicle type's maximum speed [m/s].
int personCapacity
The person capacity of the vehicle.
static SUMOReal getDefaultDecel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default deceleration for the given vehicle class This needs to be a function because the ...
SUMOReal impatience
The vehicle's impatience (willingness to obstruct others)
SUMOReal minGapLat
The vehicle type's minimum lateral gap [m].
render as a arbitrary ship
bool wasSet(int what) const
Returns whether the given parameter was set.
SUMOReal defaultProbability
The probability when being added to a distribution without an explicit probability.
const int VTYPEPARS_IMGFILE_SET
SubParams cfParameter
Car-following parameter.
SUMOTime loadingDuration
The time a container needs to get loaded on the vehicle.
vehicle is a large transport vehicle
const int VTYPEPARS_PERSON_CAPACITY
LateralAlignment latAlignment
The vehicles desired lateral alignment.
render as a (futuristic) e-vehicle
const int VTYPEPARS_HEIGHT_SET
Static storage of an output device and its base (abstract) implementation.
bool closeTag()
Closes the most recently opened tag.
static SUMOReal getDefaultAccel(const SUMOVehicleClass vc=SVC_IGNORING)
Returns the default acceleration for the given vehicle class This needs to be a function because the ...
const int VTYPEPARS_WIDTH_SET
LaneChangeModel lcModel
The lane-change model to use.
static const SUMOVTypeParameter & getDefault()
return the default parameters, this is a function due to the http://www.parashift.com/c++-faq/static-init-order.html
SUMOReal height
This class' height.
public emergency vehicles
const int VTYPEPARS_LENGTH_SET
const int VTYPEPARS_VEHICLECLASS_SET
const int VTYPEPARS_EMISSIONCLASS_SET
const int VTYPEPARS_COLOR_SET
render as a semi-trailer transport vehicle ("Sattelschlepper")
const int VTYPEPARS_SHAPE_SET
SubParams lcParameter
Lane-changing parameter.
SUMOEmissionClass emissionClass
The emission class of this vehicle.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
const int VTYPEPARS_IMPATIENCE_SET
Helper methods for PHEMlight-based emission computation.
SUMOReal minGap
This class' free space in front of the vehicle itself.