SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSVehicleControl Class Reference

The class responsible for building and deletion of vehicles. More...

#include <MSVehicleControl.h>

Inheritance diagram for MSVehicleControl:
GUIVehicleControl

Public Types

typedef std::map< std::string,
SUMOVehicle * >
::const_iterator 
constVehIt
 Definition of the internal vehicles map iterator.

Public Member Functions

void abortWaiting ()
 removes any vehicles that are still waiting
void addWaiting (const MSEdge *const edge, SUMOVehicle *vehicle)
SUMOVehiclegetWaitingVehicle (const MSEdge *const edge, const std::set< std::string > &lines)
 MSVehicleControl ()
 Constructor.
void registerCollision ()
 registers one collision-related teleport
void registerOneWaitingForPerson ()
 increases the count of vehicles waiting for a person to allow recogniztion of person related deadlocks
void registerTeleport ()
 register one non-collision-related teleport
void removeWaiting (const MSEdge *const edge, SUMOVehicle *vehicle)
void unregisterOneWaitingForPerson ()
 decreases the count of vehicles waiting for a person to allow recogniztion of person related deadlocks
virtual ~MSVehicleControl ()
 Destructor.
Vehicle creation
virtual SUMOVehiclebuildVehicle (SUMOVehicleParameter *defs, const MSRoute *route, const MSVehicleType *type)
 Builds a vehicle, increases the number of built vehicles.
Insertion, deletion and retrieval of vehicles
virtual bool addVehicle (const std::string &id, SUMOVehicle *v)
 Tries to insert the vehicle into the internal vehicle container.
SUMOVehiclegetVehicle (const std::string &id) const
 Returns the vehicle with the given id.
virtual void deleteVehicle (SUMOVehicle *v, bool discard=false)
 Deletes the vehicle.
void scheduleVehicleRemoval (SUMOVehicle *veh)
 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)
unsigned int getLoadedVehicleNo () const
 Returns the number of build vehicles.
unsigned int getEndedVehicleNo () const
 Returns the number of removed vehicles.
unsigned int getRunningVehicleNo () const
 Returns the number of build and inserted, but not yet deleted vehicles.
unsigned int getDepartedVehicleNo () const
 Returns the number of inserted vehicles.
bool isInQuota (SUMOReal frac=-1) const
 Returns the information whether the currently vehicle number shall be emitted considering that only frac of all vehicles shall be emitted overall if a negative fraction is given the demand scaling factor is used (–scale or –incremental-dua-step / –incremental-dua-base)
int getActiveVehicleCount () const
 Returns the number of build vehicles that have not been removed or need to wait for a passenger.
unsigned int getCollisionCount () const
 return the number of collisions
unsigned int getTeleportCount () const
 return the number of teleports (including collisions)
Retrieval of vehicle statistics (availability depends on simulation settings)
void printMeanWaitingTime (OutputDevice &od) const
 Prints the mean waiting time of vehicles. The mean time vehicles had to wait for being inserted (-1 if no vehicle was inserted, yet)
void printMeanTravelTime (OutputDevice &od) const
 Returns the mean travel time of vehicles The mean travel time of ended vehicles (-1 if no vehicle has ended, yet)
Insertion and retrieval of vehicle types
bool addVType (MSVehicleType *vehType)
 Adds a vehicle type.
bool addVTypeDistribution (const std::string &id, RandomDistributor< MSVehicleType * > *vehTypeDistribution)
 Adds a vehicle type distribution.
bool hasVTypeDistribution (const std::string &id) const
 Asks for a vehicle type distribution.
MSVehicleTypegetVType (const std::string &id=DEFAULT_VTYPE_ID)
 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.
State I/O (mesosim only)
void setState (int runningVehNo, int endedVehNo, SUMOReal totalDepartureDelay, SUMOReal totalTravelTime)
 Sets the current state variables as loaded from the stream.
virtual void saveState (OutputDevice &out)
 Saves the current state into the given stream.

Static Public Attributes

static MTRand myVehicleParamsRNG
 A random number generator used to choose from vtype/route distributions and computing the speed factors.

