SUMO - Simulation of Urban MObility
MSVehicleType Class Reference

The car-following model and parameter. More...

#include <MSVehicleType.h>

Collaboration diagram for MSVehicleType:
Collaboration graph

Public Member Functions

bool amVehicleSpecific () const
 Returns whether this type belongs to a single vehicle only (was modified) More...
 
const SUMOVTypeParametergetParameter () const
 
 MSVehicleType (const SUMOVTypeParameter &parameter)
 Constructor. More...
 
bool wasSet (int what) const
 Returns whether the given parameter was set. More...
 
virtual ~MSVehicleType ()
 Destructor. More...
 
Atomar getter for simulation
const std::string & getID () const
 Returns the name of the vehicle type. More...
 
int getNumericalID () const
 Returns the running index of the vehicle type. More...
 
double getLength () const
 Get vehicle's length [m]. More...
 
double getLengthWithGap () const
 Get vehicle's length including the minimum gap [m]. More...
 
double getMinGap () const
 Get the free space in front of vehicles of this class. More...
 
double getMinGapLat () const
 Get the minimum lateral gap that vehicles of this type maintain. More...
 
const MSCFModelgetCarFollowModel () const
 Returns the vehicle type's car following model definition (const version) More...
 
MSCFModelgetCarFollowModel ()
 Returns the vehicle type's car following model definition (non-const version) More...
 
LaneChangeModel getLaneChangeModel () const
 
double getMaxSpeed () const
 Get vehicle's maximum speed [m/s]. More...
 
double computeChosenSpeedDeviation (MTRand *rng, const double minDev=-1.) const
 Computes and returns the speed deviation. More...
 
double getDefaultProbability () const
 Get the default probability of this vehicle type. More...
 
SUMOVehicleClass getVehicleClass () const
 Get this vehicle type's vehicle class. More...
 
SUMOEmissionClass getEmissionClass () const
 Get this vehicle type's emission class. More...
 
const RGBColorgetColor () const
 Returns this type's color. More...
 
const Distribution_ParameterizedgetSpeedFactor () const
 Returns this type's speed factor. More...
 
double getImpatience () const
 Returns this type's impatience. More...
 
Atomar getter for visualization
double getWidth () const
 Get the width which vehicles of this class shall have when being drawn. More...
 
double getHeight () const
 Get the height which vehicles of this class shall have when being drawn. More...
 
SUMOVehicleShape getGuiShape () const
 Get this vehicle type's shape. More...
 
std::string getOSGFile () const
 Get this vehicle type's 3D model file name. More...
 
std::string getImgFile () const
 Get this vehicle type's raster model file name. More...
 
int getPersonCapacity () const
 Get this vehicle type's person capacity. More...
 
int getContainerCapacity () const
 Get this vehicle type's container capacity. More...
 
SUMOTime getBoardingDuration () const
 Get this vehicle type's boarding duration. More...
 
SUMOTime getLoadingDuration () const
 Get this vehicle type's loading duration. More...
 
double getMaxSpeedLat () const
 Get vehicle's maximum lateral speed [m/s]. More...
 
LateralAlignment getPreferredLateralAlignment () const
 Get vehicle's preferred lateral alignment. More...
 
Setter methods
void setLength (const double &length)
 Set a new value for this type's length. More...
 
void setHeight (const double &height)
 Set a new value for this type's height. More...
 
void setMinGap (const double &minGap)
 Set a new value for this type's minimum gap. More...
 
void setMinGapLat (const double &minGapLat)
 Set a new value for this type's minimum lataral gap. More...
 
void setMaxSpeed (const double &maxSpeed)
 Set a new value for this type's maximum speed. More...
 
void setMaxSpeedLat (const double &maxSpeedLat)
 Set a new value for this type's maximum lateral speed. More...
 
void setVClass (SUMOVehicleClass vclass)
 Set a new value for this type's vehicle class. More...
 
void setDefaultProbability (const double &prob)
 Set a new value for this type's default probability. More...
 
void setSpeedFactor (const double &factor)
 Set a new value for this type's speed factor. More...
 
void setSpeedDeviation (const double &dev)
 Set a new value for this type's speed deviation. More...
 
