Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIMEVehicleControl Class Reference

The class responsible for building and deletion of vehicles (gui-version) More...

#include <GUIMEVehicleControl.h>

Inheritance diagram for GUIMEVehicleControl:
[legend]
Collaboration diagram for GUIMEVehicleControl:
[legend]

Public Types

typedef std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
 Definition of the internal vehicles map iterator.
 
enum  VehicleDefinitionSource {
  ROUTEFILE , STATE , TRIGGER , LIBSUMO ,
  OTHER
}
 possible origins of a vehicle definition More...
 

Public Member Functions

void abortWaiting ()
 informes about all waiting vehicles (deletion in destructor)
 
void adaptIntermodalRouter (MSTransportableRouter &router) const
 
bool addVehicle (const std::string &id, SUMOVehicle *v) override
 Tries to insert the vehicle into the internal vehicle container.
 
void deleteVehicle (SUMOVehicle *v, bool discard=false, bool wasKept=false) override
 Deletes the vehicle.
 
void discountStateRemoved (int n)
 discount vehicles that were removed during state loading
 
virtual int getHaltingVehicleNo () const override
 Returns the number of halting vehicles.
 
double getMaxSpeedFactor () const
 return the maximum speed factor for all vehicles that ever entered the network
 
double getMinDeceleration () const
 return the minimum deceleration capability for all road vehicles that ever entered the network
 
double getMinDecelerationRail () const
 return the minimum deceleration capability for all ral vehicles that ever entered the network
 
double getScale () const
 sets the demand scaling factor
 
virtual std::pair< double, double > getVehicleMeanSpeeds () const override
 get current absolute and relative mean vehicle speed in the network
 
 GUIMEVehicleControl ()
 Constructor.
 
void handleTriggeredDepart (SUMOVehicle *v, bool add)
 register / unregister depart-triggered vehicles with edges
 
void insertVehicleIDs (std::vector< GUIGlID > &into)
 Returns the list of all known vehicles by gl-id.
 
void registerCollision (bool teleport)
 registers one collision-related teleport
 
void registerEmergencyBraking ()
 register emergency stop
 
void registerEmergencyStop ()
 register emergency stop
 
void registerOneWaiting ()
 increases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks
 
void registerStopEnded ()
 register emergency stop
 
void registerStopStarted ()
 register emergency stop
 
void registerTeleportJam ()
 register one non-collision-related teleport
 
void registerTeleportWrongLane ()
 register one non-collision-related teleport
 
void registerTeleportYield ()
 register one non-collision-related teleport
 
void releaseVehicles ()
 unlock access to vehicle removal/additions for thread synchronization
 
void secureVehicles ()
 lock access to vehicle removal/additions for thread synchronization
 
void setScale (double scale)
 sets the demand scaling factor
 
void unregisterOneWaiting ()
 decreases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks
 
 ~GUIMEVehicleControl ()
 Destructor.
 
Vehicle creation
SUMOVehiclebuildVehicle (SUMOVehicleParameter *defs, ConstMSRoutePtr route, MSVehicleType *type, const bool ignoreStopErrors, const VehicleDefinitionSource source=VehicleDefinitionSource::ROUTEFILE, bool addRouteStops=true) override
 Builds a vehicle, increases the number of built vehicles.
 
Insertion, deletion and retrieval of vehicles
SUMOVehiclegetVehicle (const std::string &id) const
 Returns the vehicle with the given id.
 
void deleteKeptVehicle (SUMOVehicle *veh)
 when a vehicle is kept after arrival, schedule later deletion
 
void fixVehicleCounts ()
 
void scheduleVehicleRemoval (SUMOVehicle *veh, bool checkDuplicate=false)
 Removes a vehicle after it has ended.
 
void removePending ()
 Removes a vehicle after it has ended.
 
constVehIt loadedVehBegin () const
 Returns the begin of the internal vehicle map.
 
constVehIt loadedVehEnd () const
 Returns the end of the internal vehicle map.
 
Setting vehicle statistics
void vehicleDeparted (const SUMOVehicle &v)
 Informs this control about a vehicle's departure.
 
Retrieval of vehicle statistics (always accessable)
int getLoadedVehicleNo () const
 Returns the number of build vehicles.
 
double getVehicleMeanSpeed () const
 
double getVehicleMeanSpeedRelative () const
 
int getEndedVehicleNo () const
 Returns the number of removed vehicles.
 
int getArrivedVehicleNo () const
 Returns the number of arrived vehicles.
 
int getDiscardedVehicleNo () const
 Returns the number of discarded vehicles.
 
int getRunningVehicleNo () const
 Returns the number of build and inserted, but not yet deleted vehicles.
 
int getDepartedVehicleNo () const
 Returns the number of inserted vehicles.
 
int getQuota (double frac=-1, int loaded=-1) const
 Returns the number of instances of the current vehicle that shall be emitted considering that "frac" of all vehicles shall be emitted overall if a negative fraction is given the demand scaling factor is used (–scale) if a negative loaded number is is given, myLoadedVehNo is used.
 
int getActiveVehicleCount () const
 Returns the number of build vehicles that have not been removed or need to wait for a passenger or a container.
 
int getTriggeredVehicleCount () const
 return the number of vehicles that are waiting for a transportable or a join
 
int getCollisionCount () const
 return the number of collisions
 
int getTeleportsCollisions () const
 return the number of collisions
 
int getTeleportsJam () const
 return the number of teleports due to jamming
 
int getTeleportsYield () const
 return the number of teleports due to vehicles stuck on a minor road
 
int getTeleportsWrongLane () const
 return the number of teleports due to vehicles stuck on the wrong lane
 
int getTeleportCount () const
 return the number of teleports (including collisions)
 
int getEmergencyStops () const
 return the number of emergency stops
 
int getEmergencyBrakingCount () const
 return the number of emergency stops
 
int getStoppedVehiclesCount () const
 return the number of vehicles that are currently stopped
 
double getTotalDepartureDelay () const
 Returns the total departure delay.
 
double getTotalTravelTime () const
 Returns the total travel time.
 
Insertion and retrieval of vehicle types
bool addVType (MSVehicleType *vehType)
 Adds a vehicle type.
 
void removeVType (const MSVehicleType *vehType)
 
bool addVTypeDistribution (const std::string &id, RandomDistributor< MSVehicleType * > *vehTypeDistribution)
 Adds a vehicle type distribution.
 
bool hasVType (const std::string &id) const
 Asks for existence of a vehicle type.
 
bool hasVTypeDistribution (const std::string &id) const
 Asks for a vehicle type distribution.
 
MSVehicleTypegetVType (const std::string &id=DEFAULT_VTYPE_ID, SumoRNG *rng=nullptr, bool readOnly=false)
 Returns the named vehicle type or a sample from the named distribution.
 
void insertVTypeIDs (std::vector< std::string > &into) const
 Inserts ids of all known vehicle types and vehicle type distributions to the given vector.
 
const std::set< std::string > getVTypeDistributionMembership (const std::string &id) const
 Return the distribution IDs the vehicle type is a member of.
 
