62 myCalibratorParent(calibratorParent), myVehicleTypeID(calibratorParent->generateVehicleTypeID()) {
93 double accel,
double decel,
double sigma,
double tau,
double length,
double minGap,
double maxSpeed,
94 double speedFactor,
double speedDev,
const RGBColor& color,
SUMOVehicleClass vClass,
const std::string& emissionClass,
95 SUMOVehicleShape shape,
double width,
const std::string& filename,
double impatience,
const std::string& laneChangeModel,
96 const std::string& carFollowModel,
int personCapacity,
int containerCapacity,
double boardingDuration,
97 double loadingDuration,
const std::string& latAlignment,
double minGapLat,
double maxSpeedLat) :
301 if (vehicleTypeID.empty()) {
325 if (GNEAttributeCarrier::canParse<double>(accel)) {
326 return setAccel(GNEAttributeCarrier::parse<double>(accel));
346 if (GNEAttributeCarrier::canParse<double>(decel)) {
347 return setDecel(GNEAttributeCarrier::parse<double>(decel));
367 if (GNEAttributeCarrier::canParse<double>(sigma)) {
368 return setSigma(GNEAttributeCarrier::parse<double>(sigma));
388 if (GNEAttributeCarrier::canParse<double>(tau)) {
389 return setTau(GNEAttributeCarrier::parse<double>(tau));
409 if (GNEAttributeCarrier::canParse<double>(length)) {
410 return setLength(GNEAttributeCarrier::parse<double>(length));
430 if (GNEAttributeCarrier::canParse<double>(minGap)) {
431 return setMinGap(GNEAttributeCarrier::parse<double>(minGap));
451 if (GNEAttributeCarrier::canParse<double>(maxSpeed)) {
452 return setMaxSpeed(GNEAttributeCarrier::parse<double>(maxSpeed));
461 if (speedFactor < 0) {
472 if (GNEAttributeCarrier::canParse<double>(speedFactor)) {
473 return setSpeedFactor(GNEAttributeCarrier::parse<double>(speedFactor));
493 if (GNEAttributeCarrier::canParse<double>(speedDev)) {
494 return setSpeedDev(GNEAttributeCarrier::parse<double>(speedDev));
508 if (GNEAttributeCarrier::canParse<RGBColor>(color)) {
509 return setColor(GNEAttributeCarrier::parse<RGBColor>(color));
570 if (GNEAttributeCarrier::canParse<double>(width)) {
571 return setWidth(GNEAttributeCarrier::parse<double>(width));
587 if (impatience < 0) {
598 if (GNEAttributeCarrier::canParse<double>(impatience)) {
599 return setImpatience(GNEAttributeCarrier::parse<double>(impatience));
622 if (personCapacity < 0) {
633 if (GNEAttributeCarrier::canParse<double>(personCapacity)) {
634 double personCapacityD = GNEAttributeCarrier::parse<double>(personCapacity);
636 if (fmod(personCapacityD, 1) == 0) {
649 if (containerCapacity < 0) {
660 if (GNEAttributeCarrier::canParse<double>(containerCapacity)) {
661 double containerCapacityD = GNEAttributeCarrier::parse<double>(containerCapacity);
663 if (fmod(containerCapacityD, 1) == 0) {
676 if (boardingDuration < 0) {
687 if (GNEAttributeCarrier::canParse<double>(boardingDuration)) {
697 if (loadingDuration < 0) {
708 if (GNEAttributeCarrier::canParse<double>(loadingDuration)) {
718 if ((latAlignment ==
"left") || (latAlignment ==
"right") || (latAlignment ==
"center") ||
719 (latAlignment ==
"compact") || (latAlignment ==
"nice") || (latAlignment ==
"arbitrary")) {
741 if (GNEAttributeCarrier::canParse<double>(minGapLat)) {
742 return setMinGapLat(GNEAttributeCarrier::parse<double>(minGapLat));
751 if (maxSpeedLat < 0) {
762 if (GNEAttributeCarrier::canParse<double>(maxSpeedLat)) {
763 return setMaxSpeedLat(GNEAttributeCarrier::parse<double>(maxSpeedLat));
SUMOVehicleClass getVehicleClassID(const std::string &name)
Returns the class id of the abstract class given by its name.
double myTau
Car-following model parameter.
double myMinGap
Empty space after leader [m].
double myMaxSpeedLat
The maximum lateral speed when using the sublane-model.
SumoXMLTag
Numbers representing SUMO-XML - element names.
bool setTau(double tau=1.0)
set tau
description of a vehicle type
std::string getVehicleTypeID() const
get VehicleTypeID
bool setDecel(double decel=4.5)
set decel
std::string getLatAlignment() const
get lateral lat
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
bool setLength(double length=5.0)
set length
double getWidth() const
get width
double getTau() const
get tau
bool setImpatience(double impatience=0.0)
set impatience
double getLoadingDuration() const
get loading duration
double getImpatience() const
get impatience
bool vehicleTypeExists(const std::string &vehicleTypeID) const
Check if exist a vehicle type with these ID.
bool setAccel(double accel=2.6)
set accel
double myImpatience
Willingess of drivers to impede vehicles with higher priority. See below for semantics.
bool setMinGapLat(double minGapLat=0.12)
set min gap lat
bool setEmissionClass(std::string emissionClass="P_7_7")
set emission class
bool setShape(std::string shape)
set shape (string version)
double getMinGapLat() const
get min gap lat
double myWidth
The vehicle's width [m] (only used for drawing)
double myAccel
The acceleration ability of vehicles of this type (in m/s^2)
SumoXMLTag getTag() const
get tag
bool setFilename(std::string filename="")
set filename
GNECalibrator * myCalibratorParent
pointer to calibrator parent
double myDecel
The deceleration ability of vehicles of this type (in m/s^2)
int getPersonCapacity() const
get person capacity
SUMOVehicleShape getShape() const
get shape
bool setMaxSpeed(double maxSpeed=70.0)
set max speed
std::string getLaneChangeModel() const
get lane change model
std::string myLatAlignment
The preferred lateral alignment when using the sublane-model. One of (left, right, center, compact, nice, arbitrary).
double myLength
The vehicle's netto-length (length) (in m)
double getDecel() const
get decel
std::string getFilename() const
get filename
bool canParseVehicleShape(const std::string &shape)
Checks whether the given string contains only known vehicle shape.
double mySigma
Car-following model parameter.
~GNECalibratorVehicleType()
destructor
double getLength() const
get length
double getMinGap() const
get min gap
std::string getEmissionClass() const
get emission class
std::string myCarFollowModel
The model used for car following.
bool setWidth(double width=2.0)
set width
std::string myVehicleTypeID
vehicleType ID
double getAccel() const
get accel
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
RGBColor myColor
This vehicle type's color.
int myPersonCapacity
The number of persons (excluding an autonomous driver) the vehicle can transport. ...
double mySpeedDev
The deviation of the speedFactor; see below for details.
bool setPersonCapacity(int personCapacity=4)
set person capacity
SUMOVehicleClass myVClass
An abstract vehicle class.
GNECalibratorVehicleType(GNECalibrator *calibratorParent)
constructor
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
SUMOVehicleShape myShape
How this vehicle is rendered.
std::string myEmissionClass
An abstract emission class.
bool setSigma(double sigma=0.5)
set sigma
std::string myFilename
Image file for rendering vehicles of this type (should be grayscale to allow functional coloring) ...
bool setSpeedDev(double speedDev=0.0)
set speed dev
double getBoardingDuration() const
get boarding duration
bool setBoardingDuration(double boardingDuration=0.5)
set boarding duration
bool setMaxSpeedLat(double maxSpeedLat=1.0)
set max speed lat
bool canParseVehicleClasses(const std::string &classes)
Checks whether the given string contains only known vehicle classes.
int getContainerCapacity() const
get container capacity
bool setLaneChangeModel(std::string laneChangeModel="LC2013")
set lane change model
double myBoardingDuration
The time required by a person to board the vehicle.
SUMOVehicleShape
Definition of vehicle classes to differ between different appearences.
bool setCarFollowModel(std::string carFollowModel="Krauss")
set car follow model
bool setMinGap(double minGap=2.5)
set min gap
bool setSpeedFactor(double speedFactor=1.0)
set speed factor
double getSpeedDev() const
get speed dev
GNENet * getNet() const
get the net object
SUMOVehicleClass getVClass() const
get VClass
const RGBColor & getColor() const
get color
double myLoadingDuration
The time required to load a container onto the vehicle.
double getMaxSpeed() const
get max speed
SUMOVehicleShape getVehicleShapeID(const std::string &name)
Returns the class id of the shape class given by its name.
bool setColor(const RGBColor &color)
set color
double getSigma() const
get sigma
std::string getCarFollowModel() const
get car follow model
double myMinGapLat
The minimum lateral gap at a speed difference of 100km/h when using the sublane-model.
bool setVClass(SUMOVehicleClass vClass=SVC_PRIVATE)
set VClass
double getSpeedFactor() const
get speed factor
bool setLoadingDuration(double loadingDuration=90.0)
set loading duration
bool setContainerCapacity(int containerCapacity=0)
set container capacity
double myMaxSpeed
The vehicle's maximum velocity (in m/s)
double mySpeedFactor
The vehicles expected multiplicator for lane speed limits.
std::string myLaneChangeModel
The model used for changing lanes.
int myContainerCapacity
The number of containers the vehicle can transport.
bool setVehicleTypeID(std::string vehicleTypeID)
set vehicleType ID
bool setLatAlignment(std::string latAlignment="center")
set lateral lat
bool operator==(const GNECalibratorVehicleType &calibratorVehicleType) const
overload operator ==
double getMaxSpeedLat() const
get max speed lat