Eclipse SUMO - Simulation of Urban MObility
MSVehicleType Class Reference

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

#include <MSVehicleType.h>

Collaboration diagram for MSVehicleType:
[legend]

Public Member Functions

void check ()
 Checks whether vehicle type parameters may be problematic (Currently, only the value for the action step length is compared with the value for the desired headway time.) More...
 
const EnergyParamsgetEmissionParameters () const
 retrieve parameters for the energy consumption model More...
 
const std::string & getOriginalID () const
 Returns the id of the original vehicle type if this is a vehicle specific type, the id otherwise. More...
 
const SUMOVTypeParametergetParameter () const
 
bool isVehicleSpecific () const
 Returns whether this type belongs to a single vehicle only (was modified) More...
 
 MSVehicleType (const SUMOVTypeParameter &parameter)
 Constructor. More...
 
bool wasSet (long long 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 (technical) maximum speed [m/s]. More...
 
double getDesiredMaxSpeed () const
 Returns the vehicles's desired maximum speed. More...
 
double computeChosenSpeedDeviation (SumoRNG *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...
 
double getMass () const
 Get this vehicle type's mass. More...
 
const RGBColorgetColor () const
 Returns this type's color. More...
 
const std::vector< std::string > & getParkingBadges () const
 Returns the parking access rights of this type. More...
 
const Distribution_ParameterizedgetSpeedFactor () const
 Returns this type's speed factor. More...
 
SUMOTime getActionStepLength () const
 Returns this type's default action step length. More...
 
double getActionStepLengthSecs () const
 Returns this type's default action step length in seconds. 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 getSeatingWidth () const
 Get the width of the passenger compartment 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 getLoadingDuration (const bool isPerson) const
 Get this vehicle type's loading duration. More...
 
SUMOTime getBoardingDuration (const bool isPerson) const
 Get this vehicle type's boarding duration. More...
 
double getMaxSpeedLat () const
 Get vehicle's maximum lateral speed [m/s]. More...
 
const LatAlignmentDefinitiongetPreferredLateralAlignment () const
 Get vehicle's preferred lateral alignment procedure. More...
 
double getPreferredLateralAlignmentOffset () const
 Get vehicle's preferred lateral alignment offset (in m from center line) More...
 
double getFrontSeatPos () const
 Get offset of first seat from vehicle front. More...
 
Setter methods
void setAccel (double accel)
 Set a new value for this type's acceleration. More...
 
void setDecel (double decel)
 Set a new value for this type's deceleration. More...
 
void setEmergencyDecel (double emergencyDecel)
 Set a new value for this type's emergency deceleration. More...
 
void setApparentDecel (double apparentDecel)
 Set a new value for this type's apparent deceleration. More...
 
void setImperfection (double imperfection)
 Set a new value for this type's imperfection. More...
 
void setTau (double tau)
 Set a new value for this type's headway. More...
 
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 setActionStepLength (const SUMOTime actionStepLength, bool resetActionOffset)
 Set a new value for this type's action step length. More...
 
void setEmissionClass (SUMOEmissionClass eclass)
 Set a new value for this type's emission class. More...
 
void setMass (double mass)
 Set a new value for this type's mass. More...
 
void setColor (const RGBColor &color)
 Set a new value for this type's color. More...
 
void setParkingBadges (const std::vector< std::string > &badges)
 Set a new value for parking access rights of this type. 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 setBoardingDuration (SUMOTime duration, bool isPerson=true)
 Set a new value for this type's boardingDuration. More...
 
void setImpatience (const double impatience)
 Set a new value for this type's impatience. More...
 
void setPreferredLateralAlignment (const LatAlignmentDefinition &latAlignment, double latAlignmentOffset=0.0)
 Set vehicle's preferred lateral alignment. More...
 
void setScale (double value)
 Set traffic scaling factor. More...
 

Private Member Functions

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

Private Attributes

double myCachedActionStepLengthSecs
 the vtypes actionsStepLength in seconds (cached because needed very often) More...
 
MSCFModelmyCarFollowModel
 instance of the car following model. More...
 
const EnergyParams myEnergyParams
 
const int myIndex
 the running index More...
 
const MSVehicleTypemyOriginalType
 The original type. More...
 
SUMOVTypeParameter myParameter
 the parameter container More...
 
bool myWarnedActionStepLengthBallisticOnce
 
bool myWarnedActionStepLengthTauOnce
 Indicator whether the user was already warned once about an action step length larger than the desired time headway. More...
 
bool myWarnedStepLengthTauOnce
 

Static Private Attributes

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

methods for building vehicle types

SUMOTime getEntryManoeuvreTime (const int angle) const
 Accessor function for parameter equivalent returning entry time for a specific manoeuver angle. More...
 
SUMOTime getExitManoeuvreTime (const int angle) const
 Accessor function for parameter equivalent returning exit time for a specific manoeuver angle. More...
 
MSVehicleTypebuildSingularType (const std::string &id) const
 Duplicates the microsim vehicle type giving the newly created type the given id, marking it as vehicle specific. More...
 
MSVehicleTypeduplicateType (const std::string &id, bool persistent) const
 Duplicates the microsim vehicle type giving the newly created type the given id. More...
 
static MSVehicleTypebuild (SUMOVTypeParameter &from)
 Builds the microsim vehicle type described by the given parameter. 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 63 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 63 of file MSVehicleType.cpp.

References SUMOVTypeParameter::actionStepLength, MSGlobals::gActionStepLength, getLength(), getMaxSpeed(), myCachedActionStepLengthSecs, myParameter, STEPS2TIME, VTYPEPARS_ACTIONSTEPLENGTH_SET, and SUMOVTypeParameter::wasSet().

Referenced by build(), and duplicateType().

Here is the caller graph for this function:

◆ ~MSVehicleType()

MSVehicleType::~MSVehicleType ( )
virtual

Destructor.

Definition at line 83 of file MSVehicleType.cpp.

References myCarFollowModel.

◆ MSVehicleType() [2/2]

MSVehicleType::MSVehicleType ( const MSVehicleType )
privatedelete

Invalidated copy constructor.

Member Function Documentation

◆ build()

MSVehicleType * MSVehicleType::build ( SUMOVTypeParameter from)
static

◆ buildSingularType()

MSVehicleType * MSVehicleType::buildSingularType ( const std::string &  id) const

Duplicates the microsim vehicle type giving the newly created type the given id, marking it as vehicle specific.

Parameters
[in]idThe new id of the type
Returns
The built vehicle type
Note
This method is used in case that a vType is meant to be used only for a specific vehicle The created vType will be removed with the vehicle or if it is assigned a new type.

Definition at line 413 of file MSVehicleType.cpp.

References duplicateType().

Referenced by MSBaseVehicle::getSingularType(), and MSTransportable::getSingularType().

Here is the caller graph for this function:

◆ check()

◆ computeChosenSpeedDeviation()

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

Computes and returns the speed deviation.

Returns
A new, random speed deviation

Definition at line 89 of file MSVehicleType.cpp.

References gPrecisionRandom, MAX2(), myParameter, roundDecimal(), Distribution_Parameterized::sample(), and SUMOVTypeParameter::speedFactor.

Referenced by GUITransportableControl::buildPerson(), MSTransportableControl::buildPerson(), MSVehicleControl::buildVehicle(), GUIVehicleControl::buildVehicle(), GUIMEVehicleControl::buildVehicle(), MEVehicleControl::buildVehicle(), and MSEdge::validateDepartSpeed().

Here is the caller graph for this function:

◆ duplicateType()

MSVehicleType * MSVehicleType::duplicateType ( const std::string &  id,
bool  persistent 
) const

Duplicates the microsim vehicle type giving the newly created type the given id.

Parameters
[in]idThe new id of the type
[in]persistentIf true the created vType will be persistent and can be used by several vehicles, otherwise it may be removed before simulation end,
See also
buildSingularType()
Returns
The built vehicle type

Definition at line 419 of file MSVehicleType.cpp.

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

Referenced by buildSingularType().

Here is the caller graph for this function:

◆ getActionStepLength()

SUMOTime MSVehicleType::getActionStepLength ( ) const
inline

Returns this type's default action step length.

Returns
The default action step length of this type (in ms.)

Definition at line 238 of file MSVehicleType.h.

References SUMOVTypeParameter::actionStepLength, and myParameter.

Referenced by MSVehicle::getActionStepLength().

Here is the caller graph for this function:

◆ getActionStepLengthSecs()

double MSVehicleType::getActionStepLengthSecs ( ) const
inline

Returns this type's default action step length in seconds.

Returns
The default action step length of this type (in s.)

Definition at line 246 of file MSVehicleType.h.

References myCachedActionStepLengthSecs.

Referenced by MSVehicle::getActionStepLengthSecs(), and GUIVehicle::getTypeParameterWindow().

Here is the caller graph for this function:

◆ getBoardingDuration()

SUMOTime MSVehicleType::getBoardingDuration ( const bool  isPerson) const
inline

Get this vehicle type's boarding duration.

Returns
The time a container / person needs to get loaded on a vehicle of this type

Definition at line 334 of file MSVehicleType.h.

References SUMOVTypeParameter::boardingDuration, SUMOVTypeParameter::loadingDuration, and myParameter.

Referenced by setBoardingDuration().

Here is the caller graph for this function:

◆ getCarFollowModel() [1/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 146 of file MSVehicleType.h.

References myCarFollowModel.

◆ getCarFollowModel() [2/2]

const MSCFModel& MSVehicleType::getCarFollowModel ( ) const
inline

◆ getColor()

const RGBColor& MSVehicleType::getColor ( ) const
inline

Returns this type's color.

Returns
The color of this type

Definition at line 214 of file MSVehicleType.h.

References SUMOVTypeParameter::color, and myParameter.

Referenced by MSDevice_ToC::initColorScheme(), GUIBaseVehicle::setFunctionalColor(), GUIPerson::setFunctionalColor(), and MSDevice_ToC::setParameter().

Here is the caller graph for this function:

◆ getContainerCapacity()

int MSVehicleType::getContainerCapacity ( ) const
inline

Get this vehicle type's container capacity.

Returns
The container capacity of this vehicle type

Definition at line 320 of file MSVehicleType.h.

References SUMOVTypeParameter::containerCapacity, and myParameter.

Referenced by MSDevice_Taxi::buildVehicleDevices(), GUIVehicle::drawAction_drawCarriageClass(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), MSIdling_Stop::idle(), MSIdling_TaxiStand::idle(), and MSDispatch::remainingCapacity().

Here is the caller graph for this function:

◆ getDefaultProbability()

double MSVehicleType::getDefaultProbability ( ) const
inline

Get the default probability of this vehicle type.

Returns
The probability to use this type

Definition at line 180 of file MSVehicleType.h.

References SUMOVTypeParameter::defaultProbability, and myParameter.

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

Here is the caller graph for this function:

◆ getDesiredMaxSpeed()

double MSVehicleType::getDesiredMaxSpeed ( ) const
inline

Returns the vehicles's desired maximum speed.

Returns
The desired maximum speed of vehicles of this type

Definition at line 166 of file MSVehicleType.h.

References SUMOVTypeParameter::desiredMaxSpeed, and myParameter.

Referenced by LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), MSBaseVehicle::getMaxSpeed(), and GUIPerson::getTypeParameterWindow().

Here is the caller graph for this function:

◆ getEmissionClass()

◆ getEmissionParameters()

const EnergyParams* MSVehicleType::getEmissionParameters ( ) const
inline

retrieve parameters for the energy consumption model

Definition at line 634 of file MSVehicleType.h.

References myEnergyParams.

Referenced by MSBaseVehicle::replaceVehicleType(), and MSMeanData_Emissions::MSLaneMeanDataValues::write().

Here is the caller graph for this function:

◆ getEntryManoeuvreTime()

SUMOTime MSVehicleType::getEntryManoeuvreTime ( const int  angle) const

Accessor function for parameter equivalent returning entry time for a specific manoeuver angle.

Definition at line 403 of file MSVehicleType.cpp.

References getParameter().

Referenced by MSVehicle::Manoeuvre::configureEntryManoeuvre().

Here is the caller graph for this function:

◆ getExitManoeuvreTime()

SUMOTime MSVehicleType::getExitManoeuvreTime ( const int  angle) const

Accessor function for parameter equivalent returning exit time for a specific manoeuver angle.

Definition at line 408 of file MSVehicleType.cpp.

References getParameter().

Referenced by MSVehicle::Manoeuvre::configureExitManoeuvre().

Here is the caller graph for this function:

◆ getFrontSeatPos()

double MSVehicleType::getFrontSeatPos ( ) const
inline

Get offset of first seat from vehicle front.

Definition at line 361 of file MSVehicleType.h.

References SUMOVTypeParameter::frontSeatPos, and myParameter.

Referenced by GUIBaseVehicle::computeSeats().

Here is the caller graph for this function:

◆ 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 289 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::shape.

Referenced by MSLane::detectCollisions(), GUIVehicle::drawAction_drawCarriageClass(), MSVehicle::getBoundingBox(), MSVehicle::getBoundingPoly(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), and GUIBaseVehicle::setFunctionalColor().

Here is the caller graph for this function:

◆ 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 281 of file MSVehicleType.h.

References SUMOVTypeParameter::height, and myParameter.

Referenced by GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIPerson::getTypeParameterWindow(), and setHeight().

Here is the caller graph for this function:

◆ getID()

const std::string& MSVehicleType::getID ( ) const
inline

Returns the name of the vehicle type.

Returns
This type's id

Definition at line 91 of file MSVehicleType.h.

References SUMOVTypeParameter::id, and myParameter.

Referenced by MSChargingStation::addChargeValueForOutput(), MSOverheadWire::addChargeValueForOutput(), MSVehicleControl::addVType(), libsumo::Helper::applySubscriptionFilters(), check(), MSRouteHandler::closeTransportable(), MSRouteHandler::closeVehicle(), MSRouteHandler::closeVType(), duplicateType(), MSVTypeProbe::execute(), LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), LIBSUMO_NAMESPACE::Simulation::findRoute(), MSDevice_Tripinfo::generateOutput(), getOriginalID(), MSBaseVehicle::getSingularType(), MSTransportable::getSingularType(), LIBSUMO_NAMESPACE::Vehicle::getTypeID(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIPerson::getTypeParameterWindow(), MSBaseVehicle::hasValidRouteStart(), MSVehicle::hasValidRouteStart(), MSLink::ignoreFoe(), MSVehicle::ignoreFoe(), MSAbstractLaneChangeModel::laneChangeOutput(), MSE2Collector::makeVehicleInfo(), MSCFModel_Krauss::MSCFModel_Krauss(), MSCFModel_Rail::MSCFModel_Rail(), MSDevice_ToC::MSDevice_ToC(), MSDevice_Bluelight::notifyMove(), TraCIServerAPI_Person::processSet(), TraCIServerAPI_Vehicle::processSet(), MSNet::registerCollision(), MSVehicleControl::removeVType(), MSTransportable::replaceVehicleType(), MSTransportable::routeOutput(), MSBaseVehicle::saveState(), MSStageTrip::setArrived(), setScale(), MSStageDriving::setVehicle(), MSStopOut::stopEnded(), MSDevice_ToC::switchHolderType(), MSInstantInductLoop::write(), MSFCDExport::write(), MSBatteryExport::write(), MSEmissionExport::write(), MSElecHybridExport::writeAggregated(), MSDevice_Vehroutes::writeOutput(), MSAmitranTrajectories::writeVehicle(), and MSFullExport::writeVehicles().

◆ 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 304 of file MSVehicleType.h.

References SUMOVTypeParameter::imgFile, and myParameter.

Referenced by GUIContainer::drawAction_drawAsImage(), and GUIVehicle::drawAction_drawCarriageClass().

Here is the caller graph for this function:

◆ getImpatience()

double MSVehicleType::getImpatience ( ) const
inline

Returns this type's impatience.

Returns
The impatience of this type

Definition at line 254 of file MSVehicleType.h.

References SUMOVTypeParameter::impatience, and myParameter.

◆ getLaneChangeModel()

LaneChangeModel MSVehicleType::getLaneChangeModel ( ) const
inline

Definition at line 151 of file MSVehicleType.h.

References SUMOVTypeParameter::lcModel, and myParameter.

Referenced by MSVehicle::initDevices().

Here is the caller graph for this function:

◆ getLength()

double MSVehicleType::getLength ( ) const
inline

Get vehicle's length [m].

Returns
The length vehicles of this type have in m

Definition at line 107 of file MSVehicleType.h.

References SUMOVTypeParameter::length, and myParameter.

Referenced by MSCFModel_Wiedemann::_v(), MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSVehicle::adaptToLeaders(), MSPModel_Striping::addCrossingVehs(), MSBaseVehicle::addStop(), libsumo::Helper::applySubscriptionFilterLateralDistance(), MSLaneChanger::changeOpposite(), MSLaneChangerSublane::checkChangeOpposite(), MSLane::checkForPedestrians(), MSVehicle::checkRewindLinkLanes(), MSLink::checkWalkingAreaFoe(), MSVehicle::computeFurtherLanes(), MSLaneChanger::computeOvertakingTime(), MSTrainHelper::computeTrainDimensions(), MSLane::detectCollisions(), GUIContainer::drawAction_drawAsImage(), GUIBaseVehicle::drawOnPos(), MSParkingArea::enter(), MSLane::enteredByLaneChange(), MSVehicle::enterLaneAtLaneChange(), MSDevice_SSM::estimateConflictTimes(), MSVehicle::estimateTimeToNextStop(), MSLane::executeMovements(), MSStoppingPlace::fits(), MSLane::freeInsertion(), MSVehicle::getBackPosition(), MEVehicle::getBackPositionOnLane(), MSTransportable::getBackPositionOnLane(), MSVehicle::getBackPositionOnLane(), MSTransportable::getBoundingBox(), MSLane::getBruttoOccupancy(), GUIBaseVehicle::getCenteringBoundary(), MSLane::getCriticalLeader(), MSEdge::getDepartPosBound(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), MSStoppingPlace::getLastFreePos(), MSParkingArea::getLastFreePosWithReservation(), MSLink::getLeaderInfo(), MSLane::getLeadersOnConsecutive(), MSBaseVehicle::getLength(), MSLCM_SL2015::getLongest(), MSLane::getNettoOccupancy(), MSLane::getOppositeFollower(), MSLane::getOppositeLeader(), MSVehicle::getPositionOnLane(), MSPModel_JuPedSim::getRadius(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), MSCFModel_Wiedemann::getSecureGap(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIPerson::getTypeParameterWindow(), MSPModel_Striping::getVehicleObstacles(), GUIVehicle::getVisualAngle(), MSLink::getZipperSpeed(), MSLane::handleCollisionBetween(), MSVehicle::handleCollisionStop(), MSLane::handleIntermodalCollisionBetween(), MSLane::incorporateVehicle(), MSLCM_SL2015::informFollower(), MSLCM_SL2015::informLeader(), MSLane::isInsertionSuccess(), MSVehicle::joinTrainPart(), MSVehicle::joinTrainPartFront(), MSLCM_SL2015::keepLatGap(), MSLane::leftByLaneChange(), MSE2Collector::makeVehicleInfo(), MSStageWalking::moveToNextEdge(), MSCFModel_Rail::MSCFModel_Rail(), MSVehicleType(), MSLCM_SL2015::mustOvertakeStopped(), MSPModel_Striping::nextBlocking(), MSE3Collector::MSE3EntryReminder::notifyEnter(), MSE2Collector::notifyMove(), MSInductLoop::notifyMove(), MSInstantInductLoop::notifyMove(), MSMeanData::MeanDataValues::notifyMove(), MSE3Collector::MSE3LeaveReminder::notifyMove(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), MSE2Collector::notifyMovePerson(), MSInductLoop::notifyMovePerson(), MSE3Collector::notifyMovePerson(), MSLCM_LC2013::overtakeDistance(), MSVehicle::planMoveInternal(), MSVehicle::Influencer::postProcessRemoteControl(), MSDevice_Taxi::prepareStop(), MSVehicle::processLaneAdvances(), MSVehicle::processLinkApproaches(), MSVehicle::processNextStop(), MSLane::removeVehicle(), GUIVehicle::selectBlockingFoes(), MSLink::setApproaching(), MSStageDriving::setArrived(), setLength(), MSVehicle::setTentativeLaneAndPosition(), MSLCM_SL2015::updateCFRelated(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MSInstantInductLoop::write(), and MSQueueExport::writeLane().

◆ getLengthWithGap()

double MSVehicleType::getLengthWithGap ( ) const
inline

Get vehicle's length including the minimum gap [m].

Returns
The length vehicles of this type have (including the minimum gap in m

Definition at line 115 of file MSVehicleType.h.

References SUMOVTypeParameter::length, SUMOVTypeParameter::minGap, and myParameter.

Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSVehicle::adaptToLeaders(), MSLaneChanger::avoidDeadlock(), MSLaneChanger::checkChange(), MSLaneChangerSublane::checkChangeToNewLane(), MSLane::checkForPedestrians(), MSVehicle::checkRewindLinkLanes(), MSLaneChanger::computeOvertakingTime(), GUIEdge::drawMesoVehicles(), MSStoppingPlace::enter(), MSLane::enteredByLaneChange(), MSLane::executeMovements(), GUIMEVehicle::getCenteringBoundary(), MSLaneChanger::getColumnleader(), MSLane::getFollowersOnConsecutive(), MSLaneChanger::getOncomingOppositeVehicle(), MSLaneChanger::getRealLeader(), MESegment::hasSpaceFor(), MSLane::incorporateVehicle(), MSLCM_SL2015::informFollower(), MSLCM_SL2015::informLeader(), MSEdge::insertVehicle(), MESegment::isOpen(), MSLane::leftByLaneChange(), MESegment::loadState(), MSMeanData_Net::MSLaneMeanDataValues::notifyMoveInternal(), MSVehicle::overlap(), MSLCM_LC2013::overtakeDistance(), MESegment::receive(), MSLaneChanger::ChangeElem::registerHop(), MSLaneChanger::registerUnchanged(), METriggeredCalibrator::remainingVehicleCapacity(), MSCalibrator::remainingVehicleCapacity(), MESegment::Queue::remove(), MSLane::removeVehicle(), MSLaneChanger::resolveDeadlock(), MESegment::send(), MSLCHelper::updateBlockerLength(), MSLCM_DK2008::wantsChangeToLeft(), MSLCM_DK2008::wantsChangeToRight(), and MSLaneChanger::yieldToDeadlockOncoming().

Here is the caller graph for this function:

◆ getLoadingDuration()

SUMOTime MSVehicleType::getLoadingDuration ( const bool  isPerson) const
inline

Get this vehicle type's loading duration.

Returns
The time a container / person needs to get loaded on a vehicle of this type

Definition at line 327 of file MSVehicleType.h.

References SUMOVTypeParameter::boardingDuration, SUMOVTypeParameter::loadingDuration, and myParameter.

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

Here is the caller graph for this function:

◆ getMass()

double MSVehicleType::getMass ( ) const
inline

Get this vehicle type's mass.

Returns
The mass of this vehicle type

Definition at line 206 of file MSVehicleType.h.

References SUMOVTypeParameter::mass, and myParameter.

Referenced by GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIPerson::getTypeParameterWindow(), and MSCFModel_Rail::MSCFModel_Rail().

Here is the caller graph for this function:

◆ 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 342 of file MSVehicleType.h.

References SUMOVTypeParameter::maxSpeedLat, and myParameter.

Referenced by MSLaneChanger::checkOppositeStop(), MSLCM_SL2015::commitManoeuvre(), MSLaneChanger::computeOvertakingTime(), MSAbstractLaneChangeModel::computeSpeedLat(), MSLCM_SL2015::computeSpeedLat(), MSAbstractLaneChangeModel::estimateLCDuration(), MSAbstractLaneChangeModel::getMaxSpeedLat2(), MSLeaderInfo::getSubLanes(), GUIVehicle::getTypeParameterWindow(), MSLCM_LC2013::prepareStep(), MSAbstractLaneChangeModel::remainingTime(), setMaxSpeedLat(), and MSLaneChangerSublane::startChangeSublane().

Here is the caller graph for this function:

◆ getMinGap()

double MSVehicleType::getMinGap ( ) const
inline

Get the free space in front of vehicles of this class.

Returns
The place before the vehicle

Definition at line 123 of file MSVehicleType.h.

References SUMOVTypeParameter::minGap, and myParameter.

Referenced by MSLCM_LC2013::_patchSpeed(), MSLCM_SL2015::_patchSpeed(), MSCFModel_EIDM::_v(), MSCFModel_IDM::_v(), MSLCM_SL2015::_wantsChangeSublane(), MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeaders(), MSLane::addLeaders(), MSLaneChangerSublane::addOutsideLeaders(), MSLaneChanger::avoidDeadlock(), MSLaneChanger::changeOpposite(), MSLaneChanger::checkChange(), MSLane::checkFailure(), MSVehicle::checkRewindLinkLanes(), MSLink::checkWalkingAreaFoe(), MSDevice_SSM::computeGlobalMeasures(), MSLaneChanger::computeOvertakingTime(), MSCFModel_W99::computeThresholds(), MSLane::detectCollisionBetween(), GUIBaseVehicle::drawOnPos(), MSParkingArea::enter(), MSStoppingPlace::enter(), MSCFModel_Rail::followSpeed(), MSCFModel_W99::followSpeed(), MSLane::freeInsertion(), MSVehicle::Influencer::gapControlSpeed(), MSLane::getCriticalLeader(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), LIBSUMO_NAMESPACE::Vehicle::getJunctionFoes(), MSParkingArea::getLastFreePos(), MSStoppingPlace::getLastFreePos(), MSParkingArea::getLastFreePosWithReservation(), MSLane::getLeader(), MSVehicle::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLaneChangerSublane::getLeaders(), MSLane::getLeadersOnConsecutive(), MSLane::getOppositeLeader(), MSLaneChanger::getRealFollower(), MSLaneChanger::getRealLeader(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIPerson::getTypeParameterWindow(), MSLink::getZipperSpeed(), MSLCM_SL2015::informLeaders(), MSLane::insertVehicle(), MSLane::isInsertionSuccess(), MSVehicle::isLeader(), MSLane::lastInsertion(), MSE2Collector::makeVehicleInfo(), MSDevice_Bluelight::notifyMove(), MSLCM_DK2008::patchSpeed(), MSCFModel_EIDM::patchSpeedBeforeLCEIDM(), MSVehicle::planMoveInternal(), MSVehicle::processNextStop(), MSLaneChanger::resolveDeadlock(), MSLane::safeInsertionSpeed(), MSAbstractLaneChangeModel::setFollowerGaps(), MSAbstractLaneChangeModel::setLeaderGaps(), setMinGap(), MSAbstractLaneChangeModel::setOrigLeaderGaps(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSVehicle::updateBestLanes(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MSLCM_DK2008::wantsChangeToLeft(), MSLCM_DK2008::wantsChangeToRight(), and MSFCDExport::write().

◆ 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 130 of file MSVehicleType.h.

References SUMOVTypeParameter::minGapLat, and myParameter.

Referenced by MSLaneChangerSublane::findClosestLeader(), GUIVehicle::getTypeParameterWindow(), MSDevice_Bluelight::notifyMove(), and setMinGapLat().

Here is the caller graph for this function:

◆ getNumericalID()

int MSVehicleType::getNumericalID ( ) const
inline

Returns the running index of the vehicle type.

Returns
This type's numerical id

Definition at line 99 of file MSVehicleType.h.

References myIndex.

Referenced by MSAmitranTrajectories::writeVehicle().

Here is the caller graph for this function:

◆ getOriginalID()

const std::string& MSVehicleType::getOriginalID ( ) const
inline

Returns the id of the original vehicle type if this is a vehicle specific type, the id otherwise.

Returns
the original vehicle type id

Definition at line 618 of file MSVehicleType.h.

References getID(), and myOriginalType.

Referenced by MSTriggeredRerouter::applies(), and MSDetectorFileOutput::vehicleApplies().

Here is the caller graph for this function:

◆ 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 296 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::osgFile.

◆ getParameter()

const SUMOVTypeParameter& MSVehicleType::getParameter ( ) const
inline

Definition at line 623 of file MSVehicleType.h.

References myParameter.

Referenced by MSRouteHandler::addFlowTransportable(), MSRouteHandler::addStop(), MSLink::blockedAtTime(), MSLink::blockedByFoe(), MSDevice_ElecHybrid::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSRouteHandler::closeTransportable(), MSRouteHandler::closeVehicle(), MSTrainHelper::computeCarriages(), MSTrainHelper::computeTrainDimensions(), MSInsertionControl::determineCandidates(), MSAbstractLaneChangeModel::estimateLCDuration(), MSLane::executeMovements(), MSDevice_SSM::filterByConflictType(), LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), MSDevice_SSM::getDetectionRange(), getEntryManoeuvreTime(), getExitManoeuvreTime(), MSDevice_SSM::getExtraTime(), MSLink::getLeaderInfo(), MSDevice_SSM::getMDRAC_PRT(), MSDevice_SSM::getMeasuresAndThresholds(), MSDevice_ToC::getOutputFilename(), MSDevice_SSM::getOutputFilename(), MSDevice::getStringParam(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIPerson::getTypeParameterWindow(), MSCFModel_Rail::getValueTable(), MSBaseVehicle::getVClass(), MSTriggeredRerouter::getWeight(), MSVehicle::ignoreRed(), MSInsertionControl::initScale(), MSVehicle::keepClear(), MSCFModel_ACC::MSCFModel_ACC(), MSCFModel_CACC::MSCFModel_CACC(), MSCFModel_EIDM::MSCFModel_EIDM(), MSCFModel_IDM::MSCFModel_IDM(), MSCFModel_Kerner::MSCFModel_Kerner(), MSCFModel_PWag2009::MSCFModel_PWag2009(), MSCFModel_Rail::MSCFModel_Rail(), MSCFModel_W99::MSCFModel_W99(), MSCFModel_Wiedemann::MSCFModel_Wiedemann(), MSDevice_Battery::MSDevice_Battery(), MSDevice_ElecHybrid::MSDevice_ElecHybrid(), MSDevice_Battery::notifyMove(), MSDevice_Bluelight::notifyMove(), MSDevice_GLOSA::notifyMove(), MSRouteHandler::parseFromViaTo(), MSCFModel_Krauss::patchSpeedBeforeLC(), MSVehicle::planMoveInternal(), MSVehicle::processNextStop(), MSDevice_Battery::readParameterValue(), MSAbstractLaneChangeModel::remainingTime(), MSTransportable::replaceVehicleType(), MSDevice_SSM::requestsTrajectories(), MSDevice_Bluelight::resetVehicle(), MSVehicle::slowDownForSchedule(), MSDevice_SSM::useGeoCoords(), MSDevice_SSM::writeLanesPositions(), and MSDevice_SSM::writePositions().

◆ getParkingBadges()

const std::vector<std::string>& MSVehicleType::getParkingBadges ( ) const
inline

Returns the parking access rights of this type.

Returns
The parking access rights

Definition at line 222 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::parkingBadges.

Referenced by MSBaseVehicle::getParkingBadges().

Here is the caller graph for this function:

◆ getPersonCapacity()

int MSVehicleType::getPersonCapacity ( ) const
inline

Get this vehicle type's person capacity.

Returns
The person capacity of this vehicle type

Definition at line 312 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::personCapacity.

Referenced by MSDevice_Taxi::buildVehicleDevices(), GUIVehicle::drawAction_drawCarriageClass(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), MEVehicle::mayProceed(), and MSDispatch::remainingCapacity().

Here is the caller graph for this function:

◆ getPreferredLateralAlignment()

const LatAlignmentDefinition& MSVehicleType::getPreferredLateralAlignment ( ) const
inline

Get vehicle's preferred lateral alignment procedure.

Returns
The vehicle's preferred lateral alignment procedure

Definition at line 349 of file MSVehicleType.h.

References SUMOVTypeParameter::latAlignmentProcedure, and myParameter.

Referenced by MSLCM_SL2015::_wantsChangeSublane(), MSAbstractLaneChangeModel::getDesiredAlignment(), and GUIVehicle::getDynamicAlignment().

Here is the caller graph for this function:

◆ getPreferredLateralAlignmentOffset()

double MSVehicleType::getPreferredLateralAlignmentOffset ( ) const
inline

Get vehicle's preferred lateral alignment offset (in m from center line)

Returns
The vehicle's preferred lateral alignment offset

Definition at line 356 of file MSVehicleType.h.

References SUMOVTypeParameter::latAlignmentOffset, and myParameter.

Referenced by MSLCM_SL2015::_wantsChangeSublane(), and GUIVehicle::getDynamicAlignment().

Here is the caller graph for this function:

◆ getSeatingWidth()

double MSVehicleType::getSeatingWidth ( ) const
inline

Get the width of the passenger compartment when being drawn.

Returns
The seating space width of this type's vehicles

Definition at line 274 of file MSVehicleType.h.

References myParameter, SUMOVTypeParameter::seatingWidth, and SUMOVTypeParameter::width.

Referenced by GUIBaseVehicle::computeSeats().

Here is the caller graph for this function:

◆ getSpeedFactor()

const Distribution_Parameterized& MSVehicleType::getSpeedFactor ( ) const
inline

Returns this type's speed factor.

Returns
The speed factor of this type

Definition at line 230 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::speedFactor.

Referenced by LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), LIBSUMO_NAMESPACE::Simulation::findRoute(), and MSEdge::validateDepartSpeed().

Here is the caller graph for this function:

◆ getVehicleClass()

◆ getWidth()

double MSVehicleType::getWidth ( ) const
inline

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

Returns
The width of this type's vehicles

Definition at line 267 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::width.

Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSPModel_Striping::addCrossingVehs(), MSVehicle::brakeForOverlap(), MSLaneChanger::checkChange(), MSLane::checkForPedestrians(), MSDevice_SSM::classifyEncounter(), MSTrainHelper::computeTrainDimensions(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), GUIContainer::drawAction_drawAsImage(), GUIBaseVehicle::drawOnPos(), MSVehicle::enterLaneAtMove(), MSLaneChangerSublane::findClosestLeader(), MSVehicle::getBoundingBox(), MSVehicle::getBoundingPoly(), MSLane::getDepartPosLat(), MSLink::getLeaderInfo(), GUIVehicle::getLeftSideOnEdge(), MSVehicle::getLeftSideOnEdge(), MSVehicle::getLeftSideOnLane(), MSPModel_Striping::getNextLaneObstacles(), MSPModel_JuPedSim::getRadius(), MEVehicle::getRightSideOnEdge(), MSVehicle::getRightSideOnEdge(), MSVehicle::getRightSideOnLane(), MSLane::getSpaceTillLastStanding(), MSLeaderInfo::getSubLanes(), GUIVehicle::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIContainer::getTypeParameterWindow(), GUIPerson::getTypeParameterWindow(), MSPModel_Striping::getVehicleObstacles(), MSLCM_SL2015::getWidth(), MSBaseVehicle::getWidth(), MSLane::insertVehicle(), MSLink::isInFront(), MSPModel_Striping::moveInDirection(), LIBSUMO_NAMESPACE::Person::moveTo(), LIBSUMO_NAMESPACE::Person::moveToXY(), LIBSUMO_NAMESPACE::Vehicle::moveToXY(), MSPModel_Striping::PState::moveToXY(), MSPModel_Striping::MSPModel_Striping(), MSPModel_Striping::nextBlocking(), MSDevice_Bluelight::notifyMove(), MSLink::opened(), MSVehicle::Influencer::postProcessRemoteControl(), MSStageDriving::setArrived(), setWidth(), and MSLCM_SL2015::updateCFRelated().

Here is the caller graph for this function:

◆ isVehicleSpecific()

bool MSVehicleType::isVehicleSpecific ( ) const
inline

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

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

Definition at line 610 of file MSVehicleType.h.

References myOriginalType.

Referenced by MSBaseVehicle::getSingularType(), MSTransportable::getSingularType(), MSBaseVehicle::replaceVehicleType(), MSTransportable::replaceVehicleType(), MSBaseVehicle::saveState(), setActionStepLength(), MSTransportable::~MSTransportable(), and MSVehicle::~MSVehicle().

Here is the caller graph for this function:

◆ operator=()

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

Invalidated assignment operator.

◆ setAccel()

void MSVehicleType::setAccel ( double  accel)

Set a new value for this type's acceleration.

Parameters
[in]accelThe new acceleration of this type

Definition at line 485 of file MSVehicleType.cpp.

References SUMOVTypeParameter::cfParameter, getCarFollowModel(), MSCFModel::getMaxAccel(), myCarFollowModel, myOriginalType, myParameter, MSCFModel::setMaxAccel(), SUMO_ATTR_ACCEL, and toString().

◆ setActionStepLength()

void MSVehicleType::setActionStepLength ( const SUMOTime  actionStepLength,
bool  resetActionOffset 
)

Set a new value for this type's action step length.

Parameters
[in]actionStepLengthThe new action step length of this type (in ms.)
[in]resetActionOffsetIf True (default), the next action point is scheduled immediately. if If resetActionOffset == False, the interval between the last and the next action point is updated to match the given value for all vehicles of this type, or if the latter is smaller than the time since the last action point, the next action follows immediately.
Note
: Singular vtypes do not update the state of the corresponding vehicle, because the global lookup would be too expensive. The caller is responsible to perform the actionOffsetReset operation at caller context, where the vehicle is known.

Definition at line 216 of file MSVehicleType.cpp.

References SUMOVTypeParameter::actionStepLength, check(), MSNet::getInstance(), MSNet::getVehicleControl(), MSBaseVehicle::getVehicleType(), isVehicleSpecific(), MSVehicleControl::loadedVehBegin(), MSVehicleControl::loadedVehEnd(), myCachedActionStepLengthSecs, myParameter, SUMOVTypeParameter::parametersSet, MSVehicle::resetActionOffset(), STEPS2TIME, MSVehicle::updateActionOffset(), and VTYPEPARS_ACTIONSTEPLENGTH_SET.

Referenced by MSVehicle::setActionStepLength().

Here is the caller graph for this function:

◆ setApparentDecel()

void MSVehicleType::setApparentDecel ( double  apparentDecel)

Set a new value for this type's apparent deceleration.

Parameters
[in]apparentDecelThe new apparent deceleration of this type

Definition at line 512 of file MSVehicleType.cpp.

References SUMOVTypeParameter::cfParameter, MSCFModel::getApparentDecel(), getCarFollowModel(), myCarFollowModel, myOriginalType, myParameter, MSCFModel::setApparentDecel(), SUMO_ATTR_APPARENTDECEL, and toString().

◆ setBoardingDuration()

void MSVehicleType::setBoardingDuration ( SUMOTime  duration,
bool  isPerson = true 
)

Set a new value for this type's boardingDuration.

Parameters
[in]boardingDurationThe new boardingDuration of this type
[in]isPersonWhether to set boardingDuration or loadingDuration

Definition at line 297 of file MSVehicleType.cpp.

References SUMOVTypeParameter::boardingDuration, getBoardingDuration(), SUMOVTypeParameter::loadingDuration, myOriginalType, myParameter, SUMOVTypeParameter::parametersSet, and VTYPEPARS_BOARDING_DURATION.

◆ 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 266 of file MSVehicleType.cpp.

References SUMOVTypeParameter::color, myParameter, SUMOVTypeParameter::parametersSet, and VTYPEPARS_COLOR_SET.

◆ setDecel()

void MSVehicleType::setDecel ( double  decel)

Set a new value for this type's deceleration.

Parameters
[in]decelThe new deceleration of this type

Definition at line 494 of file MSVehicleType.cpp.

References SUMOVTypeParameter::cfParameter, getCarFollowModel(), MSCFModel::getMaxDecel(), myCarFollowModel, myOriginalType, myParameter, MSCFModel::setMaxDecel(), SUMO_ATTR_DECEL, and toString().

Referenced by MSDevice_ToC::triggerMRM().

Here is the caller graph for this function:

◆ 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 183 of file MSVehicleType.cpp.

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

◆ setEmergencyDecel()

void MSVehicleType::setEmergencyDecel ( double  emergencyDecel)

Set a new value for this type's emergency deceleration.

Parameters
[in]emergencyDecelThe new emergency deceleration of this type

Definition at line 503 of file MSVehicleType.cpp.

References SUMOVTypeParameter::cfParameter, getCarFollowModel(), MSCFModel::getEmergencyDecel(), myCarFollowModel, myOriginalType, myParameter, MSCFModel::setEmergencyDecel(), SUMO_ATTR_EMERGENCYDECEL, and toString().

◆ 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 252 of file MSVehicleType.cpp.

References SUMOVTypeParameter::emissionClass, myParameter, SUMOVTypeParameter::parametersSet, and VTYPEPARS_EMISSIONCLASS_SET.

◆ 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 107 of file MSVehicleType.cpp.

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

◆ 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 290 of file MSVehicleType.cpp.

References SUMOVTypeParameter::impatience, myParameter, SUMOVTypeParameter::parametersSet, and VTYPEPARS_IMPATIENCE_SET.

◆ setImperfection()

void MSVehicleType::setImperfection ( double  imperfection)

Set a new value for this type's imperfection.

Parameters
[in]imperfectionThe new imperfection of this type

Definition at line 521 of file MSVehicleType.cpp.

References SUMOVTypeParameter::cfParameter, getCarFollowModel(), MSCFModel::getImperfection(), myCarFollowModel, myOriginalType, myParameter, MSCFModel::setImperfection(), SUMO_ATTR_SIGMA, and toString().

◆ 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 96 of file MSVehicleType.cpp.

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

Referenced by MSVehicle::joinTrainPart(), MSVehicle::joinTrainPartFront(), and MSVehicle::processNextStop().

Here is the caller graph for this function:

◆ setMass()

void MSVehicleType::setMass ( double  mass)

Set a new value for this type's mass.

Parameters
[in]massThe new mass of this type

Definition at line 259 of file MSVehicleType.cpp.

References SUMOVTypeParameter::mass, myParameter, SUMOVTypeParameter::parametersSet, and VTYPEPARS_MASS_SET.

◆ 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 140 of file MSVehicleType.cpp.

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

Referenced by MSTransportable::setSpeed().

Here is the caller graph for this function:

◆ 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 151 of file MSVehicleType.cpp.

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

◆ 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 118 of file MSVehicleType.cpp.

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

Referenced by MSDevice_Bluelight::notifyMove().

Here is the caller graph for this function:

◆ 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 129 of file MSVehicleType.cpp.

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

◆ setParkingBadges()

void MSVehicleType::setParkingBadges ( const std::vector< std::string > &  badges)

Set a new value for parking access rights of this type.

Parameters
[in]badgesThe new parking access rights of this type

Definition at line 273 of file MSVehicleType.cpp.

References myParameter, SUMOVTypeParameter::parametersSet, SUMOVTypeParameter::parkingBadges, and VTYPEPARS_PARKING_BADGES_SET.

◆ setPreferredLateralAlignment()

void MSVehicleType::setPreferredLateralAlignment ( const LatAlignmentDefinition latAlignment,
double  latAlignmentOffset = 0.0 
)

Set vehicle's preferred lateral alignment.

Definition at line 169 of file MSVehicleType.cpp.

References SUMOVTypeParameter::latAlignmentOffset, SUMOVTypeParameter::latAlignmentProcedure, myParameter, SUMOVTypeParameter::parametersSet, and VTYPEPARS_LATALIGNMENT_SET.

Referenced by MSDevice_Bluelight::notifyMove().

Here is the caller graph for this function:

◆ setScale()

void MSVehicleType::setScale ( double  value)

◆ 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 311 of file MSVehicleType.cpp.

References myParameter, SUMOVTypeParameter::parametersSet, SUMOVTypeParameter::shape, and VTYPEPARS_SHAPE_SET.

◆ 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 205 of file MSVehicleType.cpp.

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

◆ 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 194 of file MSVehicleType.cpp.

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

◆ setTau()

void MSVehicleType::setTau ( double  tau)

Set a new value for this type's headway.

Parameters
[in]tauThe new headway of this type

Definition at line 530 of file MSVehicleType.cpp.

References SUMOVTypeParameter::cfParameter, getCarFollowModel(), MSCFModel::getHeadwayTime(), myCarFollowModel, myOriginalType, myParameter, MSCFModel::setHeadwayTime(), SUMO_ATTR_TAU, and toString().

◆ 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 162 of file MSVehicleType.cpp.

References myParameter, SUMOVTypeParameter::parametersSet, SUMOVTypeParameter::vehicleClass, and VTYPEPARS_VEHICLECLASS_SET.

Referenced by MSDevice_FCDReplay::FCDHandler::addTrafficObjects().

Here is the caller graph for this function:

◆ 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 280 of file MSVehicleType.cpp.

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

◆ wasSet()

bool MSVehicleType::wasSet ( long long 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 80 of file MSVehicleType.h.

References myParameter, and SUMOVTypeParameter::parametersSet.

Referenced by MSRouteHandler::addTranship(), MSAbstractLaneChangeModel::computeSpeedLat(), MSAbstractLaneChangeModel::estimateLCDuration(), MSCFModel_Rail::MSCFModel_Rail(), MSAbstractLaneChangeModel::remainingTime(), GUIBaseVehicle::setFunctionalColor(), and GUIPerson::setFunctionalColor().

Here is the caller graph for this function:

Field Documentation

◆ myCachedActionStepLengthSecs

double MSVehicleType::myCachedActionStepLengthSecs
private

the vtypes actionsStepLength in seconds (cached because needed very often)

Definition at line 645 of file MSVehicleType.h.

Referenced by getActionStepLengthSecs(), MSVehicleType(), and setActionStepLength().

◆ myCarFollowModel

MSCFModel* MSVehicleType::myCarFollowModel
private

instance of the car following model.

Definition at line 657 of file MSVehicleType.h.

Referenced by build(), duplicateType(), getCarFollowModel(), setAccel(), setApparentDecel(), setDecel(), setEmergencyDecel(), setImperfection(), setTau(), and ~MSVehicleType().

◆ myEnergyParams

const EnergyParams MSVehicleType::myEnergyParams
private

Definition at line 642 of file MSVehicleType.h.

Referenced by getEmissionParameters().

◆ myIndex

const int MSVehicleType::myIndex
private

the running index

Definition at line 654 of file MSVehicleType.h.

Referenced by getNumericalID().

◆ myNextIndex

int MSVehicleType::myNextIndex = 0
staticprivate

next value for the running index

Definition at line 663 of file MSVehicleType.h.

◆ myOriginalType

◆ myParameter

◆ myWarnedActionStepLengthBallisticOnce

bool MSVehicleType::myWarnedActionStepLengthBallisticOnce
private

Definition at line 650 of file MSVehicleType.h.

Referenced by check().

◆ myWarnedActionStepLengthTauOnce

bool MSVehicleType::myWarnedActionStepLengthTauOnce
private

Indicator whether the user was already warned once about an action step length larger than the desired time headway.

Definition at line 649 of file MSVehicleType.h.

Referenced by check().

◆ myWarnedStepLengthTauOnce

bool MSVehicleType::myWarnedStepLengthTauOnce
private

Definition at line 651 of file MSVehicleType.h.

Referenced by check().


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