const RandomDistributor< MSVehicleType * > * getVTypeDistribution (const std::string &typeDistID) const
 return the vehicle type distribution with the given id
 
const std::vector< MSVehicleType * > getPedestrianTypes (void) const
 Return all pedestrian vehicle types.
 
State I/O
void setState (int runningVehNo, int loadedVehNo, int endedVehNo, double totalDepartureDelay, double totalTravelTime)
 Sets the current state variables as loaded from the stream.
 
void saveState (OutputDevice &out)
 Saves the current state into the given stream.
 
void clearState (const bool reinit)
 Remove all vehicles before quick-loading state.
 

Protected Member Functions

void initVehicle (MSBaseVehicle *built, const bool ignoreStopErrors, bool addRouteStops, const VehicleDefinitionSource source)
 

Private Member Functions

bool checkVType (const std::string &id)
 Checks whether the vehicle type (distribution) may be added.
 
 GUIMEVehicleControl (const GUIMEVehicleControl &s)
 invalidated copy constructor
 
void initDefaultTypes ()
 create default types
 
bool isPendingRemoval (SUMOVehicle *veh)
 whether the given vehicle is scheduled for removal
 
GUIMEVehicleControloperator= (const GUIMEVehicleControl &s)
 invalidated assignment operator
 

Private Attributes

FXMutex myLock
 The mutex used to avoid concurrent updates of the vehicle buffer.
 
Vehicle statistics (always accessible)
int myLoadedVehNo
 The number of build vehicles.
 
int myRunningVehNo
 The number of vehicles within the network (build and inserted but not removed)
 
int myEndedVehNo
 The number of removed vehicles.
 
int myDiscarded
 The number of vehicles which were discarded while loading.
 
int myCollisions
 The number of collisions.
 
int myTeleportsCollision
 The number of teleports due to collision.
 
int myTeleportsJam
 The number of teleports due to jam.
 
int myTeleportsYield
 The number of teleports due to vehicles stuck on a minor road.
 
int myTeleportsWrongLane
 The number of teleports due to vehicles stuck on the wrong lane.
 
int myEmergencyStops
 The number of emergency stops.
 
int myEmergencyBrakingCount
 The number of emergency stops.
 
int myStoppedVehicles
 The number of stopped vehicles.
 
Vehicle statistics
double myTotalDepartureDelay
 The aggregated time vehicles had to wait for departure (in seconds)
 
double myTotalTravelTime
 The aggregated time vehicles needed to aacomplish their route (in seconds)
 

Vehicle type container

VTypeDictType myVTypeDict
 Dictionary of vehicle types.
 
VTypeDistDictType myVTypeDistDict
 A distribution of vehicle types (probability->vehicle type)
 
std::map< std::string, std::set< std::string > > myVTypeToDist
 Inverse lookup from vehicle type to distributions it is a member of.
 
std::set< std::string > myReplaceableDefaultVTypes
 the default vehicle types which may still be replaced
 
int myWaitingForTransportable
 the number of vehicles waiting for persons or containers contained in myWaiting which can only continue by being triggered
 
double myScale
 The scaling factor (especially for inc-dua)
 
SUMOTime myKeepTime
 
double myMaxSpeedFactor
 The maximum speed factor for all vehicles in the network.
 
double myMinDeceleration
 The minimum deceleration capability for all road vehicles in the network.
 
double myMinDecelerationRail
 The minimum deceleration capability for all rail vehicles in the network.
 
std::vector< SUMOVehicle * > myPTVehicles
 List of vehicles which belong to public transport.
 
std::vector< SUMOVehicle * > myPendingRemovals
 List of vehicles which are going to be removed.
 
typedef std::map< std::string, MSVehicleType * > VTypeDictType
 Vehicle type dictionary type.
 
typedef std::map< std::string, RandomDistributor< MSVehicleType * > * > VTypeDistDictType
 Vehicle type distribution dictionary type.
 

Vehicle container

typedef std::map< std::string, SUMOVehicle * > VehicleDictType
 Vehicle dictionary type.
 
VehicleDictType myVehicleDict
 Dictionary of vehicles.
 

Detailed Description

The class responsible for building and deletion of vehicles (gui-version)

See also
MEVehicleControl

Definition at line 38 of file GUIMEVehicleControl.h.

Member Typedef Documentation

◆ constVehIt

typedef std::map<std::string,SUMOVehicle*>::const_iterator MSVehicleControl::constVehIt
inherited

Definition of the internal vehicles map iterator.

Definition at line 74 of file MSVehicleControl.h.

◆ VehicleDictType

typedef std::map< std::string, SUMOVehicle* > MSVehicleControl::VehicleDictType
protectedinherited

Vehicle dictionary type.

Definition at line 645 of file MSVehicleControl.h.

◆ VTypeDictType

typedef std::map< std::string, MSVehicleType* > MSVehicleControl::VTypeDictType
privateinherited

Vehicle type dictionary type.

Definition at line 668 of file MSVehicleControl.h.

◆ VTypeDistDictType

typedef std::map< std::string, RandomDistributor<MSVehicleType*>* > MSVehicleControl::VTypeDistDictType
privateinherited

Vehicle type distribution dictionary type.

Definition at line 673 of file MSVehicleControl.h.

Member Enumeration Documentation

◆ VehicleDefinitionSource

possible origins of a vehicle definition

Enumerator
ROUTEFILE 
STATE 
TRIGGER 
LIBSUMO 
OTHER 

Definition at line 77 of file MSVehicleControl.h.

Constructor & Destructor Documentation

◆ GUIMEVehicleControl() [1/2]

GUIMEVehicleControl::GUIMEVehicleControl ( )

Constructor.

Definition at line 33 of file GUIMEVehicleControl.cpp.

◆ ~GUIMEVehicleControl()

GUIMEVehicleControl::~GUIMEVehicleControl ( )

Destructor.

Definition at line 37 of file GUIMEVehicleControl.cpp.

References myLock.

◆ GUIMEVehicleControl() [2/2]

GUIMEVehicleControl::GUIMEVehicleControl ( const GUIMEVehicleControl s)
private

invalidated copy constructor

Member Function Documentation

◆ abortWaiting()

void MSVehicleControl::abortWaiting ( )
inherited

informes about all waiting vehicles (deletion in destructor)

Definition at line 494 of file MSVehicleControl.cpp.

References CONTAINER_TRIGGERED, MSStop::containerTriggered, SUMOVehicleParameter::departProcedure, SUMOVehicle::getNextStop(), SUMOTrafficObject::getParameter(), SUMOVehicle::hasDeparted(), SUMOVehicle::isStoppedTriggered(), SUMOVehicleParameter::Stop::join, MSStop::joinTriggered, MSVehicleControl::myVehicleDict, MSStop::pars, SPLIT, TL, MSStop::triggered, TRIGGERED, and WRITE_WARNINGF.

Referenced by MSNet::adaptToState().

Here is the caller graph for this function:

◆ adaptIntermodalRouter()

void MSVehicleControl::adaptIntermodalRouter ( MSTransportableRouter router) const
inherited

Definition at line 584 of file MSVehicleControl.cpp.