void setEmissionClass (SUMOEmissionClass eclass)
 Set a new value for this type's emission class. More...
 
void setColor (const RGBColor &color)
 Set a new value for this type's color. More...
 
void setWidth (const double &width)
 Set a new value for this type's width. More...
 
void setShape (SUMOVehicleShape shape)
 Set a new value for this type's shape. More...
 
void setImpatience (const double impatience)
 Set a new value for this type's impatience. More...
 
void setPreferredLateralAlignment (LateralAlignment latAlignment)
 Set vehicle's preferred lateral alignment. More...
 

Static Public Member Functions

Static methods for building vehicle types
static MSVehicleTypebuild (SUMOVTypeParameter &from)
 Builds the microsim vehicle type described by the given parameter. More...
 
static MSVehicleTypebuildSingularType (const std::string &id, const MSVehicleType *from)
 Duplicates the microsim vehicle type giving it a the given id. More...
 

Private Member Functions

 MSVehicleType (const MSVehicleType &)
 Invalidated copy constructor. More...
 
MSVehicleTypeoperator= (const MSVehicleType &)
 Invalidated assignment operator. More...
 

Private Attributes

MSCFModelmyCarFollowModel
 instance of the car following model. More...
 
const int myIndex
 the running index More...
 
const MSVehicleTypemyOriginalType
 The original type. More...
 
SUMOVTypeParameter myParameter
 the parameter container More...
 

Static Private Attributes

static int myNextIndex = 0
 next value for the running index More...
 

Detailed Description

The car-following model and parameter.

MSVehicleType stores the parameter of a single vehicle type and methods that use these for computing the vehicle's car-following behavior

It is assumed that within the simulation many vehicles are using the same vehicle type, quite common is using only one vehicle type for all vehicles.

You can think of it like of having a vehicle type for each VW Golf or Ford Mustang in your simulation while the car instances just refer to it.

Definition at line 74 of file MSVehicleType.h.

Constructor & Destructor Documentation

◆ MSVehicleType() [1/2]

MSVehicleType::MSVehicleType ( const SUMOVTypeParameter parameter)

Constructor.

Parameters
[in]parameterThe vehicle type's parameter

Definition at line 64 of file MSVehicleType.cpp.

References getLength(), and getMaxSpeed().

Referenced by build(), and buildSingularType().

◆ ~MSVehicleType()

MSVehicleType::~MSVehicleType ( )
virtual

Destructor.

Definition at line 71 of file MSVehicleType.cpp.

References myCarFollowModel.

◆ MSVehicleType() [2/2]

MSVehicleType::MSVehicleType ( const MSVehicleType )
private

Invalidated copy constructor.

Member Function Documentation

◆ amVehicleSpecific()

bool MSVehicleType::amVehicleSpecific ( ) const
inline

Returns whether this type belongs to a single vehicle only (was modified)

Returns
Whether this vehicle type is based on a differen one, and belongs to one vehicle only

Definition at line 478 of file MSVehicleType.h.

References myOriginalType.

Referenced by MSVehicle::~MSVehicle().

◆ build()

MSVehicleType * MSVehicleType::build ( SUMOVTypeParameter from)
static

◆ buildSingularType()

MSVehicleType * MSVehicleType::buildSingularType ( const std::string &  id,
const MSVehicleType from 
)
static

Duplicates the microsim vehicle type giving it a the given id.

Parameters
[in]idThe new id of the type
[in]fromThe vehicle type
Returns
The built vehicle type

Definition at line 304 of file MSVehicleType.cpp.

References MSCFModel::duplicate(), getID(), MSNet::getInstance(), MSNet::getVehicleControl(), SUMOVTypeParameter::id, MSVehicleType(), myCarFollowModel, myOriginalType, myParameter, and MSVehicleControl::removeVType().

Referenced by getPreferredLateralAlignment(), TraCIServerAPI_Vehicle::getSingularType(), and TraCIServerAPI_Person::getSingularType().

◆ computeChosenSpeedDeviation()

double MSVehicleType::computeChosenSpeedDeviation ( MTRand rng,
const double  minDev = -1. 
) const

◆ getBoardingDuration()

SUMOTime MSVehicleType::getBoardingDuration ( ) const
inline

