![]() |
SUMO - Simulation of Urban MObility
|
The car-following model and parameter. More...
#include <MSVehicleType.h>

Public Member Functions | |
| const SUMOVTypeParameter & | getParameter () const |
| bool | isVehicleSpecific () const |
| Returns whether this type belongs to a single vehicle only (was modified) More... | |
| MSVehicleType (const SUMOVTypeParameter ¶meter) | |
| 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 MSCFModel & | getCarFollowModel () const |
| Returns the vehicle type's car following model definition (const version) More... | |
| MSCFModel & | getCarFollowModel () |
| 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 (std::mt19937 *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 RGBColor & | getColor () const |
| Returns this type's color. More... | |
| const Distribution_Parameterized & | getSpeedFactor () 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... | |
Private Member Functions | |
| MSVehicleType (const MSVehicleType &) | |
| Invalidated copy constructor. More... | |
| MSVehicleType & | operator= (const MSVehicleType &) |
| Invalidated assignment operator. More... | |
Private Attributes | |
| MSCFModel * | myCarFollowModel |
| instance of the car following model. More... | |
| const int | myIndex |
| the running index More... | |
| const MSVehicleType * | myOriginalType |
| The original type. More... | |
| SUMOVTypeParameter | myParameter |
| the parameter container More... | |
Static Private Attributes | |
| static int | myNextIndex = 0 |
| next value for the running index More... | |
methods for building vehicle types | |
| 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. More... | |
| MSVehicleType * | duplicateType (const std::string &id, bool persistent) const |
| Duplicates the microsim vehicle type giving the newly created type the given id. More... | |
| static MSVehicleType * | build (SUMOVTypeParameter &from) |
| Builds the microsim vehicle type described by the given parameter. More... | |
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 73 of file MSVehicleType.h.
| MSVehicleType::MSVehicleType | ( | const SUMOVTypeParameter & | parameter | ) |
Constructor.
| [in] | parameter | The vehicle type's parameter |
Definition at line 65 of file MSVehicleType.cpp.
References getLength(), and getMaxSpeed().
Referenced by build(), and duplicateType().
|
virtual |
|
private |
Invalidated copy constructor.
|
static |
Builds the microsim vehicle type described by the given parameter.
| [in] | from | The vehicle type description |
| ProcessError | on false values (not et used) |
Definition at line 226 of file MSVehicleType.cpp.
References SUMOVTypeParameter::cfModel, SUMOVTypeParameter::getCFParam(), SUMOVTypeParameter::getCFParamString(), SUMOVTypeParameter::getDefaultAccel(), SUMOVTypeParameter::getDefaultDecel(), SUMOVTypeParameter::getDefaultImperfection(), SUMOVTypeParameter::id, MSVehicleType(), myCarFollowModel, SUMO_ATTR_ACCEL, SUMO_ATTR_APPARENTDECEL, SUMO_ATTR_CF_IDM_DELTA, SUMO_ATTR_CF_IDM_STEPPING, SUMO_ATTR_CF_IDMM_ADAPT_FACTOR, SUMO_ATTR_CF_IDMM_ADAPT_TIME, SUMO_ATTR_CF_KERNER_PHI, SUMO_ATTR_CF_PWAGNER2009_APPROB, SUMO_ATTR_CF_PWAGNER2009_TAULAST, SUMO_ATTR_CF_WIEDEMANN_ESTIMATION, SUMO_ATTR_CF_WIEDEMANN_SECURITY, SUMO_ATTR_DECEL, SUMO_ATTR_EMERGENCYDECEL, SUMO_ATTR_K, SUMO_ATTR_SIGMA, SUMO_ATTR_TAU, SUMO_ATTR_TMP1, SUMO_ATTR_TMP2, SUMO_ATTR_TMP3, SUMO_ATTR_TMP4, SUMO_ATTR_TMP5, SUMO_ATTR_TRAIN_TYPE, SUMO_TAG_CF_BKERNER, SUMO_TAG_CF_DANIEL1, SUMO_TAG_CF_IDM, SUMO_TAG_CF_IDMM, SUMO_TAG_CF_KRAUSS, SUMO_TAG_CF_KRAUSS_ORIG1, SUMO_TAG_CF_KRAUSS_PLUS_SLOPE, SUMO_TAG_CF_KRAUSSX, SUMO_TAG_CF_PWAGNER2009, SUMO_TAG_CF_RAIL, SUMO_TAG_CF_SMART_SK, SUMO_TAG_CF_WIEDEMANN, SUMOVTypeParameter::vehicleClass, and WRITE_WARNING.
Referenced by getPreferredLateralAlignment(), MSVehicleControl::MSVehicleControl(), and MSRouteHandler::myEndElement().
| 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.
| [in] | id | The new id of the type |
Definition at line 313 of file MSVehicleType.cpp.
References duplicateType().
Referenced by getPreferredLateralAlignment(), MSBaseVehicle::getSingularType(), and MSTransportable::getSingularType().
| double MSVehicleType::computeChosenSpeedDeviation | ( | std::mt19937 * | rng, |
| const double | minDev = -1. |
||
| ) | const |
Computes and returns the speed deviation.
Definition at line 78 of file MSVehicleType.cpp.
References MAX2(), myParameter, Distribution_Parameterized::sample(), and SUMOVTypeParameter::speedFactor.
Referenced by MEVehicleControl::buildVehicle(), GUIMEVehicleControl::buildVehicle(), GUIVehicleControl::buildVehicle(), MSVehicleControl::buildVehicle(), getMaxSpeed(), MSEdge::insertVehicle(), and MSRouteHandler::myStartElement().
| MSVehicleType * MSVehicleType::duplicateType | ( | const std::string & | id, |
| bool | persistent | ||
| ) | const |
Duplicates the microsim vehicle type giving the newly created type the given id.
| [in] | id | The new id of the type |
| [in] | persistent | If true the created vType will be persistent and can be used by several vehicles, otherwise it may be removed before simulation end, |
Definition at line 319 of file MSVehicleType.cpp.
References MSCFModel::duplicate(), getID(), MSNet::getInstance(), SUMOVTypeParameter::id, MSVehicleType(), myCarFollowModel, myOriginalType, and myParameter.
Referenced by buildSingularType(), TraCI_VehicleType::copy(), and getPreferredLateralAlignment().
|
inline |
Get this vehicle type's boarding duration.
Definition at line 291 of file MSVehicleType.h.
References SUMOVTypeParameter::boardingDuration, and myParameter.
Referenced by MSTransportableControl::boardAnyWaiting(), and GUIVehicle::getTypeParameterWindow().
|
inline |
Returns the vehicle type's car following model definition (const version)
Definition at line 148 of file MSVehicleType.h.
References myCarFollowModel.
Referenced by MSLink::blockedByFoe(), MEVehicle::estimateLeaveSpeed(), MSVehicle::estimateLeaveSpeed(), MSVehicle::executeMove(), TraCI_VehicleType::getAccel(), TraCI_VehicleType::getApparentDecel(), MSVehicle::getCarFollowModel(), TraCI_VehicleType::getDecel(), TraCI_Vehicle::getDecel(), TraCI_VehicleType::getEmergencyDecel(), TraCI_VehicleType::getImperfection(), TraCI_Vehicle::getImperfection(), TraCI_VehicleType::getTau(), TraCI_Vehicle::getTau(), MESegment::isOpen(), MSVehicle::MSVehicle(), MSCalibrator::remainingVehicleCapacity(), TraCI_VehicleType::setAccel(), TraCI_VehicleType::setApparentDecel(), TraCI_VehicleType::setDecel(), TraCI_VehicleType::setEmergencyDecel(), TraCI_VehicleType::setImperfection(), TraCI_VehicleType::setTau(), MSVehicleControl::vehicleDeparted(), and MSMeanData_Emissions::MSLaneMeanDataValues::write().
|
inline |
Returns the vehicle type's car following model definition (non-const version)
Definition at line 156 of file MSVehicleType.h.
References myCarFollowModel.
|
inline |
Returns this type's color.
Definition at line 209 of file MSVehicleType.h.
References SUMOVTypeParameter::color, and myParameter.
Referenced by TraCI_VehicleType::getColor(), and GUIBaseVehicle::setFunctionalColor().
|
inline |
Get this vehicle type's container capacity.
Definition at line 284 of file MSVehicleType.h.
References SUMOVTypeParameter::containerCapacity, and myParameter.
Referenced by GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), and MSTransportableControl::loadAnyWaiting().
|
inline |
Get the default probability of this vehicle type.
Definition at line 183 of file MSVehicleType.h.
References SUMOVTypeParameter::defaultProbability, and myParameter.
Referenced by MSRouteHandler::myEndElement(), MSRouteHandler::openVehicleTypeDistribution(), and setDefaultProbability().
|
inline |
Get this vehicle type's emission class.
Definition at line 201 of file MSVehicleType.h.
References SUMOVTypeParameter::emissionClass, and myParameter.
Referenced by MSVehicle::getCO2Emissions(), MSVehicle::getCOEmissions(), MSVehicle::getElectricityConsumption(), TraCI_VehicleType::getEmissionClass(), MSVehicle::getFuelConsumption(), MSVehicle::getHarmonoise_NoiseEmissions(), MSVehicle::getHCEmissions(), MSVehicle::getNOxEmissions(), MSVehicle::getPMxEmissions(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), MSDevice_Emissions::notifyMove(), MSMeanData_Emissions::MSLaneMeanDataValues::notifyMoveInternal(), MSMeanData_Harmonoise::MSLaneMeanDataValues::notifyMoveInternal(), MSEmissionExport::write(), MSMeanData_Emissions::MSLaneMeanDataValues::write(), MSAmitranTrajectories::writeVehicle(), and MSFullExport::writeVehicles().
|
inline |
Get this vehicle type's shape.
Definition at line 253 of file MSVehicleType.h.
References myParameter, and SUMOVTypeParameter::shape.
Referenced by GUIBaseVehicle::drawAction_drawVehicleAsPoly(), MSVehicle::getBoundingPoly(), and TraCI_VehicleType::getShapeClass().
|
inline |
Get the height which vehicles of this class shall have when being drawn.
Definition at line 245 of file MSVehicleType.h.
References SUMOVTypeParameter::height, and myParameter.
Referenced by TraCI_VehicleType::getHeight(), GUIPerson::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), and setHeight().
|
inline |
Returns the name of the vehicle type.
Definition at line 101 of file MSVehicleType.h.
References SUMOVTypeParameter::id, and myParameter.
Referenced by MSChargingStation::addChargeValueForOutput(), MSVehicleControl::addVType(), MSRouteHandler::closeVehicle(), MSInductLoop::collectVehiclesOnDet(), duplicateType(), MSVTypeProbe::execute(), MSDevice_Tripinfo::generateOutput(), MSBaseVehicle::getSingularType(), MSTransportable::getSingularType(), TraCI_Vehicle::getTypeID(), GUIPerson::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), MSInductLoop::leaveDetectorByMove(), MSE2Collector::makeVehicleInfo(), MEVehicle::MEVehicle(), MSVehicle::MSVehicle(), MSRouteHandler::myEndElement(), MSDevice_Bluelight::notifyMove(), MSAbstractLaneChangeModel::primaryLaneChanged(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_Person::processSet(), MSVehicleControl::removeVType(), MSStopOut::stopEnded(), MSDetectorFileOutput::vehicleApplies(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSInstantInductLoop::write(), MSDevice_Vehroutes::writeOutput(), MSAmitranTrajectories::writeVehicle(), and MSFullExport::writeVehicles().
|
inline |
Get this vehicle type's raster model file name.
Definition at line 268 of file MSVehicleType.h.
References SUMOVTypeParameter::imgFile, and myParameter.
Referenced by GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), and GUIBaseVehicle::drawAction_drawVehicleAsImage().
|
inline |
Returns this type's impatience.
Definition at line 225 of file MSVehicleType.h.
References SUMOVTypeParameter::impatience, and myParameter.
Referenced by MSPModel_Striping::PState::getImpatience(), and setImpatience().
|
inline |
Definition at line 161 of file MSVehicleType.h.
References SUMOVTypeParameter::lcModel, and myParameter.
Referenced by MSVehicle::MSVehicle().
|
inline |
Get vehicle's length [m].
Definition at line 117 of file MSVehicleType.h.
References SUMOVTypeParameter::length, and myParameter.
Referenced by MSCFModel_Wiedemann::_v(), MSPModel_Striping::addCrossingVehs(), MSVehicle::addStop(), MSStoppingPlace::addTransportable(), MSLane::basePos(), MSVehicle::checkRewindLinkLanes(), MSInductLoop::collectVehiclesOnDet(), MSLaneChanger::computeOvertakingTime(), MSLane::detectCollisions(), 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(), MSDevice_SSM::estimateConflictTimes(), MSVehicle::executeMove(), MSLane::executeMovements(), MSLane::freeInsertion(), TraCI_Vehicle::getAccel(), MSVehicle::getBackPosition(), MEVehicle::getBackPositionOnLane(), MSVehicle::getBackPositionOnLane(), MSTransportable::getBoundingBox(), MSLane::getBruttoOccupancy(), GUIBaseVehicle::getCenteringBoundary(), MSLane::getCriticalLeader(), MSEdge::getDepartPosBound(), MSLane::getFollower(), MSLane::getFollowersOnConsecutive(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLane::getLeadersOnConsecutive(), TraCI_VehicleType::getLength(), TraCI_Vehicle::getLength(), MSPModel_Striping::PState::getLength(), MSBaseVehicle::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(), MSPModel_Striping::moveInDirectionOnLane(), MSVehicleType(), MSPModel_Striping::nextBlocking(), 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(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MSVehicle::updateFurtherLanes(), MSInstantInductLoop::write(), and MSQueueExport::writeLane().
|
inline |
Get vehicle's length including the minimum gap [m].
Definition at line 125 of file MSVehicleType.h.
References SUMOVTypeParameter::length, SUMOVTypeParameter::minGap, and myParameter.
Referenced by MSLCM_LC2013::_wantsChange(), MSLCM_SL2015::_wantsChangeSublane(), MSLaneChanger::changeOpposite(), MSVehicle::checkRewindLinkLanes(), MSLaneChanger::computeOvertakingTime(), MSLaneChanger::continueChange(), GUIEdge::drawMesoVehicles(), MSLane::enteredByLaneChange(), MSLane::executeMovements(), MESegment::getTimeHeadway(), MESegment::hasSpaceFor(), MSLane::incorporateVehicle(), MSLCM_SL2015::informFollower(), MSLCM_SL2015::informLeader(), MSEdge::insertVehicle(), MSLane::integrateNewVehicle(), MESegment::isOpen(), MSLane::leftByLaneChange(), MESegment::loadState(), MSVehicle::overlap(), MSLCM_LC2013::overtakeDistance(), MESegment::receive(), MSLaneChanger::registerUnchanged(), METriggeredCalibrator::remainingVehicleCapacity(), MSCalibrator::remainingVehicleCapacity(), MESegment::removeCar(), MSLane::removeVehicle(), MSLCM_SL2015::saveBlockerLength(), MSLCM_LC2013::saveBlockerLength(), MSLaneChanger::startChange(), MSLaneChangerSublane::startChangeSublane(), MSLCM_DK2008::wantsChangeToLeft(), and MSLCM_DK2008::wantsChangeToRight().
|
inline |
Get this vehicle type's loading duration.
Definition at line 298 of file MSVehicleType.h.
References SUMOVTypeParameter::loadingDuration, and myParameter.
Referenced by GUIVehicle::getTypeParameterWindow(), and MSTransportableControl::loadAnyWaiting().
|
inline |
Get vehicle's maximum speed [m/s].
Definition at line 169 of file MSVehicleType.h.
References computeChosenSpeedDeviation(), SUMOVTypeParameter::maxSpeed, and myParameter.
Referenced by GUIApplicationWindow::checkGamingEvents(), MSCFModel::estimateSpeedAfterDistance(), TraCI_VehicleType::getMaxSpeed(), TraCI_Vehicle::getMaxSpeed(), MSBaseVehicle::getMaxSpeed(), MSVehicle::getMaxSpeedOnLane(), MSPerson::getSpeedFactor(), GUIPerson::getTypeParameterWindow(), MSCFModel::insertionStopSpeed(), MSCFModel_KraussPS::maxNextSpeed(), MSCFModel::maxNextSpeed(), MEVehicle::MEVehicle(), MSVehicle::MSVehicle(), MSVehicleType(), MSRouteHandler::myStartElement(), MSPModel_Striping::nextBlocking(), TraCIServerAPI_Person::processSet(), setMaxSpeed(), MSLCM_DK2008::wantsChangeToLeft(), MSLCM_DK2008::wantsChangeToRight(), and MSMeanData_Emissions::MSLaneMeanDataValues::write().
|
inline |
Get vehicle's maximum lateral speed [m/s].
Definition at line 305 of file MSVehicleType.h.
References SUMOVTypeParameter::maxSpeedLat, and myParameter.
Referenced by MSLCM_SL2015::checkBlocking(), MSLCM_SL2015::commitManoeuvre(), MSLCM_SL2015::computeSpeedLat(), TraCI_VehicleType::getMaxSpeedLat(), GUIVehicle::getTypeParameterWindow(), and setMaxSpeedLat().
|
inline |
Get the free space in front of vehicles of this class.
Definition at line 133 of file MSVehicleType.h.
References SUMOVTypeParameter::minGap, and myParameter.
Referenced by MSLCM_LC2013::_patchSpeed(), MSLCM_SL2015::_patchSpeed(), MSCFModel_IDM::_v(), MSLCM_LC2013::adaptSpeedToPedestrians(), MSVehicle::adaptToLeaders(), MSLaneChanger::checkChange(), MSLane::checkFailure(), MSVehicle::checkRewindLinkLanes(), MSLaneChanger::computeOvertakingTime(), MSLane::detectCollisionBetween(), GUIBaseVehicle::drawOnPos(), MSLane::freeInsertion(), MSLane::getCriticalLeader(), MSLane::getFollowersOnConsecutive(), MSStoppingPlace::getLastFreePos(), MSLane::getLeader(), MSVehicle::getLeader(), MSLink::getLeaderInfo(), MSLane::getLeaderOnConsecutive(), MSLaneChangerSublane::getLeaders(), MSLane::getLeadersOnConsecutive(), TraCI_VehicleType::getMinGap(), TraCI_Vehicle::getMinGap(), MSPModel_Striping::PState::getMinGap(), MSLane::getOppositeLeader(), MSLaneChanger::getRealLeader(), GUIPerson::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), MSLink::getZipperSpeed(), MSLCM_SL2015::informLeaders(), MSLane::isInsertionSuccess(), MSLane::lastInsertion(), MSE2Collector::makeVehicleInfo(), MSLCM_DK2008::patchSpeed(), MSVehicle::processNextStop(), MSLane::safeInsertionSpeed(), MSAbstractLaneChangeModel::setFollowerGaps(), MSAbstractLaneChangeModel::setLeaderGaps(), setMinGap(), MSLCM_LC2013::slowDownForBlocked(), MSLCM_SL2015::slowDownForBlocked(), MSLCM_SL2015::updateExpectedSublaneSpeeds(), MSLCM_DK2008::wantsChangeToLeft(), and MSLCM_DK2008::wantsChangeToRight().
|
inline |
Get the minimum lateral gap that vehicles of this type maintain.
Definition at line 140 of file MSVehicleType.h.
References SUMOVTypeParameter::minGapLat, and myParameter.
Referenced by TraCI_VehicleType::getMinGapLat(), GUIVehicle::getTypeParameterWindow(), setMinGapLat(), and MSLCM_SL2015::updateGaps().
|
inline |
Returns the running index of the vehicle type.
Definition at line 109 of file MSVehicleType.h.
References myIndex.
Referenced by MSAmitranTrajectories::writeVehicle().
|
inline |
Get this vehicle type's 3D model file name.
Definition at line 260 of file MSVehicleType.h.
References myParameter, and SUMOVTypeParameter::osgFile.
|
inline |
Definition at line 494 of file MSVehicleType.h.
References myParameter.
Referenced by TraCI_VehicleType::addParameter(), MSDevice_Battery::buildVehicleDevices(), MSDevice_Example::buildVehicleDevices(), MSDevice_Bluelight::buildVehicleDevices(), MSDevice::equippedByDefaultAssignmentOptions(), MSDevice_SSM::getDetectionRange(), MSDevice_SSM::getExtraTime(), MSLink::getLeaderInfo(), MSDevice_SSM::getMeasuresAndThresholds(), MSDevice_SSM::getOutputFilename(), TraCI_VehicleType::getParameter(), GUIPerson::getTypeParameterWindow(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), MSBaseVehicle::getVClass(), MSTriggeredRerouter::getWeight(), MSPModel_Striping::PState::ignoreRed(), MSVehicle::ignoreRed(), MSVehicle::keepClear(), MSDevice_SSM::requestsTrajectories(), and MSDevice_SSM::useGeoCoords().
|
inline |
Get this vehicle type's person capacity.
Definition at line 276 of file MSVehicleType.h.
References myParameter, and SUMOVTypeParameter::personCapacity.
Referenced by MSTransportableControl::boardAnyWaiting(), GUIMEVehicle::getTypeParameterWindow(), and GUIVehicle::getTypeParameterWindow().
|
inline |
Get vehicle's preferred lateral alignment.
Definition at line 312 of file MSVehicleType.h.
References build(), buildSingularType(), duplicateType(), SUMOVTypeParameter::latAlignment, myParameter, setColor(), setDefaultProbability(), setEmissionClass(), setHeight(), setImpatience(), setLength(), setMaxSpeed(), setMaxSpeedLat(), setMinGap(), setMinGapLat(), setPreferredLateralAlignment(), setShape(), setSpeedDeviation(), setSpeedFactor(), setVClass(), and setWidth().
Referenced by MSLCM_SL2015::_wantsChangeSublane(), TraCI_VehicleType::getLateralAlignment(), and GUIVehicle::getTypeParameterWindow().
|
inline |
Returns this type's speed factor.
Definition at line 217 of file MSVehicleType.h.
References myParameter, and SUMOVTypeParameter::speedFactor.
Referenced by TraCI_VehicleType::getSpeedDeviation(), TraCI_Vehicle::getSpeedDeviation(), TraCI_VehicleType::getSpeedFactor(), and MSEdge::insertVehicle().
|
inline |
Get this vehicle type's vehicle class.
Definition at line 192 of file MSVehicleType.h.
References myParameter, and SUMOVTypeParameter::vehicleClass.
Referenced by MSLCM_LC2013::_wantsChange(), MSVehicle::addStop(), MSBaseVehicle::calculateArrivalParams(), MSLaneChanger::change(), MSLaneChanger::changeOpposite(), MSVehicleTransfer::checkInsertions(), MSLCM_SL2015::checkStrategicChange(), MSRouteHandler::closeVehicle(), MSVehicle::executeMove(), MSEdge::getDepartLane(), GUIMEVehicle::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), TraCI_VehicleType::getVehicleClass(), MSBaseVehicle::hasValidRoute(), MEVehicle::MEVehicle(), MSVehicle::MSVehicle(), MSLane::succLinkSec(), MSVehicle::updateBestLanes(), and MSLCM_SL2015::updateExpectedSublaneSpeeds().
|
inline |
Get the width which vehicles of this class shall have when being drawn.
Definition at line 238 of file MSVehicleType.h.
References myParameter, and SUMOVTypeParameter::width.
Referenced by MSLCM_LC2013::adaptSpeedToPedestrians(), MSPModel_Striping::addCrossingVehs(), MSDevice_SSM::classifyEncounter(), MSLane::detectCollisionBetween(), MSLane::detectCollisions(), GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), GUIVehicle::drawAction_drawRailCarriages(), GUIBaseVehicle::drawAction_drawVehicleAsImage(), GUIBaseVehicle::drawAction_drawVehicleAsPoly(), MSVehicle::getBoundingBox(), MSVehicle::getBoundingPoly(), MSLane::getDepartPosLat(), MSLink::getLeaderInfo(), GUIVehicle::getLeftSideOnEdge(), MSPModel_Striping::getNextLaneObstacles(), MSVehicle::getRightSideOnEdge(), MSVehicle::getRightSideOnLane(), MSLeaderInfo::getSubLanes(), GUIPerson::getTypeParameterWindow(), GUIVehicle::getTypeParameterWindow(), TraCI_VehicleType::getWidth(), TraCI_Vehicle::getWidth(), MSLCM_SL2015::getWidth(), MSBaseVehicle::getWidth(), MSLane::insertVehicle(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::nextBlocking(), MSPModel_Striping::PState::otherStripe(), MSVehicle::planMoveInternal(), MSVehicle::Influencer::postProcessVTD(), TraCIServerAPI_Vehicle::processSet(), setWidth(), and MSLCM_SL2015::updateCFRelated().
|
inline |
Returns whether this type belongs to a single vehicle only (was modified)
Definition at line 489 of file MSVehicleType.h.
References myOriginalType.
Referenced by MSBaseVehicle::getSingularType(), MSTransportable::getSingularType(), MSBaseVehicle::replaceVehicleType(), MSTransportable::replaceVehicleType(), MSTransportable::~MSTransportable(), and MSVehicle::~MSVehicle().
|
private |
Invalidated assignment operator.
| void MSVehicleType::setColor | ( | const RGBColor & | color | ) |
Set a new value for this type's color.
| [in] | color | The new color of this type |
Definition at line 192 of file MSVehicleType.cpp.
References SUMOVTypeParameter::color, and myParameter.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setColor().
| 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.
| [in] | prob | The new default probability of this type |
Definition at line 156 of file MSVehicleType.cpp.
References SUMOVTypeParameter::defaultProbability, getDefaultProbability(), myOriginalType, and myParameter.
Referenced by getPreferredLateralAlignment().
| void MSVehicleType::setEmissionClass | ( | SUMOEmissionClass | eclass | ) |
Set a new value for this type's emission class.
| [in] | eclass | The new emission class of this type |
Definition at line 186 of file MSVehicleType.cpp.
References SUMOVTypeParameter::emissionClass, and myParameter.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setEmissionClass().
| 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.
| [in] | height | The new height of this type |
Definition at line 95 of file MSVehicleType.cpp.
References getHeight(), SUMOVTypeParameter::height, myOriginalType, and myParameter.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setHeight().
| void MSVehicleType::setImpatience | ( | const double | impatience | ) |
Set a new value for this type's impatience.
| [in] | impatience | The new impatience of this type |
Definition at line 208 of file MSVehicleType.cpp.
References getImpatience(), SUMOVTypeParameter::impatience, myOriginalType, and myParameter.
Referenced by getPreferredLateralAlignment().
| 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.
| [in] | length | The new length of this type |
Definition at line 85 of file MSVehicleType.cpp.
References getLength(), SUMOVTypeParameter::length, myOriginalType, and myParameter.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setLength().
| 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.
| [in] | maxSpeed | The new maximum speed of this type |
Definition at line 125 of file MSVehicleType.cpp.
References getMaxSpeed(), SUMOVTypeParameter::maxSpeed, myOriginalType, and myParameter.
Referenced by getPreferredLateralAlignment(), TraCI_VehicleType::setMaxSpeed(), and TraCI_Vehicle::setMaxSpeed().
| 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.
| [in] | maxSpeedLat | The new maximum lateral speed of this type |
Definition at line 135 of file MSVehicleType.cpp.
References getMaxSpeedLat(), SUMOVTypeParameter::maxSpeedLat, myOriginalType, and myParameter.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setMaxSpeedLat().
| 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.
| [in] | minGap | The new minimum gap of this type |
Definition at line 105 of file MSVehicleType.cpp.
References getMinGap(), SUMOVTypeParameter::minGap, myOriginalType, and myParameter.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setMinGap().
| 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.
| [in] | minGapLat | The new minimum lateral gap of this type |
Definition at line 115 of file MSVehicleType.cpp.
References getMinGapLat(), SUMOVTypeParameter::minGapLat, myOriginalType, and myParameter.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setMinGapLat().
| void MSVehicleType::setPreferredLateralAlignment | ( | LateralAlignment | latAlignment | ) |
Set vehicle's preferred lateral alignment.
Definition at line 150 of file MSVehicleType.cpp.
References SUMOVTypeParameter::latAlignment, and myParameter.
Referenced by getPreferredLateralAlignment(), MSDevice_Bluelight::notifyMove(), and TraCI_VehicleType::setLateralAlignment().
| void MSVehicleType::setShape | ( | SUMOVehicleShape | shape | ) |
Set a new value for this type's shape.
| [in] | shape | The new shape of this type |
Definition at line 218 of file MSVehicleType.cpp.
References myParameter, and SUMOVTypeParameter::shape.
Referenced by getPreferredLateralAlignment(), TraCI_VehicleType::setShapeClass(), and TraCI_Vehicle::setShapeClass().
| 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.
| [in] | dev | The new speed deviation of this type |
Definition at line 176 of file MSVehicleType.cpp.
References Distribution_Parameterized::getParameter(), myOriginalType, myParameter, and SUMOVTypeParameter::speedFactor.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setSpeedDeviation().
| 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.
| [in] | factor | The new speed factor of this type |
Definition at line 166 of file MSVehicleType.cpp.
References Distribution_Parameterized::getParameter(), myOriginalType, myParameter, and SUMOVTypeParameter::speedFactor.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setSpeedFactor().
| void MSVehicleType::setVClass | ( | SUMOVehicleClass | vclass | ) |
Set a new value for this type's vehicle class.
| [in] | vclass | The new vehicle class of this type |
Definition at line 145 of file MSVehicleType.cpp.
References myParameter, and SUMOVTypeParameter::vehicleClass.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setVehicleClass().
| 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.
| [in] | width | The new width of this type |
Definition at line 198 of file MSVehicleType.cpp.
References getWidth(), myOriginalType, myParameter, and SUMOVTypeParameter::width.
Referenced by getPreferredLateralAlignment(), and TraCI_VehicleType::setWidth().
|
inline |
Returns whether the given parameter was set.
| [in] | what | The parameter which one asks for |
Definition at line 90 of file MSVehicleType.h.
References myParameter, and SUMOVTypeParameter::setParameter.
Referenced by MSRouteHandler::myStartElement(), and GUIBaseVehicle::setFunctionalColor().
|
private |
instance of the car following model.
Definition at line 507 of file MSVehicleType.h.
Referenced by build(), duplicateType(), getCarFollowModel(), and ~MSVehicleType().
|
private |
|
staticprivate |
next value for the running index
Definition at line 513 of file MSVehicleType.h.
|
private |
The original type.
Definition at line 510 of file MSVehicleType.h.
Referenced by duplicateType(), isVehicleSpecific(), setDefaultProbability(), setHeight(), setImpatience(), setLength(), setMaxSpeed(), setMaxSpeedLat(), setMinGap(), setMinGapLat(), setSpeedDeviation(), setSpeedFactor(), and setWidth().
|
private |
the parameter container
Definition at line 501 of file MSVehicleType.h.
Referenced by computeChosenSpeedDeviation(), duplicateType(), getBoardingDuration(), getColor(), getContainerCapacity(), getDefaultProbability(), getEmissionClass(), getGuiShape(), getHeight(), getID(), getImgFile(), getImpatience(), getLaneChangeModel(), getLength(), getLengthWithGap(), getLoadingDuration(), getMaxSpeed(), getMaxSpeedLat(), getMinGap(), getMinGapLat(), getOSGFile(), getParameter(), getPersonCapacity(), getPreferredLateralAlignment(), getSpeedFactor(), getVehicleClass(), getWidth(), setColor(), setDefaultProbability(), setEmissionClass(), setHeight(), setImpatience(), setLength(), setMaxSpeed(), setMaxSpeedLat(), setMinGap(), setMinGapLat(), setPreferredLateralAlignment(), setShape(), setSpeedDeviation(), setSpeedFactor(), setVClass(), setWidth(), and wasSet().