References IntermodalNetwork< E, L, N, V >::addSchedule(), MSRoute::dictionary(), IntermodalRouter< E, L, N, V >::getNetwork(), and MSVehicleControl::myPTVehicles.

Referenced by MSNet::adaptIntermodalRouter().

Here is the caller graph for this function:

◆ addVehicle()

bool GUIMEVehicleControl::addVehicle ( const std::string &  id,
SUMOVehicle v 
)
overridevirtual

Tries to insert the vehicle into the internal vehicle container.

Identical to the MSVehicleControl implementation except for locking.

Parameters
[in]idThe id of the vehicle
[in]vThe vehicle
Returns
Whether the vehicle could be inserted (no other vehicle with the same id was inserted before)

Reimplemented from MSVehicleControl.

Definition at line 58 of file GUIMEVehicleControl.cpp.

References MSVehicleControl::addVehicle(), and myLock.

◆ addVType()

bool MSVehicleControl::addVType ( MSVehicleType vehType)
inherited

Adds a vehicle type.

If another vehicle type (or distribution) with the same id exists, false is returned. Otherwise, the vehicle type is added to the internal vehicle type container "myVTypeDict".

This control get responsible for deletion of the added vehicle type.

Parameters
[in]vehTypeThe vehicle type to add
Returns
Whether the vehicle type could be added

Definition at line 382 of file MSVehicleControl.cpp.

References MSVehicleControl::checkVType(), MSVehicleType::getID(), and MSVehicleControl::myVTypeDict.

◆ addVTypeDistribution()

bool MSVehicleControl::addVTypeDistribution ( const std::string &  id,
RandomDistributor< MSVehicleType * > *  vehTypeDistribution 
)
inherited

Adds a vehicle type distribution.

If another vehicle type (or distribution) with the same id exists, false is returned. Otherwise, the vehicle type distribution is added to the internal vehicle type distribution container "myVTypeDistDict".

This control get responsible for deletion of the added vehicle type distribution.

Parameters
[in]idThe id of the distribution to add
[in]vehTypeDistributionThe vehicle type distribution to add
Returns
Whether the vehicle type could be added

Definition at line 404 of file MSVehicleControl.cpp.

References MSVehicleControl::checkVType(), RandomDistributor< T >::getVals(), MSVehicleControl::myVTypeDistDict, and MSVehicleControl::myVTypeToDist.

◆ buildVehicle()

SUMOVehicle * GUIMEVehicleControl::buildVehicle ( SUMOVehicleParameter defs,
ConstMSRoutePtr  route,
MSVehicleType type,
const bool  ignoreStopErrors,
const VehicleDefinitionSource  source = VehicleDefinitionSource::ROUTEFILE,
bool  addRouteStops = true 
)
overridevirtual

Builds a vehicle, increases the number of built vehicles.

Instead of a MEVehicle, a GUIMEVehicle is built

Parameters
[in]defsThe parameter defining the vehicle
[in]routeThe route of this vehicle
[in]typeThe type of this vehicle
[in]ignoreStopErrorswhether invalid stops trigger a warning only
[in]sourcewhether we are just reading the route file or creating via trigger, traci, ...
Returns
The built vehicle (GUIVehicle instance)
See also
MSVehicleControl::buildVehicle

Reimplemented from MEVehicleControl.

Definition at line 46 of file GUIMEVehicleControl.cpp.

References MSVehicleType::computeChosenSpeedDeviation(), MSRouteHandler::getParsingRNG(), MSVehicleControl::initVehicle(), and MSVehicleControl::ROUTEFILE.

◆ checkVType()

bool MSVehicleControl::checkVType ( const std::string &  id)
privateinherited

Checks whether the vehicle type (distribution) may be added.

This method checks also whether the default type may still be replaced

Parameters
[in]idThe id of the vehicle type (distribution) to add
Returns
Whether the type (distribution) may be added

Definition at line 368 of file MSVehicleControl.cpp.

References MSVehicleControl::myReplaceableDefaultVTypes, MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeDistDict.

Referenced by MSVehicleControl::addVType(), and MSVehicleControl::addVTypeDistribution().

Here is the caller graph for this function:

◆ clearState()

◆ deleteKeptVehicle()

void MSVehicleControl::deleteKeptVehicle ( SUMOVehicle veh)
inherited

when a vehicle is kept after arrival, schedule later deletion

Definition at line 196 of file MSVehicleControl.cpp.

References MSEventControl::addEvent(), MSNet::getEndOfTimestepEvents(), MSNet::getInstance(), MSVehicleControl::myEndedVehNo, MSVehicleControl::myKeepTime, and SIMSTEP.

Referenced by MSStateHandler::closeVehicle(), and MSVehicleControl::removePending().

Here is the caller graph for this function:

◆ deleteVehicle()

void GUIMEVehicleControl::deleteVehicle ( SUMOVehicle v,
bool  discard = false,
bool  wasKept = false 
)
overridevirtual

Deletes the vehicle.

Identical to the MSVehicleControl implementation except for locking.

Parameters
[in]vThe vehicle to delete
[discard]Whether the vehicle is discard during loading (scale < 1)

Reimplemented from MSVehicleControl.

Definition at line 65 of file GUIMEVehicleControl.cpp.

References MSVehicleControl::deleteVehicle(), and myLock.

◆ discountStateRemoved()

void MSVehicleControl::discountStateRemoved ( int  n)
inlineinherited

discount vehicles that were removed during state loading

Definition at line 531 of file MSVehicleControl.h.

References MSVehicleControl::myDiscarded, MSVehicleControl::myEndedVehNo, and MSVehicleControl::myRunningVehNo.

Referenced by MSStateHandler::myEndElement().

Here is the caller graph for this function:

◆ fixVehicleCounts()

void MSVehicleControl::fixVehicleCounts ( )
inlineinherited

Definition at line 157 of file MSVehicleControl.h.

References MSVehicleControl::myDiscarded, MSVehicleControl::myEndedVehNo, and MSVehicleControl::myLoadedVehNo.

Referenced by MSRouteHandler::closeVehicle().

Here is the caller graph for this function:

◆ getActiveVehicleCount()

int MSVehicleControl::getActiveVehicleCount ( ) const
inlineinherited

Returns the number of build vehicles that have not been removed or need to wait for a passenger or a container.

Returns
Number of active vehicles

Definition at line 303 of file MSVehicleControl.h.

References MSVehicleControl::myEndedVehNo, MSVehicleControl::myLoadedVehNo, and MSVehicleControl::myWaitingForTransportable.

Referenced by LIBSUMO_NAMESPACE::Simulation::getMinExpectedNumber(), and MSNet::simulationState().

Here is the caller graph for this function:

◆ getArrivedVehicleNo()

int MSVehicleControl::getArrivedVehicleNo ( ) const
inlineinherited

Returns the number of arrived vehicles.

Returns
The number of vehicles that have arrived at their destination

Definition at line 261 of file MSVehicleControl.h.

References MSVehicleControl::myDiscarded, and MSVehicleControl::myEndedVehNo.