Protected Attributes

Vehicle statistics (always accessable)
unsigned int myLoadedVehNo
 The number of build vehicles.
unsigned int myRunningVehNo
 The number of vehicles within the network (build and inserted but not removed)
unsigned int myEndedVehNo
 The number of removed vehicles.
unsigned int myDiscarded
 The number of vehicles which were discarded while loading.
unsigned int myCollisions
 The number of collisions.
unsigned int myTeleports
 The number of teleports (including collisions)
Vehicle statistics
SUMOReal myTotalDepartureDelay
 The aggregated time vehicles had to wait for departure (in seconds)
SUMOReal myTotalTravelTime
 The aggregated time vehicles needed to aacomplish their route (in seconds)

Private Member Functions

bool checkVType (const std::string &id)
 Checks whether the vehicle type (distribution) may be added.

Vehicle container

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

Vehicle type container

typedef std::map< std::string,
MSVehicleType * > 
VTypeDictType
 Vehicle type dictionary type.
typedef std::map< std::string,
RandomDistributor
< MSVehicleType * > * > 
VTypeDistDictType
 Vehicle type distribution dictionary type.
VTypeDictType myVTypeDict
 Dictionary of vehicle types.
VTypeDistDictType myVTypeDistDict
 A distribution of vehicle types (probability->vehicle type)
bool myDefaultVTypeMayBeDeleted
 Whether no vehicle type was loaded.
std::map< const MSEdge *const,
std::vector< SUMOVehicle * > > 
myWaiting
 the lists of waiting vehicles
unsigned int myWaitingForPerson
 the number of vehicles contained in myWaiting which can only continue by being triggered
SUMOReal myScale
 The scaling factor (especially for inc-dua)
 MSVehicleControl (const MSVehicleControl &s)
 invalidated copy constructor
MSVehicleControloperator= (const MSVehicleControl &s)
 invalidated assignment operator

Detailed Description

The class responsible for building and deletion of vehicles.

This class is responsible for vehicle building and deletion. It stores vehicle types, vehicles and statistics about the last.

This class also realizes the tripinfos and the vehroutes - outputs, both generated when a vehicle is removed from the simulation, see scheduleVehicleRemoval.

Use this class for the pure microsim and GUIVehicleControl within the gui.

See Also
GUIVehicleControl

Definition at line 75 of file MSVehicleControl.h.

Member Typedef Documentation

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

Definition of the internal vehicles map iterator.

Definition at line 78 of file MSVehicleControl.h.

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

Vehicle dictionary type.

Definition at line 435 of file MSVehicleControl.h.

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

Vehicle type dictionary type.

Definition at line 445 of file MSVehicleControl.h.

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

Vehicle type distribution dictionary type.

Definition at line 450 of file MSVehicleControl.h.

Constructor & Destructor Documentation

MSVehicleControl::~MSVehicleControl ( )
virtual

Destructor.

Definition at line 83 of file MSVehicleControl.cpp.

References myVehicleDict, myVTypeDict, and myVTypeDistDict.

MSVehicleControl::MSVehicleControl ( const MSVehicleControl s)
private

invalidated copy constructor

Member Function Documentation

void MSVehicleControl::abortWaiting ( )

removes any vehicles that are still waiting

Definition at line 324 of file MSVehicleControl.cpp.

References myVehicleDict, and WRITE_WARNING.

Referenced by MSNet::simulationState().

bool MSVehicleControl::addVehicle ( const std::string &  id,
SUMOVehicle v 
)
virtual

Tries to insert the vehicle into the internal vehicle container.

Checks whether another vehicle with the same id exists; returns false if so. Otherwise, the vehicle is added to "myVehicleDict" and true is returned.

The vehicle control gets responsible for vehicle deletion.

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 in GUIVehicleControl.

Definition at line 172 of file MSVehicleControl.cpp.

References myVehicleDict.

Referenced by MSInsertionControl::checkFlows(), MSRouteHandler::closeVehicle(), traci::TraCIServer::commandAddVehicle(), and TraCIServerAPI_Vehicle::processSet().