Get this vehicle type's boarding duration.

Returns
The time a person needs to board a vehicle of this type

Definition at line 292 of file MSVehicleType.h.

References SUMOVTypeParameter::boardingDuration, and myParameter.

Referenced by MSTransportableControl::boardAnyWaiting(), and GUIVehicle::getTypeParameterWindow().

◆ getCarFollowModel() [1/2]

◆ getCarFollowModel() [2/2]

MSCFModel& MSVehicleType::getCarFollowModel ( )
inline

Returns the vehicle type's car following model definition (non-const version)

Returns
The vehicle type's car following model definition

Definition at line 157 of file MSVehicleType.h.

References myCarFollowModel.

◆ getColor()

const RGBColor& MSVehicleType::getColor ( ) const
inline

Returns this type's color.

Returns
The color of this type

Definition at line 210 of file MSVehicleType.h.

References SUMOVTypeParameter::color, and myParameter.

Referenced by TraCI_VehicleType::getColor(), and GUIBaseVehicle::setFunctionalColor().

◆ getContainerCapacity()

int MSVehicleType::getContainerCapacity ( ) const
inline

Get this vehicle type's container capacity.

Returns
The container capacity of this vehicle type

Definition at line 285 of file MSVehicleType.h.

References SUMOVTypeParameter::containerCapacity, and myParameter.

Referenced by GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), and MSTransportableControl::loadAnyWaiting().

◆ getDefaultProbability()

double MSVehicleType::getDefaultProbability ( ) const
inline

Get the default probability of this vehicle type.

Returns
The probability to use this type

Definition at line 184 of file MSVehicleType.h.

References SUMOVTypeParameter::defaultProbability, and myParameter.

Referenced by MSRouteHandler::myEndElement(), MSRouteHandler::openVehicleTypeDistribution(), and setDefaultProbability().

◆ getEmissionClass()

◆ getGuiShape()

SUMOVehicleShape MSVehicleType::getGuiShape ( ) const
inline

Get this vehicle type's shape.

Returns
The shape of this vehicle type
See also
SUMOVehicleShape

Definition at line 254 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::shape.

Referenced by GUIBaseVehicle::drawAction_drawVehicleAsPoly(), MSVehicle::getBoundingPoly(), and TraCI_VehicleType::getShapeClass().

◆ getHeight()

double MSVehicleType::getHeight ( ) const
inline

Get the height which vehicles of this class shall have when being drawn.

Returns
The height of this type's vehicles

Definition at line 246 of file MSVehicleType.h.

References SUMOVTypeParameter::height, and myParameter.

Referenced by TraCI_VehicleType::getHeight(), GUIPerson::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), and setHeight().

◆ getID()

◆ getImgFile()

std::string MSVehicleType::getImgFile ( ) const
inline

Get this vehicle type's raster model file name.

Returns
The raster file name of this vehicle type

Definition at line 269 of file MSVehicleType.h.

References SUMOVTypeParameter::imgFile, and myParameter.

Referenced by GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), and GUIBaseVehicle::drawAction_drawVehicleAsImage().

◆ getImpatience()

double MSVehicleType::getImpatience ( ) const
inline

Returns this type's impatience.

Returns
The impatience of this type

Definition at line 226 of file MSVehicleType.h.

References SUMOVTypeParameter::impatience, and myParameter.

Referenced by MSPModel_Striping::PState::getImpatience(), and setImpatience().

◆ getLaneChangeModel()

LaneChangeModel MSVehicleType::getLaneChangeModel ( ) const
inline

Definition at line 162 of file MSVehicleType.h.

References SUMOVTypeParameter::lcModel, and myParameter.

Referenced by MSVehicle::MSVehicle().

◆ getLength()

double MSVehicleType::getLength ( ) const
inline

Get vehicle's length [m].

Returns
The length vehicles of this type have in m

Definition at line 118 of file MSVehicleType.h.

References SUMOVTypeParameter::length, and myParameter.