Referenced by GUINet::getParameterWindow(), and MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getCollisionCount()

int MSVehicleControl::getCollisionCount ( ) const
inlineinherited

return the number of collisions

Definition at line 314 of file MSVehicleControl.h.

References MSVehicleControl::myCollisions.

Referenced by GUIApplicationWindow::checkGamingEvents(), MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), GUINet::getParameterWindow(), MSNet::writeStatistics(), and MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getDepartedVehicleNo()

int MSVehicleControl::getDepartedVehicleNo ( ) const
inlineinherited

Returns the number of inserted vehicles.

Returns
The number of vehicles that have entered the simulation so far

Definition at line 284 of file MSVehicleControl.h.

References MSVehicleControl::myDiscarded, MSVehicleControl::myEndedVehNo, and MSVehicleControl::myRunningVehNo.

Referenced by MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), GUINet::getParameterWindow(), MSNet::postSimStepOutput(), MSNet::writeStatistics(), and MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getDiscardedVehicleNo()

int MSVehicleControl::getDiscardedVehicleNo ( ) const
inlineinherited

Returns the number of discarded vehicles.

Returns
The number of vehicles that could not be inserted and were permantently discarded

Definition at line 268 of file MSVehicleControl.h.

References MSVehicleControl::myDiscarded.

Referenced by GUINet::getParameterWindow().

Here is the caller graph for this function:

◆ getEmergencyBrakingCount()

int MSVehicleControl::getEmergencyBrakingCount ( ) const
inlineinherited

return the number of emergency stops

Definition at line 347 of file MSVehicleControl.h.

References MSVehicleControl::myEmergencyBrakingCount.

Referenced by MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), and MSNet::writeStatistics().

Here is the caller graph for this function:

◆ getEmergencyStops()

int MSVehicleControl::getEmergencyStops ( ) const
inlineinherited

return the number of emergency stops

Definition at line 342 of file MSVehicleControl.h.

References MSVehicleControl::myEmergencyStops.

Referenced by MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), and MSNet::writeStatistics().

Here is the caller graph for this function:

◆ getEndedVehicleNo()

int MSVehicleControl::getEndedVehicleNo ( ) const
inlineinherited

Returns the number of removed vehicles.

Returns
The number of vehicles that have left the simulation

Definition at line 254 of file MSVehicleControl.h.

References MSVehicleControl::myEndedVehNo.

Referenced by MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getHaltingVehicleNo()

int GUIMEVehicleControl::getHaltingVehicleNo ( ) const
overridevirtual

Returns the number of halting vehicles.

Returns
The number of halting vehicles

Reimplemented from MSVehicleControl.

Definition at line 91 of file GUIMEVehicleControl.cpp.

References MSVehicleControl::getHaltingVehicleNo(), and myLock.

◆ getLoadedVehicleNo()

int MSVehicleControl::getLoadedVehicleNo ( ) const
inlineinherited

Returns the number of build vehicles.

Returns
The number of loaded (build) vehicles

Definition at line 232 of file MSVehicleControl.h.

References MSVehicleControl::myLoadedVehNo.

Referenced by NLBuilder::build(), MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), GUINet::getParameterWindow(), MSNet::writeStatistics(), and MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getMaxSpeedFactor()

double MSVehicleControl::getMaxSpeedFactor ( ) const
inlineinherited

return the maximum speed factor for all vehicles that ever entered the network

Definition at line 543 of file MSVehicleControl.h.

References MSVehicleControl::myMaxSpeedFactor.

Referenced by MSLane::getMaximumBrakeDist().

Here is the caller graph for this function:

◆ getMinDeceleration()

double MSVehicleControl::getMinDeceleration ( ) const
inlineinherited

return the minimum deceleration capability for all road vehicles that ever entered the network

Definition at line 548 of file MSVehicleControl.h.

References MSVehicleControl::myMinDeceleration.

Referenced by MSLane::getMaximumBrakeDist().

Here is the caller graph for this function:

◆ getMinDecelerationRail()

double MSVehicleControl::getMinDecelerationRail ( ) const
inlineinherited

return the minimum deceleration capability for all ral vehicles that ever entered the network

Definition at line 553 of file MSVehicleControl.h.

References MSVehicleControl::myMinDecelerationRail.

Referenced by MSLane::getMaximumBrakeDist().

Here is the caller graph for this function:

◆ getPedestrianTypes()

const std::vector< MSVehicleType * > MSVehicleControl::getPedestrianTypes ( void  ) const
inherited

Return all pedestrian vehicle types.

Definition at line 483 of file MSVehicleControl.cpp.

References MSVehicleControl::myVTypeDict, and SVC_PEDESTRIAN.

◆ getQuota()

int MSVehicleControl::getQuota ( double  frac = -1,
int  loaded = -1 
) const
inherited

Returns the number of instances of the current vehicle that shall be emitted considering that "frac" of all vehicles shall be emitted overall if a negative fraction is given the demand scaling factor is used (–scale) if a negative loaded number is is given, myLoadedVehNo is used.

Returns
the number of vehicles to create (something between 0 and ceil(frac))

Definition at line 566 of file MSVehicleControl.cpp.

References getScalingQuota(), MSVehicleControl::myLoadedVehNo, and MSVehicleControl::myScale.

Referenced by MSRouteHandler::addFlowTransportable(), MSRouteHandler::closeVehicle(), MSInsertionControl::determineCandidates(), and MSDevice::equippedByDefaultAssignmentOptions().

Here is the caller graph for this function:

◆ getRunningVehicleNo()

int MSVehicleControl::getRunningVehicleNo ( ) const
inlineinherited

Returns the number of build and inserted, but not yet deleted vehicles.

Returns
The number simulated vehicles (including those in teleporter)

Definition at line 276 of file MSVehicleControl.h.

References MSVehicleControl::myRunningVehNo.

Referenced by MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), GUINet::getParameterWindow(), GUIApplicationWindow::handleEvent_SimulationStep(), MSNet::postMoveStep(), MSNet::postSimStepOutput(), GUINet::setSimDuration(), MSNet::writeStatistics(), and MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getScale()

double MSVehicleControl::getScale ( ) const
inlineinherited

sets the demand scaling factor

Definition at line 565 of file MSVehicleControl.h.

References MSVehicleControl::myScale.

Referenced by MSRouteHandler::addFlowTransportable(), MSRouteHandler::closeVehicle(), MSInsertionControl::determineCandidates(), and LIBSUMO_NAMESPACE::Simulation::getScale().

Here is the caller graph for this function:

◆ getStoppedVehiclesCount()

int MSVehicleControl::getStoppedVehiclesCount ( ) const
inlineinherited

return the number of vehicles that are currently stopped

Definition at line 352 of file MSVehicleControl.h.

References MSVehicleControl::myStoppedVehicles.

Referenced by GUINet::getParameterWindow(), and MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getTeleportCount()

int MSVehicleControl::getTeleportCount ( ) const
inherited

return the number of teleports (including collisions)

Definition at line 578 of file MSVehicleControl.cpp.