bool MSVehicleControl::addVType ( MSVehicleType vehType)

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 235 of file MSVehicleControl.cpp.

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

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

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 245 of file MSVehicleControl.cpp.

References checkVType(), and myVTypeDistDict.

void MSVehicleControl::addWaiting ( const MSEdge *const  edge,
SUMOVehicle vehicle 
)

Definition at line 290 of file MSVehicleControl.cpp.

References myWaiting.

Referenced by MSRouteHandler::closeVehicle(), and MSVehicle::processNextStop().

SUMOVehicle * MSVehicleControl::buildVehicle ( SUMOVehicleParameter defs,
const MSRoute route,
const MSVehicleType type 
)
virtual

Builds a vehicle, increases the number of built vehicles.

Builds a MSVehicle instance using the given parameter. Increases the number of loaded vehicles ("myLoadedVehNo").

Parameters
[in]defsThe parameter defining the vehicle
[in]routeThe route of this vehicle
[in]typeThe type of this vehicle
Returns
The built vehicle (MSVehicle instance)

Reimplemented in GUIVehicleControl.

Definition at line 103 of file MSVehicleControl.cpp.

References MSVehicleType::computeChosenSpeedDeviation(), MSNet::getInstance(), MSNet::informVehicleStateListener(), myLoadedVehNo, myVehicleParamsRNG, and MSNet::VEHICLE_STATE_BUILT.

Referenced by MSInsertionControl::checkFlows(), MSRouteHandler::closeVehicle(), MSCalibrator::execute(), and TraCIServerAPI_Vehicle::processSet().

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

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 217 of file MSVehicleControl.cpp.

References DEFAULT_VTYPE_ID, myDefaultVTypeMayBeDeleted, myVTypeDict, and myVTypeDistDict.

Referenced by addVType(), and addVTypeDistribution().

void MSVehicleControl::deleteVehicle ( SUMOVehicle v,
bool  discard = false 
)
virtual

Deletes the vehicle.

Parameters
[in]vThe vehicle to delete
discard]Whether the vehicle is discard during loading (scale < 1)
Todo:
Isn't this quite insecure?

Reimplemented in GUIVehicleControl.

Definition at line 194 of file MSVehicleControl.cpp.

References SUMOVehicle::getID(), myDiscarded, myEndedVehNo, and myVehicleDict.

Referenced by MSInsertionControl::checkFlows(), MSRouteHandler::closeVehicle(), MSCalibrator::execute(), scheduleVehicleRemoval(), and MSInsertionControl::tryInsert().

int MSVehicleControl::getActiveVehicleCount ( ) const
inline

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

Returns
Number of active vehicles

Definition at line 239 of file MSVehicleControl.h.

References myEndedVehNo, myLoadedVehNo, and myWaitingForPerson.

Referenced by MSNet::simulationState().

unsigned int MSVehicleControl::getCollisionCount ( ) const
inline

return the number of collisions

Definition at line 244 of file MSVehicleControl.h.

References myCollisions.

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

unsigned int MSVehicleControl::getDepartedVehicleNo ( ) const
inline

Returns the number of inserted vehicles.

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

Definition at line 221 of file MSVehicleControl.h.

References myDiscarded, myEndedVehNo, and myRunningVehNo.

Referenced by MSNet::closeSimulation(), GUINet::getParameterWindow(), MSNet::postSimStepOutput(), printMeanWaitingTime(), and MSNet::writeOutput().

unsigned int MSVehicleControl::getEndedVehicleNo ( ) const
inline

Returns the number of removed vehicles.

Returns
The number of vehicles that have left the simulation

Definition at line 205 of file MSVehicleControl.h.

References myEndedVehNo.

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

unsigned int MSVehicleControl::getLoadedVehicleNo ( ) const
inline

Returns the number of build vehicles.

Returns
The number of loaded (build) vehicles

Definition at line 197 of file MSVehicleControl.h.

References myLoadedVehNo.

Referenced by MSNet::closeSimulation(), GUINet::getParameterWindow(), and MSNet::writeOutput().