Referenced by MSCFModel_Wiedemann::_v(), MSVehicle::addStop(), MSStoppingPlace::addTransportable(), MSLane::basePos(), MSVehicle::checkRewindLinkLanes(), MSInductLoop::collectVehiclesOnDet(), MSLaneChanger::computeOvertakingTime(), GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), GUIVehicle::drawAction_drawLinkItems(), GUIVehicle::drawAction_drawRailCarriages(), GUIBaseVehicle::drawAction_drawVehicleAsImage(), GUIBaseVehicle::drawAction_drawVehicleAsPoly(), GUIBaseVehicle::drawAction_drawVehicleAsTrianglePlus(), GUIBaseVehicle::drawOnPos(), MSLane::enteredByLaneChange(), MSVehicle::enterLaneAtInsertion(), MSVehicle::enterLaneAtLaneChange(), MSVehicle::executeMove(), MSLane::executeMovements(), MSLane::freeInsertion(), MSVehicle::getBackPosition(), MEVehicle::getBackPositionOnLane(), MSVehicle::getBackPositionOnLane(), MSLane::getBruttoOccupancy(), GUIBaseVehicle::getCenteringBoundary(), MSLane::getCriticalLeader(), MSEdge::getDepartPosBound(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), TraCI_VehicleType::getLength(), MSPModel_Striping::PState::getLength(), MSLane::getNettoOccupancy(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSVehicle::getPositionOnLane(), MSLaneChanger::getRealFollower(), GUIPerson::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), MSLink::getZipperSpeed(), MSLane::handleCollisionBetween(), MSLane::incorporateVehicle(), MSLCM_SL2015::informFollower(), MSLCM_SL2015::informLeader(), MSLane::integrateNewVehicle(), MSLane::isInsertionSuccess(), MSLCM_SL2015::keepLatGap(), MSInductLoop::leaveDetectorByMove(), MSLane::leftByLaneChange(), MSE2Collector::makeVehicleInfo(), MSVehicleType(), MSInstantInductLoop::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSInductLoop::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), MSE2Collector::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), MSLCM_LC2013::overtakeDistance(), MSVehicle::planMoveInternal(), MSVehicle::processNextStop(), MSStoppingPlace::removeTransportable(), MSLane::removeVehicle(), GUIVehicle::selectBlockingFoes(), MSLink::setApproaching(), setLength(), MSVehicle::setTentativeLaneAndPosition(), MSLaneChangerSublane::startChangeSublane(), MSVehicle::unsafeLinkAhead(), MSVehicle::updateFurtherLanes(), MSInstantInductLoop::write(), and MSQueueExport::writeLane().

◆ getLengthWithGap()

◆ getLoadingDuration()

SUMOTime MSVehicleType::getLoadingDuration ( ) const
inline

Get this vehicle type's loading duration.

Returns
The time a container needs to get laoded on a vehicle of this type

Definition at line 299 of file MSVehicleType.h.

References SUMOVTypeParameter::loadingDuration, and myParameter.

Referenced by GUIVehicle::getTypeParameterWindow(), and MSTransportableControl::loadAnyWaiting().

◆ getMaxSpeed()

◆ getMaxSpeedLat()

double MSVehicleType::getMaxSpeedLat ( ) const
inline

Get vehicle's maximum lateral speed [m/s].

Returns
The maximum lateral speed (in m/s) of vehicles of this class

Definition at line 306 of file MSVehicleType.h.

References SUMOVTypeParameter::maxSpeedLat, and myParameter.

Referenced by MSLCM_SL2015::checkBlocking(), TraCI_VehicleType::getMaxSpeedLat(), GUIVehicle::getTypeParameterWindow(), and setMaxSpeedLat().

◆ getMinGap()

double MSVehicleType::getMinGap ( ) const
inline

◆ getMinGapLat()

double MSVehicleType::getMinGapLat ( ) const
inline

Get the minimum lateral gap that vehicles of this type maintain.

Returns
The place before the vehicle

Definition at line 141 of file MSVehicleType.h.

References SUMOVTypeParameter::minGapLat, and myParameter.

Referenced by TraCI_VehicleType::getMinGapLat(), GUIVehicle::getTypeParameterWindow(), setMinGapLat(), and MSLCM_SL2015::updateGaps().

◆ getNumericalID()

int MSVehicleType::getNumericalID ( ) const
inline

Returns the running index of the vehicle type.

Returns
This type's numerical id