References MSVehicleControl::myTeleportsCollision, MSVehicleControl::myTeleportsJam, MSVehicleControl::myTeleportsWrongLane, and MSVehicleControl::myTeleportsYield.

Referenced by MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), GUINet::getParameterWindow(), MSNet::simulationState(), MSNet::writeStatistics(), and MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getTeleportsCollisions()

int MSVehicleControl::getTeleportsCollisions ( ) const
inlineinherited

return the number of collisions

Definition at line 319 of file MSVehicleControl.h.

References MSVehicleControl::myTeleportsCollision.

◆ getTeleportsJam()

int MSVehicleControl::getTeleportsJam ( ) const
inlineinherited

return the number of teleports due to jamming

Definition at line 324 of file MSVehicleControl.h.

References MSVehicleControl::myTeleportsJam.

Referenced by MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), and MSNet::writeStatistics().

Here is the caller graph for this function:

◆ getTeleportsWrongLane()

int MSVehicleControl::getTeleportsWrongLane ( ) const
inlineinherited

return the number of teleports due to vehicles stuck on the wrong lane

Definition at line 334 of file MSVehicleControl.h.

References MSVehicleControl::myTeleportsWrongLane.

Referenced by MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), and MSNet::writeStatistics().

Here is the caller graph for this function:

◆ getTeleportsYield()

int MSVehicleControl::getTeleportsYield ( ) const
inlineinherited

return the number of teleports due to vehicles stuck on a minor road

Definition at line 329 of file MSVehicleControl.h.

References MSVehicleControl::myTeleportsYield.

Referenced by MSNet::generateStatistics(), LIBSUMO_NAMESPACE::Simulation::getParameter(), and MSNet::writeStatistics().

Here is the caller graph for this function:

◆ getTotalDepartureDelay()

double MSVehicleControl::getTotalDepartureDelay ( ) const
inlineinherited

Returns the total departure delay.

Returns
Sum of steps vehicles had to wait until being inserted

Definition at line 359 of file MSVehicleControl.h.

References MSVehicleControl::myTotalDepartureDelay.

Referenced by MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getTotalTravelTime()

double MSVehicleControl::getTotalTravelTime ( ) const
inlineinherited

Returns the total travel time.

Returns
Sum of travel times of arrived vehicles

Definition at line 367 of file MSVehicleControl.h.

References MSVehicleControl::myTotalTravelTime.

Referenced by MSNet::writeSummaryOutput().

Here is the caller graph for this function:

◆ getTriggeredVehicleCount()

int MSVehicleControl::getTriggeredVehicleCount ( ) const
inlineinherited

return the number of vehicles that are waiting for a transportable or a join

Definition at line 308 of file MSVehicleControl.h.

References MSVehicleControl::myWaitingForTransportable.

◆ getVehicle()

SUMOVehicle * MSVehicleControl::getVehicle ( const std::string &  id) const
inherited

Returns the vehicle with the given id.

If no vehicle with the given id is store din "myVehicleDict", 0 is returned.

Parameters
[in]idThe id of the vehicle to retrieve
Returns
The vehicle with the given id, 0 if no such vehicle exists

Definition at line 339 of file MSVehicleControl.cpp.

References MSVehicleControl::myVehicleDict.

Referenced by LIBSUMO_NAMESPACE::Vehicle::add(), MSRouteHandler::addRideOrTransport(), MSStateHandler::closeVehicle(), MSRouteHandler::closeVehicle(), MSInsertionControl::determineCandidates(), METriggeredCalibrator::execute(), Command_RouteReplacement::execute(), MSCalibrator::execute(), MSCFModel_CC::findVehicle(), LIBSUMO_NAMESPACE::Vehicle::getFollowSpeed(), LIBSUMO_NAMESPACE::TrafficLight::getFutureTripIds(), MSInsertionControl::getLastFlowVehicle(), MSBaseVehicle::getLeavingPersonNumber(), LIBSUMO_NAMESPACE::Vehicle::getSecureGap(), LIBSUMO_NAMESPACE::Polygon::getTrafficObject(), MSRailSignalConstraint::getVeh(), libsumo::Helper::getVehicle(), LIBSUMO_NAMESPACE::Vehicle::isOnInit(), MSLane::loadState(), MESegment::loadState(), MSVehicleTransfer::loadState(), MSDriveWay::loadState(), MSStageDriving::loadState(), MSStateHandler::myStartElement(), MSDevice_Bluelight::notifyMove(), MSDevice_Transportable::notifyMove(), libsumo::Helper::postProcessRemoteControl(), MSStageDriving::proceed(), MSDevice_SSM::processEncounters(), MSVehicle::processNextStop(), TraCIServerAPI_Vehicle::processSet(), MSCalibrator::removePending(), MSDevice_FCDReplay::FCDHandler::updateTrafficObjects(), and GUINet::vehicleExists().

Here is the caller graph for this function:

◆ getVehicleMeanSpeed()

double MSVehicleControl::getVehicleMeanSpeed ( ) const
inlineinherited

Definition at line 244 of file MSVehicleControl.h.

References MSVehicleControl::getVehicleMeanSpeeds().

Referenced by GUINet::getParameterWindow().

Here is the caller graph for this function:

◆ getVehicleMeanSpeedRelative()

double MSVehicleControl::getVehicleMeanSpeedRelative ( ) const
inlineinherited

Definition at line 247 of file MSVehicleControl.h.

References MSVehicleControl::getVehicleMeanSpeeds().

Referenced by GUINet::getParameterWindow().

Here is the caller graph for this function:

◆ getVehicleMeanSpeeds()

std::pair< double, double > GUIMEVehicleControl::getVehicleMeanSpeeds ( ) const
overridevirtual

get current absolute and relative mean vehicle speed in the network

Reimplemented from MSVehicleControl.

Definition at line 84 of file GUIMEVehicleControl.cpp.

References MSVehicleControl::getVehicleMeanSpeeds(), and myLock.

◆ getVType()

MSVehicleType * MSVehicleControl::getVType ( const std::string &  id = DEFAULT_VTYPE_ID,
SumoRNG rng = nullptr,
bool  readOnly = false 
)
inherited

Returns the named vehicle type or a sample from the named distribution.

Parameters
[in]idThe id of the vehicle type to return. If left out, the default type is returned.
Returns
The named vehicle type, or nullptr if no such type exists

Definition at line 434 of file MSVehicleControl.cpp.

References MSVehicleType::check(), MSVehicleControl::myReplaceableDefaultVTypes, MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeDistDict.

