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 std::string& 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));
562 if (GNEAttributeCarrier::canParse<double>(width)) {
563 return setWidth(GNEAttributeCarrier::parse<double>(width));
579 if (impatience < 0) {
590 if (GNEAttributeCarrier::canParse<double>(impatience)) {
591 return setImpatience(GNEAttributeCarrier::parse<double>(impatience));
614 if (personCapacity < 0) {
625 if (GNEAttributeCarrier::canParse<double>(personCapacity)) {
626 double personCapacityD = GNEAttributeCarrier::parse<double>(personCapacity);
628 if (fmod(personCapacityD, 1) == 0) {
641 if (containerCapacity < 0) {
652 if (GNEAttributeCarrier::canParse<double>(containerCapacity)) {
653 double containerCapacityD = GNEAttributeCarrier::parse<double>(containerCapacity);
655 if (fmod(containerCapacityD, 1) == 0) {
668 if (boardingDuration < 0) {
679 if (GNEAttributeCarrier::canParse<double>(boardingDuration)) {
689 if (loadingDuration < 0) {
700 if (GNEAttributeCarrier::canParse<double>(loadingDuration)) {
710 if ((latAlignment ==
"left") || (latAlignment ==
"right") || (latAlignment ==
"center") ||
711 (latAlignment ==
"compact") || (latAlignment ==
"nice") || (latAlignment ==
"arbitrary")) {
733 if (GNEAttributeCarrier::canParse<double>(minGapLat)) {
734 return setMinGapLat(GNEAttributeCarrier::parse<double>(minGapLat));
743 if (maxSpeedLat < 0) {
754 if (GNEAttributeCarrier::canParse<double>(maxSpeedLat)) {
755 return setMaxSpeedLat(GNEAttributeCarrier::parse<double>(maxSpeedLat));
SUMOVehicleClass getVehicleClassID(const std::string &name)
Returns the class id of the abstract class given by its name.
SUMOVehicleShape getShape() const
get shape
double myTau
Car-following model parameter.
double getMinGapLat() const
get min gap lat
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.
SUMOVehicleClass getVClass() const
get VClass
bool setTau(double tau=1.0)
set tau
description of a vehicle type
bool setDecel(double decel=4.5)
set decel
double getTau() const
get tau
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
std::string getLatAlignment() const
get lateral lat
bool setLength(double length=5.0)
set length
double getWidth() const
get width
bool setImpatience(double impatience=0.0)
set impatience
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
double getSigma() const
get sigma
bool setShape(std::string shape)
set shape (string version)
bool vehicleTypeExists(const std::string &vehicleTypeID) const
Check if exist a vehicle type with these ID.
std::string getEmissionClass() const
get emission class
bool operator==(const GNECalibratorVehicleType &calibratorVehicleType) const
overload operator ==
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)
double getLoadingDuration() const
get loading duration
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)
bool setMaxSpeed(double maxSpeed=70.0)
set max speed
double getSpeedDev() const
get speed dev
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 getMaxSpeed() const
get max speed
bool canParseVehicleShape(const std::string &shape)
Checks whether the given string contains only known vehicle shape.
double mySigma
Car-following model parameter.
~GNECalibratorVehicleType()
destructor
std::string getCarFollowModel() const
get car follow model
std::string myCarFollowModel
The model used for car following.
bool setWidth(double width=2.0)
set width
std::string myVehicleTypeID
vehicleType ID
std::string getVehicleTypeID() const
get VehicleTypeID
std::string getColor() const
get 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.
int getPersonCapacity() const
get person capacity
double getDecel() const
get decel
bool setPersonCapacity(int personCapacity=4)
set person capacity
double getSpeedFactor() const
get speed factor
SUMOVehicleClass myVClass
An abstract vehicle class.
GNECalibratorVehicleType(GNECalibrator *calibratorParent)
constructor
double getImpatience() const
get impatience
SUMOVehicleShape myShape
How this vehicle is rendered.
std::string getFilename() const
get filename
std::string myEmissionClass
An abstract emission class.
double getMinGap() const
get min gap
bool setSigma(double sigma=0.5)
set sigma
double getBoardingDuration() const
get boarding duration
std::string myFilename
Image file for rendering vehicles of this type (should be grayscale to allow functional coloring) ...
double getLength() const
get length
bool setSpeedDev(double speedDev=0.0)
set speed dev
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.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
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
GNENet * getNet() const
get the net object
GNECalibrator * getCalibratorParent() const
get pointer to calibrator parent
double myLoadingDuration
The time required to load a container onto the vehicle.
SUMOVehicleShape getVehicleShapeID(const std::string &name)
Returns the class id of the shape class given by its name.
std::string myColor
This vehicle type's color.
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
int getContainerCapacity() const
get container capacity
bool setColor(std::string color="1,1,0")
set color
double getAccel() const
get accel
bool setLoadingDuration(double loadingDuration=90.0)
set loading duration
SumoXMLTag getTag() const
get tag
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
double getMaxSpeedLat() const
get max speed lat