Definition at line 110 of file MSVehicleType.h.

References myIndex.

Referenced by MSAmitranTrajectories::writeVehicle().

◆ getOSGFile()

std::string MSVehicleType::getOSGFile ( ) const
inline

Get this vehicle type's 3D model file name.

Returns
The model file name of this vehicle type

Definition at line 261 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::osgFile.

◆ getParameter()

◆ getPersonCapacity()

int MSVehicleType::getPersonCapacity ( ) const
inline

Get this vehicle type's person capacity.

Returns
The person capacity of this vehicle type

Definition at line 277 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::personCapacity.

Referenced by MSTransportableControl::boardAnyWaiting(), GUIMEVehicle::getTypeParameterWindow(), and GUIVehicle::getTypeParameterWindow().

◆ getPreferredLateralAlignment()

◆ getSpeedFactor()

const Distribution_Parameterized& MSVehicleType::getSpeedFactor ( ) const
inline

Returns this type's speed factor.

Returns
The speed factor of this type

Definition at line 218 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::speedFactor.

Referenced by TraCI_VehicleType::getSpeedDeviation(), TraCI_VehicleType::getSpeedFactor(), and MSEdge::insertVehicle().

◆ getVehicleClass()

◆ getWidth()

◆ operator=()

MSVehicleType& MSVehicleType::operator= ( const MSVehicleType )
private

Invalidated assignment operator.

◆ setColor()

void MSVehicleType::setColor ( const RGBColor color)

Set a new value for this type's color.

Parameters
[in]colorThe new color of this type

Definition at line 191 of file MSVehicleType.cpp.

References SUMOVTypeParameter::color, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setColor().

◆ setDefaultProbability()

void MSVehicleType::setDefaultProbability ( const double &  prob)

Set a new value for this type's default probability.

If the given value<0 then the one from the original type will be used.

Parameters
[in]probThe new default probability of this type

Definition at line 155 of file MSVehicleType.cpp.

References SUMOVTypeParameter::defaultProbability, getDefaultProbability(), myOriginalType, and myParameter.

Referenced by getPreferredLateralAlignment().

◆ setEmissionClass()

void MSVehicleType::setEmissionClass ( SUMOEmissionClass  eclass)

Set a new value for this type's emission class.

Parameters
[in]eclassThe new emission class of this type

Definition at line 185 of file MSVehicleType.cpp.

References SUMOVTypeParameter::emissionClass, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setEmissionClass().

◆ setHeight()

void MSVehicleType::setHeight ( const double &  height)

Set a new value for this type's height.

If the given value<0 then the one from the original type will be used.

Parameters
[in]heightThe new height of this type

Definition at line 94 of file MSVehicleType.cpp.

References getHeight(), SUMOVTypeParameter::height, myOriginalType, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setHeight().

◆ setImpatience()

void MSVehicleType::setImpatience ( const double  impatience)

Set a new value for this type's impatience.

Parameters
[in]impatienceThe new impatience of this type

Definition at line 207 of file MSVehicleType.cpp.

References getImpatience(), SUMOVTypeParameter::impatience, myOriginalType, and myParameter.

Referenced by getPreferredLateralAlignment().

◆ setLength()

void MSVehicleType::setLength ( const double &  length)

Set a new value for this type's length.

If the given value<0 then the one from the original type will be used.

Parameters
[in]lengthThe new length of this type

Definition at line 84 of file MSVehicleType.cpp.

References getLength(), SUMOVTypeParameter::length, myOriginalType, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setLength().

◆ setMaxSpeed()

void MSVehicleType::setMaxSpeed ( const double &  maxSpeed)

Set a new value for this type's maximum speed.

If the given value<0 then the one from the original type will be used.

Parameters
[in]maxSpeedThe new maximum speed of this type

Definition at line 124 of file MSVehicleType.cpp.

References getMaxSpeed(), SUMOVTypeParameter::maxSpeed, myOriginalType, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setMaxSpeed().

◆ setMaxSpeedLat()

void MSVehicleType::setMaxSpeedLat ( const double &  maxSpeedLat)

Set a new value for this type's maximum lateral speed.

If the given value<0 then the one from the original type will be used.