Referenced by LIBSUMO_NAMESPACE::Person::add(), LIBSUMO_NAMESPACE::Vehicle::add(), MSRouteHandler::addTranship(), MSRouteHandler::closeRoute(), MSRouteHandler::closeTransportable(), MSRouteHandler::closeTransportableFlow(), MSRouteHandler::closeVehicle(), MSInsertionControl::determineCandidates(), METriggeredCalibrator::execute(), MSCalibrator::execute(), LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), LIBSUMO_NAMESPACE::Simulation::findRoute(), MSStageTrip::getVehicles(), LIBSUMO_NAMESPACE::VehicleType::getVType(), MSDevice_ToC::initColorScheme(), MSInsertionControl::initScale(), MSDevice_ToC::MSDevice_ToC(), MSPModel_Striping::MSPModel_Striping(), MSCalibrator::myStartElement(), MSCalibrator::VehicleRemover::notifyEnter(), MSDevice_Bluelight::notifyMove(), MSRouteHandler::openVehicleTypeDistribution(), METriggeredCalibrator::remainingVehicleCapacity(), MSCalibrator::remainingVehicleCapacity(), MSDevice_Bluelight::resetVehicle(), MSStageDriving::setArrived(), LIBSUMO_NAMESPACE::Calibrator::setFlow(), MSDevice_ToC::setParameter(), LIBSUMO_NAMESPACE::Person::setType(), LIBSUMO_NAMESPACE::Vehicle::setType(), MSDevice_ToC::switchHolderType(), MSDevice_FCDReplay::FCDHandler::updateTrafficObjects(), and MSMeanData_Emissions::MSLaneMeanDataValues::write().

Here is the caller graph for this function:

◆ getVTypeDistribution()

const RandomDistributor< MSVehicleType * > * MSVehicleControl::getVTypeDistribution ( const std::string &  typeDistID) const
inherited

return the vehicle type distribution with the given id

Definition at line 473 of file MSVehicleControl.cpp.

References MSVehicleControl::myVTypeDistDict.

Referenced by MSInsertionControl::initScale(), MSCalibrator::VehicleRemover::notifyEnter(), and MSRouteHandler::openVehicleTypeDistribution().

Here is the caller graph for this function:

◆ getVTypeDistributionMembership()

const std::set< std::string > MSVehicleControl::getVTypeDistributionMembership ( const std::string &  id) const
inherited

Return the distribution IDs the vehicle type is a member of.

Parameters
[in]vehTypeThe vehicle type to look for membership in distributions

Definition at line 463 of file MSVehicleControl.cpp.

References MSVehicleControl::myVTypeToDist.

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

Here is the caller graph for this function:

◆ handleTriggeredDepart()

void MSVehicleControl::handleTriggeredDepart ( SUMOVehicle v,
bool  add 
)
inherited

◆ hasVType()

bool MSVehicleControl::hasVType ( const std::string &  id) const
inherited

Asks for existence of a vehicle type.

If vehicle type or distribution with the id exists, true is returned, false otherwise.

Parameters
[in]idThe id of the type or distribution
Returns
Whether the vehicle type or distribution exists

Definition at line 422 of file MSVehicleControl.cpp.

References MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeDistDict.

Referenced by LIBSUMO_NAMESPACE::Simulation::findIntermodalRoute(), and MSDevice_ToC::MSDevice_ToC().

Here is the caller graph for this function:

◆ hasVTypeDistribution()

bool MSVehicleControl::hasVTypeDistribution ( const std::string &  id) const
inherited

Asks for a vehicle type distribution.

If vehicle type distribution with the id exists, true is returned, false otherwise.

Parameters
[in]idThe id of the distribution
Returns
Whether the vehicle type distribution exists

Definition at line 428 of file MSVehicleControl.cpp.

References MSVehicleControl::myVTypeDistDict.

Referenced by MSRouteHandler::closeVehicle(), MSInsertionControl::initScale(), MSDevice_ToC::MSDevice_ToC(), and MSBaseVehicle::saveState().

Here is the caller graph for this function:

◆ initDefaultTypes()

◆ initVehicle()

void MSVehicleControl::initVehicle ( MSBaseVehicle built,
const bool  ignoreStopErrors,
bool  addRouteStops,
const VehicleDefinitionSource  source 
)
protectedinherited

Definition at line 122 of file MSVehicleControl.cpp.

References MSBaseVehicle::addStops(), MSNet::BUILT, MSNet::getInstance(), MSNet::informVehicleStateListener(), MSBaseVehicle::initDevices(), MSVehicleControl::myLoadedVehNo, and MSVehicleControl::STATE.

Referenced by MSVehicleControl::buildVehicle(), GUIVehicleControl::buildVehicle(), buildVehicle(), and MEVehicleControl::buildVehicle().

Here is the caller graph for this function:

◆ insertVehicleIDs()

void GUIMEVehicleControl::insertVehicleIDs ( std::vector< GUIGlID > &  into)

Returns the list of all known vehicles by gl-id.

Parameters
[fill]into The list to fill with vehicle ids
Todo:
Well, what about concurrent modifications?

Definition at line 72 of file GUIMEVehicleControl.cpp.

References GUIGlObject::getGlID(), SUMOVehicle::isOnRoad(), myLock, and MSVehicleControl::myVehicleDict.

◆ insertVTypeIDs()

void MSVehicleControl::insertVTypeIDs ( std::vector< std::string > &  into) const
inherited

Inserts ids of all known vehicle types and vehicle type distributions to the given vector.

Parameters
[in]intoThe vector to fill with ids

Definition at line 451 of file MSVehicleControl.cpp.

References MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeDistDict.

◆ isPendingRemoval()

bool MSVehicleControl::isPendingRemoval ( SUMOVehicle veh)
privateinherited

whether the given vehicle is scheduled for removal

Definition at line 147 of file MSVehicleControl.cpp.

References MSVehicleControl::myPendingRemovals.

Referenced by MSVehicleControl::scheduleVehicleRemoval().

Here is the caller graph for this function:

◆ loadedVehBegin()

◆ loadedVehEnd()

◆ operator=()

GUIMEVehicleControl & GUIMEVehicleControl::operator= ( const GUIMEVehicleControl s)
private

invalidated assignment operator

◆ registerCollision()

void MSVehicleControl::registerCollision ( bool  teleport)
inlineinherited

registers one collision-related teleport

Definition at line 473 of file MSVehicleControl.h.

References MSVehicleControl::myCollisions, and MSVehicleControl::myTeleportsCollision.

Referenced by MSLane::executeMovements(), MSLane::handleCollisionBetween(), and MSLane::handleIntermodalCollisionBetween().

Here is the caller graph for this function:

◆ registerEmergencyBraking()

void MSVehicleControl::registerEmergencyBraking ( )
inlineinherited

register emergency stop

Definition at line 501 of file MSVehicleControl.h.

References MSVehicleControl::myEmergencyBrakingCount.

Referenced by MSVehicle::updateState().

Here is the caller graph for this function:

◆ registerEmergencyStop()

void MSVehicleControl::registerEmergencyStop ( )
inlineinherited

register emergency stop

Definition at line 496 of file MSVehicleControl.h.

References MSVehicleControl::myEmergencyStops.

Referenced by MSVehicle::executeMove().

Here is the caller graph for this function:

◆ registerOneWaiting()

void MSVehicleControl::registerOneWaiting ( )
inlineinherited

increases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks

Definition at line 462 of file MSVehicleControl.h.

References MSVehicleControl::myWaitingForTransportable.

Referenced by MSVehicleControl::handleTriggeredDepart(), MEVehicle::mayProceed(), and MSVehicle::processNextStop().

Here is the caller graph for this function:

◆ registerStopEnded()