unsigned int MSVehicleControl::getRunningVehicleNo ( ) const
inline

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

Returns
The number simulated vehicles (including those in teleporter)

Definition at line 213 of file MSVehicleControl.h.

References myRunningVehNo.

Referenced by MSNet::closeSimulation(), GUINet::getParameterWindow(), MSNet::postSimStepOutput(), GUINet::setSimDuration(), MSNet::simulationState(), MSNet::simulationStep(), and MSNet::writeOutput().

unsigned int MSVehicleControl::getTeleportCount ( ) const
inline

return the number of teleports (including collisions)

Definition at line 250 of file MSVehicleControl.h.

References myTeleports.

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

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

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 184 of file MSVehicleControl.cpp.

References myVehicleDict.

Referenced by MSInsertionControl::checkFlows(), MSRouteHandler::closeVehicle(), TraCIServerAPI_Vehicle::getPosition(), traci::TraCIServer::postProcessVTD(), TraCIServerAPI_Vehicle::processGet(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_GUI::processSet(), and GUINet::vehicleExists().

MSVehicleType * MSVehicleControl::getVType ( const std::string &  id = DEFAULT_VTYPE_ID)

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 0 if no such type exists

Definition at line 261 of file MSVehicleControl.cpp.

References DEFAULT_VTYPE_ID, myDefaultVTypeMayBeDeleted, myVehicleParamsRNG, myVTypeDict, and myVTypeDistDict.

Referenced by MSInsertionControl::checkFlows(), MSRouteHandler::closePerson(), MSRouteHandler::closeVehicle(), MSCalibrator::execute(), MSRouteHandler::openVehicleTypeDistribution(), TraCIServerAPI_VehicleType::processGet(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_VehicleType::processSet(), MSCalibrator::remainingVehicleCapacity(), and MSMeanData_HBEFA::MSLaneMeanDataValues::write().

SUMOVehicle * MSVehicleControl::getWaitingVehicle ( const MSEdge *const  edge,
const std::set< std::string > &  lines 
)
bool MSVehicleControl::hasVTypeDistribution ( const std::string &  id) const

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 255 of file MSVehicleControl.cpp.

References myVTypeDistDict.

Referenced by MSInsertionControl::add().

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

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 278 of file MSVehicleControl.cpp.

References myVTypeDict, and myVTypeDistDict.

Referenced by TraCIServerAPI_VehicleType::processGet().

bool MSVehicleControl::isInQuota ( SUMOReal  frac = -1) const

Returns the information whether the currently vehicle number shall be emitted considering that only frac of all vehicles shall be emitted overall if a negative fraction is given the demand scaling factor is used (–scale or –incremental-dua-step / –incremental-dua-base)

Returns
True iff the vehicle number is acceptable

Definition at line 332 of file MSVehicleControl.cpp.

References myLoadedVehNo, and myScale.

Referenced by MSDevice_HBEFA::buildVehicleDevices(), MSDevice_Routing::buildVehicleDevices(), MSInsertionControl::checkFlows(), and MSRouteHandler::closeVehicle().

MSVehicleControl::constVehIt MSVehicleControl::loadedVehBegin ( ) const

Returns the begin of the internal vehicle map.

Returns
The begin of the internal vehicle map

Definition at line 205 of file MSVehicleControl.cpp.

References myVehicleDict.

Referenced by MSVTypeProbe::execute(), MSVTKExport::getPositions(), MSVTKExport::getSpeed(), TraCIServerAPI_Vehicle::processGet(), MSFCDExport::write(), MSEmissionExport::write(), and MSFullExport::writeVehicles().

MSVehicleControl::constVehIt MSVehicleControl::loadedVehEnd ( ) const

Returns the end of the internal vehicle map.

Returns
The end of the internal vehicle map

Definition at line 211 of file MSVehicleControl.cpp.

References myVehicleDict.

Referenced by MSVTypeProbe::execute(), MSVTKExport::getPositions(), MSVTKExport::getSpeed(), TraCIServerAPI_Vehicle::processGet(), MSFCDExport::write(), MSEmissionExport::write(), and MSFullExport::writeVehicles().

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

invalidated assignment operator

void MSVehicleControl::printMeanTravelTime ( OutputDevice od) const

Returns the mean travel time of vehicles The mean travel time of ended vehicles (-1 if no vehicle has ended, yet)

Todo:
Enable this for guisim?

Definition at line 140 of file MSVehicleControl.cpp.

References myEndedVehNo, myTotalTravelTime, and SUMOReal.

Referenced by MSNet::writeOutput().

void MSVehicleControl::printMeanWaitingTime ( OutputDevice od) const

Prints the mean waiting time of vehicles. The mean time vehicles had to wait for being inserted (-1 if no vehicle was inserted, yet)

Todo:
Enable this for guisim?

Definition at line 130 of file MSVehicleControl.cpp.

References getDepartedVehicleNo(), myTotalDepartureDelay, and SUMOReal.

Referenced by MSNet::writeOutput().

void MSVehicleControl::registerCollision ( )
inline

registers one collision-related teleport

Definition at line 352 of file MSVehicleControl.h.

References myCollisions, and myTeleports.

Referenced by MSLane::detectCollisions().

void MSVehicleControl::registerOneWaitingForPerson ( )
inline

increases the count of vehicles waiting for a person to allow recogniztion of person related deadlocks

Definition at line 341 of file MSVehicleControl.h.

References myWaitingForPerson.

Referenced by MSRouteHandler::closeVehicle(), and MSVehicle::processNextStop().

void MSVehicleControl::registerTeleport ( )
inline

register one non-collision-related teleport

Definition at line 358 of file MSVehicleControl.h.

References myTeleports.

Referenced by MSLane::executeMovements().

void MSVehicleControl::removeWaiting ( const MSEdge *const  edge,
SUMOVehicle vehicle 
)
void MSVehicleControl::saveState ( OutputDevice out)
virtual

Saves the current state into the given stream.

Todo:
Does not work for microsim

Definition at line 167 of file MSVehicleControl.cpp.

void MSVehicleControl::scheduleVehicleRemoval ( SUMOVehicle veh)

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 114 of file MSVehicleControl.cpp.

References OutputDevice::closeTag(), deleteVehicle(), SUMOVehicle::getDeparture(), OutputDevice::getDeviceByOption(), SUMOVehicle::getDevices(), MSNet::getInstance(), OptionsCont::getOptions(), MSNet::informVehicleStateListener(), myRunningVehNo, myTotalTravelTime, STEPS2TIME, and MSNet::VEHICLE_STATE_ARRIVED.

Referenced by MSCalibrator::execute(), MSLane::executeMovements(), and TraCIServerAPI_Vehicle::processSet().

void MSVehicleControl::setState ( int  runningVehNo,
int  endedVehNo,
SUMOReal  totalDepartureDelay,
SUMOReal  totalTravelTime 
)

Sets the current state variables as loaded from the stream.

Definition at line 158 of file MSVehicleControl.cpp.

References myEndedVehNo, myRunningVehNo, myTotalDepartureDelay, and myTotalTravelTime.

void MSVehicleControl::unregisterOneWaitingForPerson ( )
inline

decreases the count of vehicles waiting for a person to allow recogniztion of person related deadlocks

Definition at line 347 of file MSVehicleControl.h.

References myWaitingForPerson.

Referenced by MSPerson::MSPersonStage_Driving::proceed(), and MSVehicle::processNextStop().

void MSVehicleControl::vehicleDeparted ( const SUMOVehicle v)

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 150 of file MSVehicleControl.cpp.

References SUMOVehicleParameter::depart, SUMOVehicle::getDeparture(), MSNet::getInstance(), SUMOVehicle::getParameter(), MSNet::informVehicleStateListener(), myRunningVehNo, myTotalDepartureDelay, STEPFLOOR, STEPS2TIME, and MSNet::VEHICLE_STATE_DEPARTED.

Referenced by MSBaseVehicle::onDepart().

Field Documentation

unsigned int MSVehicleControl::myCollisions
protected

The number of collisions.

Definition at line 413 of file MSVehicleControl.h.

Referenced by getCollisionCount(), and registerCollision().

bool MSVehicleControl::myDefaultVTypeMayBeDeleted
protected

Whether no vehicle type was loaded.

Definition at line 455 of file MSVehicleControl.h.

Referenced by checkVType(), and getVType().

unsigned int MSVehicleControl::myDiscarded
protected

The number of vehicles which were discarded while loading.

Definition at line 410 of file MSVehicleControl.h.

Referenced by deleteVehicle(), and getDepartedVehicleNo().

unsigned int MSVehicleControl::myEndedVehNo
protected

The number of removed vehicles.

Definition at line 407 of file MSVehicleControl.h.

Referenced by deleteVehicle(), getActiveVehicleCount(), getDepartedVehicleNo(), getEndedVehicleNo(), printMeanTravelTime(), and setState().

unsigned int MSVehicleControl::myLoadedVehNo
protected

The number of build vehicles.

Definition at line 401 of file MSVehicleControl.h.

Referenced by GUIVehicleControl::buildVehicle(), buildVehicle(), getActiveVehicleCount(), getLoadedVehicleNo(), and isInQuota().

unsigned int MSVehicleControl::myRunningVehNo
protected

The number of vehicles within the network (build and inserted but not removed)

Definition at line 404 of file MSVehicleControl.h.

Referenced by getDepartedVehicleNo(), getRunningVehicleNo(), scheduleVehicleRemoval(), setState(), and vehicleDeparted().

SUMOReal MSVehicleControl::myScale
protected

The scaling factor (especially for inc-dua)

Definition at line 464 of file MSVehicleControl.h.

Referenced by isInQuota(), and MSVehicleControl().

unsigned int MSVehicleControl::myTeleports
protected

The number of teleports (including collisions)

Definition at line 416 of file MSVehicleControl.h.

Referenced by getTeleportCount(), registerCollision(), and registerTeleport().

SUMOReal MSVehicleControl::myTotalDepartureDelay
protected

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

Definition at line 424 of file MSVehicleControl.h.

Referenced by printMeanWaitingTime(), setState(), and vehicleDeparted().

SUMOReal MSVehicleControl::myTotalTravelTime
protected

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

Definition at line 427 of file MSVehicleControl.h.

Referenced by printMeanTravelTime(), scheduleVehicleRemoval(), and setState().

VehicleDictType MSVehicleControl::myVehicleDict
protected
MTRand MSVehicleControl::myVehicleParamsRNG
static

A random number generator used to choose from vtype/route distributions and computing the speed factors.

Definition at line 383 of file MSVehicleControl.h.

Referenced by GUIVehicleControl::buildVehicle(), buildVehicle(), getVType(), main(), and GUILoadThread::run().

VTypeDictType MSVehicleControl::myVTypeDict
protected

Dictionary of vehicle types.

Definition at line 447 of file MSVehicleControl.h.

Referenced by addVType(), checkVType(), getVType(), insertVTypeIDs(), MSVehicleControl(), and ~MSVehicleControl().

VTypeDistDictType MSVehicleControl::myVTypeDistDict
protected

A distribution of vehicle types (probability->vehicle type)

Definition at line 452 of file MSVehicleControl.h.

Referenced by addVTypeDistribution(), checkVType(), getVType(), hasVTypeDistribution(), insertVTypeIDs(), and ~MSVehicleControl().

std::map<const MSEdge* const, std::vector<SUMOVehicle*> > MSVehicleControl::myWaiting
protected

the lists of waiting vehicles

Definition at line 458 of file MSVehicleControl.h.

Referenced by addWaiting(), getWaitingVehicle(), and removeWaiting().

unsigned int MSVehicleControl::myWaitingForPerson
protected

the number of vehicles contained in myWaiting which can only continue by being triggered

Definition at line 461 of file MSVehicleControl.h.

Referenced by getActiveVehicleCount(), registerOneWaitingForPerson(), and unregisterOneWaitingForPerson().


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