Parameters
[in]maxSpeedLatThe new maximum lateral speed of this type

Definition at line 134 of file MSVehicleType.cpp.

References getMaxSpeedLat(), SUMOVTypeParameter::maxSpeedLat, myOriginalType, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setMaxSpeedLat().

◆ setMinGap()

void MSVehicleType::setMinGap ( const double &  minGap)

Set a new value for this type's minimum gap.

If the given value<0 then the one from the original type will be used.

Parameters
[in]minGapThe new minimum gap of this type

Definition at line 104 of file MSVehicleType.cpp.

References getMinGap(), SUMOVTypeParameter::minGap, myOriginalType, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setMinGap().

◆ setMinGapLat()

void MSVehicleType::setMinGapLat ( const double &  minGapLat)

Set a new value for this type's minimum lataral gap.

If the given value<0 then the one from the original type will be used.

Parameters
[in]minGapLatThe new minimum lateral gap of this type

Definition at line 114 of file MSVehicleType.cpp.

References getMinGapLat(), SUMOVTypeParameter::minGapLat, myOriginalType, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setMinGapLat().

◆ setPreferredLateralAlignment()

void MSVehicleType::setPreferredLateralAlignment ( LateralAlignment  latAlignment)

Set vehicle's preferred lateral alignment.

Definition at line 149 of file MSVehicleType.cpp.

References SUMOVTypeParameter::latAlignment, and myParameter.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setLateralAlignment().

◆ setShape()

void MSVehicleType::setShape ( SUMOVehicleShape  shape)

Set a new value for this type's shape.

Parameters
[in]shapeThe new shape of this type

Definition at line 217 of file MSVehicleType.cpp.

References myParameter, and SUMOVTypeParameter::shape.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setShapeClass().

◆ setSpeedDeviation()

void MSVehicleType::setSpeedDeviation ( const double &  dev)

Set a new value for this type's speed deviation.

If the given value<0 then the one from the original type will be used.

Parameters
[in]devThe new speed deviation of this type

Definition at line 175 of file MSVehicleType.cpp.

References Distribution_Parameterized::getParameter(), myOriginalType, myParameter, and SUMOVTypeParameter::speedFactor.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setSpeedDeviation().

◆ setSpeedFactor()

void MSVehicleType::setSpeedFactor ( const double &  factor)

Set a new value for this type's speed factor.

If the given value<0 then the one from the original type will be used.

Parameters
[in]factorThe new speed factor of this type

Definition at line 165 of file MSVehicleType.cpp.

References Distribution_Parameterized::getParameter(), myOriginalType, myParameter, and SUMOVTypeParameter::speedFactor.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setSpeedFactor().

◆ setVClass()

void MSVehicleType::setVClass ( SUMOVehicleClass  vclass)

Set a new value for this type's vehicle class.

Parameters
[in]vclassThe new vehicle class of this type

Definition at line 144 of file MSVehicleType.cpp.

References myParameter, and SUMOVTypeParameter::vehicleClass.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setVehicleClass().

◆ setWidth()

void MSVehicleType::setWidth ( const double &  width)

Set a new value for this type's width.

If the given value<0 then the one from the original type will be used.

Parameters
[in]widthThe new width of this type

Definition at line 197 of file MSVehicleType.cpp.

References getWidth(), myOriginalType, myParameter, and SUMOVTypeParameter::width.

Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setWidth().

◆ wasSet()

bool MSVehicleType::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 91 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::setParameter.

Referenced by MSRouteHandler::myStartElement(), and GUIBaseVehicle::setFunctionalColor().

Field Documentation

◆ myCarFollowModel

MSCFModel* MSVehicleType::myCarFollowModel
private

instance of the car following model.

Definition at line 496 of file MSVehicleType.h.

Referenced by build(), buildSingularType(), getCarFollowModel(), and ~MSVehicleType().

◆ myIndex

const int MSVehicleType::myIndex
private

the running index

Definition at line 493 of file MSVehicleType.h.

Referenced by getNumericalID().

◆ myNextIndex

int MSVehicleType::myNextIndex = 0
staticprivate

next value for the running index

Definition at line 502 of file MSVehicleType.h.

◆ myOriginalType

◆ myParameter


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