void MSVehicleControl::registerStopEnded ( )
inlineinherited

register emergency stop

Definition at line 511 of file MSVehicleControl.h.

References MSVehicleControl::myStoppedVehicles.

Referenced by MSVehicle::resumeFromStopping().

Here is the caller graph for this function:

◆ registerStopStarted()

void MSVehicleControl::registerStopStarted ( )
inlineinherited

register emergency stop

Definition at line 506 of file MSVehicleControl.h.

References MSVehicleControl::myStoppedVehicles.

Referenced by MSVehicle::processNextStop().

Here is the caller graph for this function:

◆ registerTeleportJam()

void MSVehicleControl::registerTeleportJam ( )
inlineinherited

register one non-collision-related teleport

Definition at line 481 of file MSVehicleControl.h.

References MSVehicleControl::myTeleportsJam.

Referenced by MSLane::executeMovements(), and MELoop::teleportVehicle().

Here is the caller graph for this function:

◆ registerTeleportWrongLane()

void MSVehicleControl::registerTeleportWrongLane ( )
inlineinherited

register one non-collision-related teleport

Definition at line 491 of file MSVehicleControl.h.

References MSVehicleControl::myTeleportsWrongLane.

Referenced by MSLane::executeMovements().

Here is the caller graph for this function:

◆ registerTeleportYield()

void MSVehicleControl::registerTeleportYield ( )
inlineinherited

register one non-collision-related teleport

Definition at line 486 of file MSVehicleControl.h.

References MSVehicleControl::myTeleportsYield.

Referenced by MSLane::executeMovements().

Here is the caller graph for this function:

◆ releaseVehicles()

void GUIMEVehicleControl::releaseVehicles ( )

unlock access to vehicle removal/additions for thread synchronization

Definition at line 104 of file GUIMEVehicleControl.cpp.

References myLock.

Referenced by GUIEdge::drawMesoVehicles().

Here is the caller graph for this function:

◆ removePending()

void MSVehicleControl::removePending ( )
inherited

Removes a vehicle after it has ended.

Writes output to tripinfos and vehroutes if wished; decrements the number of running vehicles and increments the number of ended vehicles. Then deletes the vehicle using "deleteVehicle".

This method should be called for each vehicle that was inserted into the network and quits its ride.

Parameters
[in]vehThe vehicle to remove

Definition at line 157 of file MSVehicleControl.cpp.

References MSNet::ARRIVED, OutputDevice::closeTag(), MSVehicleControl::deleteKeptVehicle(), MSVehicleControl::deleteVehicle(), OutputDevice::flush(), OutputDevice::getDeviceByOption(), MSNet::getInstance(), OptionsCont::getOptions(), MSNet::informVehicleStateListener(), OptionsCont::isSet(), MSVehicleControl::myKeepTime, MSVehicleControl::myPendingRemovals, MSVehicleControl::myRunningVehNo, MSVehicleControl::myTotalTravelTime, and STEPS2TIME.

Referenced by MSEdgeControl::executeMovements(), LIBSUMO_NAMESPACE::Vehicle::remove(), and MSNet::simulationStep().

Here is the caller graph for this function:

◆ removeVType()

void MSVehicleControl::removeVType ( const MSVehicleType vehType)
inherited

Definition at line 392 of file MSVehicleControl.cpp.

References MSVehicleType::getID(), MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeToDist.

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

Here is the caller graph for this function:

◆ saveState()

◆ scheduleVehicleRemoval()

void MSVehicleControl::scheduleVehicleRemoval ( SUMOVehicle veh,
bool  checkDuplicate = false 
)
inherited

Removes a vehicle after it has ended.

Writes output to tripinfos and vehroutes if wished; decrements the number of running vehicles and increments the number of ended vehicles. Then deletes the vehicle using "deleteVehicle".

This method should be called for each vehicle that was inserted into the network and quits its ride.

Parameters
[in]vehThe vehicle to remove

Definition at line 138 of file MSVehicleControl.cpp.

References MSVehicleControl::isPendingRemoval(), MSVehicleControl::myPendingRemovals, and MSVehicleControl::myRunningVehNo.

Referenced by MSVehicleTransfer::add(), MELoop::changeSegment(), MSVehicleTransfer::checkInsertions(), MSLane::detectCollisions(), MSLane::executeMovements(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdRemoveObject(), MESegment::receive(), LIBSUMO_NAMESPACE::Vehicle::remove(), MSCalibrator::removePending(), and MELoop::teleportVehicle().

Here is the caller graph for this function:

◆ secureVehicles()

void GUIMEVehicleControl::secureVehicles ( )

lock access to vehicle removal/additions for thread synchronization

Definition at line 98 of file GUIMEVehicleControl.cpp.

References myLock.

Referenced by GUIEdge::drawMesoVehicles().

Here is the caller graph for this function:

◆ setScale()

void MSVehicleControl::setScale ( double  scale)
inlineinherited

sets the demand scaling factor

Definition at line 560 of file MSVehicleControl.h.

References MSVehicleControl::myScale.

Referenced by GUIApplicationWindow::handleEvent_SimulationLoaded(), GUIApplicationWindow::onCmdDemandScale(), and LIBSUMO_NAMESPACE::Simulation::setScale().

Here is the caller graph for this function:

◆ setState()

void MSVehicleControl::setState ( int  runningVehNo,
int  loadedVehNo,
int  endedVehNo,
double  totalDepartureDelay,
double  totalTravelTime 
)
inherited

Sets the current state variables as loaded from the stream.

Definition at line 217 of file MSVehicleControl.cpp.

References MSVehicleControl::myEndedVehNo, MSVehicleControl::myLoadedVehNo, MSVehicleControl::myRunningVehNo, MSVehicleControl::myTotalDepartureDelay, and MSVehicleControl::myTotalTravelTime.

Referenced by MSStateHandler::myEndElement().

Here is the caller graph for this function:

◆ unregisterOneWaiting()

void MSVehicleControl::unregisterOneWaiting ( )
inlineinherited

decreases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks

Definition at line 468 of file MSVehicleControl.h.

References MSVehicleControl::myWaitingForTransportable.

Referenced by MSVehicle::boardTransportables(), MSVehicleControl::handleTriggeredDepart(), MSVehicle::joinTrainPart(), MSVehicle::joinTrainPartFront(), MEVehicle::mayProceed(), MSVehicle::processNextStop(), MEVehicle::resumeFromStopping(), MSVehicle::resumeFromStopping(), and MSBaseVehicle::unregisterWaiting().

Here is the caller graph for this function:

◆ vehicleDeparted()

void MSVehicleControl::vehicleDeparted ( const SUMOVehicle v)
inherited

Informs this control about a vehicle's departure.

If the mean waiting time shall be computed (f.e. for summary-output), the absolut waiting time is increased by the waiting time of the given vehicle.

Parameters
[in]vThe inserted vehicle

Definition at line 202 of file MSVehicleControl.cpp.

References SUMOVehicleParameter::depart, MSNet::DEPARTED, MSVehicleType::getCarFollowModel(), SUMOTrafficObject::getChosenSpeedFactor(), SUMOVehicle::getDeparture(), MSNet::getInstance(), MSCFModel::getMaxDecel(), SUMOTrafficObject::getParameter(), SUMOTrafficObject::getVClass(), SUMOTrafficObject::getVehicleType(), MSNet::informVehicleStateListener(), MAX2(), MIN2(), MSVehicleControl::myMaxSpeedFactor, MSVehicleControl::myMinDeceleration, MSVehicleControl::myMinDecelerationRail, MSVehicleControl::myRunningVehNo, MSVehicleControl::myTotalDepartureDelay, STEPFLOOR, STEPS2TIME, SVC_NON_ROAD, SVC_PEDESTRIAN, and SVC_RAIL_CLASSES.

Referenced by MSBaseVehicle::onDepart().

Here is the caller graph for this function:

Field Documentation

◆ myCollisions

int MSVehicleControl::myCollisions
privateinherited

◆ myDiscarded

◆ myEmergencyBrakingCount

int MSVehicleControl::myEmergencyBrakingCount
privateinherited

◆ myEmergencyStops

int MSVehicleControl::myEmergencyStops
privateinherited

The number of emergency stops.

Definition at line 619 of file MSVehicleControl.h.

Referenced by MSVehicleControl::clearState(), MSVehicleControl::getEmergencyStops(), and MSVehicleControl::registerEmergencyStop().

◆ myEndedVehNo

◆ myKeepTime

SUMOTime MSVehicleControl::myKeepTime
privateinherited

◆ myLoadedVehNo

◆ myLock

FXMutex GUIMEVehicleControl::myLock
mutableprivate

The mutex used to avoid concurrent updates of the vehicle buffer.

Definition at line 110 of file GUIMEVehicleControl.h.

Referenced by addVehicle(), deleteVehicle(), getHaltingVehicleNo(), getVehicleMeanSpeeds(), insertVehicleIDs(), releaseVehicles(), secureVehicles(), and ~GUIMEVehicleControl().

◆ myMaxSpeedFactor

double MSVehicleControl::myMaxSpeedFactor
privateinherited

The maximum speed factor for all vehicles in the network.

Definition at line 692 of file MSVehicleControl.h.

Referenced by MSVehicleControl::getMaxSpeedFactor(), and MSVehicleControl::vehicleDeparted().

◆ myMinDeceleration

double MSVehicleControl::myMinDeceleration
privateinherited

The minimum deceleration capability for all road vehicles in the network.

Definition at line 695 of file MSVehicleControl.h.

Referenced by MSVehicleControl::getMinDeceleration(), and MSVehicleControl::vehicleDeparted().

◆ myMinDecelerationRail

double MSVehicleControl::myMinDecelerationRail
privateinherited

The minimum deceleration capability for all rail vehicles in the network.

Definition at line 697 of file MSVehicleControl.h.

Referenced by MSVehicleControl::getMinDecelerationRail(), and MSVehicleControl::vehicleDeparted().

◆ myPendingRemovals

std::vector<SUMOVehicle*> MSVehicleControl::myPendingRemovals
privateinherited

◆ myPTVehicles

std::vector<SUMOVehicle*> MSVehicleControl::myPTVehicles
privateinherited

List of vehicles which belong to public transport.

Definition at line 700 of file MSVehicleControl.h.

Referenced by MSVehicleControl::adaptIntermodalRouter(), MSVehicleControl::addVehicle(), and MSVehicleControl::deleteVehicle().

◆ myReplaceableDefaultVTypes

std::set<std::string> MSVehicleControl::myReplaceableDefaultVTypes
privateinherited

the default vehicle types which may still be replaced

Definition at line 681 of file MSVehicleControl.h.

Referenced by MSVehicleControl::checkVType(), MSVehicleControl::getVType(), MSVehicleControl::initDefaultTypes(), and MSVehicleControl::saveState().

◆ myRunningVehNo

◆ myScale

double MSVehicleControl::myScale
privateinherited

The scaling factor (especially for inc-dua)

Definition at line 687 of file MSVehicleControl.h.

Referenced by MSVehicleControl::getQuota(), MSVehicleControl::getScale(), MSVehicleControl::MSVehicleControl(), and MSVehicleControl::setScale().

◆ myStoppedVehicles

int MSVehicleControl::myStoppedVehicles
privateinherited

◆ myTeleportsCollision

int MSVehicleControl::myTeleportsCollision
privateinherited

◆ myTeleportsJam

int MSVehicleControl::myTeleportsJam
privateinherited

◆ myTeleportsWrongLane

int MSVehicleControl::myTeleportsWrongLane
privateinherited

The number of teleports due to vehicles stuck on the wrong lane.

Definition at line 616 of file MSVehicleControl.h.

Referenced by MSVehicleControl::clearState(), MSVehicleControl::getTeleportCount(), MSVehicleControl::getTeleportsWrongLane(), and MSVehicleControl::registerTeleportWrongLane().

◆ myTeleportsYield

int MSVehicleControl::myTeleportsYield
privateinherited

The number of teleports due to vehicles stuck on a minor road.

Definition at line 613 of file MSVehicleControl.h.

Referenced by MSVehicleControl::clearState(), MSVehicleControl::getTeleportCount(), MSVehicleControl::getTeleportsYield(), and MSVehicleControl::registerTeleportYield().

◆ myTotalDepartureDelay

double MSVehicleControl::myTotalDepartureDelay
privateinherited

The aggregated time vehicles had to wait for departure (in seconds)

Definition at line 633 of file MSVehicleControl.h.

Referenced by MSVehicleControl::clearState(), MSVehicleControl::getTotalDepartureDelay(), MSVehicleControl::saveState(), MSVehicleControl::setState(), and MSVehicleControl::vehicleDeparted().

◆ myTotalTravelTime

double MSVehicleControl::myTotalTravelTime
privateinherited

The aggregated time vehicles needed to aacomplish their route (in seconds)

Definition at line 636 of file MSVehicleControl.h.

Referenced by MSVehicleControl::clearState(), MSVehicleControl::getTotalTravelTime(), MSVehicleControl::removePending(), MSVehicleControl::saveState(), and MSVehicleControl::setState().

◆ myVehicleDict

◆ myVTypeDict

◆ myVTypeDistDict

◆ myVTypeToDist

std::map<std::string, std::set<std::string> > MSVehicleControl::myVTypeToDist
privateinherited

Inverse lookup from vehicle type to distributions it is a member of.

Definition at line 678 of file MSVehicleControl.h.

Referenced by MSVehicleControl::addVTypeDistribution(), MSVehicleControl::getVTypeDistributionMembership(), and MSVehicleControl::removeVType().

◆ myWaitingForTransportable

int MSVehicleControl::myWaitingForTransportable
privateinherited

the number of vehicles waiting for persons or containers contained in myWaiting which can only continue by being triggered

Definition at line 684 of file MSVehicleControl.h.

Referenced by MSVehicleControl::getActiveVehicleCount(), MSVehicleControl::getTriggeredVehicleCount(), MSVehicleControl::registerOneWaiting(), and MSVehicleControl::unregisterOneWaiting().


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