![]() |
Eclipse SUMO - Simulation of Urban MObility
|
The class responsible for building and deletion of vehicles (gui-version) More...
#include <GUIVehicleControl.h>
Public Types | |
typedef std::map< std::string, SUMOVehicle * >::const_iterator | constVehIt |
Definition of the internal vehicles map iterator. More... | |
Public Member Functions | |
void | abortWaiting () |
informes about all waiting vehicles (deletion in destructor) More... | |
void | adaptIntermodalRouter (MSNet::MSIntermodalRouter &router) const |
bool | addVehicle (const std::string &id, SUMOVehicle *v) |
Tries to insert the vehicle into the internal vehicle container. More... | |
void | addWaiting (const MSEdge *const edge, SUMOVehicle *vehicle) |
Adds a vehicle to the list of waiting vehicles for the given edge. More... | |
void | deleteVehicle (SUMOVehicle *v, bool discard=false) |
Deletes the vehicle. More... | |
void | discountStateLoaded (bool removed=false) |
avoid counting a vehicle twice if it was loaded from state and route input More... | |
virtual int | getHaltingVehicleNo () const |
Returns the number of halting vehicles. More... | |
double | getMaxSpeedFactor () const |
return the maximum speed factor for all vehicles that ever entered the network More... | |
double | getMinDeceleration () const |
return the minimum deceleration capability for all vehicles that ever entered the network More... | |
virtual std::pair< double, double > | getVehicleMeanSpeeds () const |
get current absolute and relative mean vehicle speed in the network More... | |
SUMOVehicle * | getWaitingVehicle (MSTransportable *transportable, const MSEdge *const edge, const double position) |
GUIVehicleControl () | |
Constructor. More... | |
void | insertVehicleIDs (std::vector< GUIGlID > &into, bool listParking, bool listTeleporting) |
Returns the list of all known vehicles by gl-id. More... | |
void | registerCollision () |
registers one collision-related teleport More... | |
void | registerEmergencyStop () |
register emergency stop More... | |
void | registerOneWaiting (const bool isPerson) |
increases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks More... | |
void | registerTeleportJam () |
register one non-collision-related teleport More... | |
void | registerTeleportWrongLane () |
register one non-collision-related teleport More... | |
void | registerTeleportYield () |
register one non-collision-related teleport More... | |
void | releaseVehicles () |
unlock access to vehicle removal/additions for thread synchronization More... | |
void | removeWaiting (const MSEdge *const edge, const SUMOVehicle *vehicle) |
Removes a vehicle from the list of waiting vehicles for the given edge. More... | |
void | secureVehicles () |
lock access to vehicle removal/additions for thread synchronization More... | |
void | setScale (double scale) |
sets the demand scaling factor More... | |
void | unregisterOneWaiting (const bool isPerson) |
decreases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks More... | |
~GUIVehicleControl () | |
Destructor. More... | |
Vehicle creation | |
SUMOVehicle * | buildVehicle (SUMOVehicleParameter *defs, const MSRoute *route, MSVehicleType *type, const bool ignoreStopErrors, const bool fromRouteFile=true) |
Builds a vehicle, increases the number of built vehicles. More... | |
Insertion, deletion and retrieval of vehicles | |
SUMOVehicle * | getVehicle (const std::string &id) const |
Returns the vehicle with the given id. More... | |
void | scheduleVehicleRemoval (SUMOVehicle *veh, bool checkDuplicate=false) |
Removes a vehicle after it has ended. More... | |
void | removePending () |
Removes a vehicle after it has ended. More... | |
constVehIt | loadedVehBegin () const |
Returns the begin of the internal vehicle map. More... | |
constVehIt | loadedVehEnd () const |
Returns the end of the internal vehicle map. More... | |
Setting vehicle statistics | |
void | vehicleDeparted (const SUMOVehicle &v) |
Informs this control about a vehicle's departure. More... | |
Retrieval of vehicle statistics (always accessable) | |
int | getLoadedVehicleNo () const |
Returns the number of build vehicles. More... | |
double | getVehicleMeanSpeed () const |
double | getVehicleMeanSpeedRelative () const |
int | getEndedVehicleNo () const |
Returns the number of removed vehicles. More... | |
int | getArrivedVehicleNo () const |
Returns the number of arrived vehicles. More... | |
int | getDiscardedVehicleNo () const |
Returns the number of discarded vehicles. More... | |
int | getRunningVehicleNo () const |
Returns the number of build and inserted, but not yet deleted vehicles. More... | |
int | getDepartedVehicleNo () const |
Returns the number of inserted vehicles. More... | |
int | getQuota (double frac=-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) More... | |
int | getActiveVehicleCount () const |
Returns the number of build vehicles that have not been removed or need to wait for a passenger or a container. More... | |
int | getCollisionCount () const |
return the number of collisions More... | |
int | getTeleportsJam () const |
return the number of teleports due to jamming More... | |
int | getTeleportsYield () const |
return the number of teleports due to vehicles stuck on a minor road More... | |
int | getTeleportsWrongLane () const |
return the number of teleports due to vehicles stuck on the wrong lane More... | |
int | getTeleportCount () const |
return the number of teleports (including collisions) More... | |
int | getEmergencyStops () const |
return the number of emergency stops More... | |
double | getTotalDepartureDelay () const |
Returns the total departure delay. More... | |
double | getTotalTravelTime () const |
Returns the total travel time. More... | |
Insertion and retrieval of vehicle types | |
bool | addVType (MSVehicleType *vehType) |
Adds a vehicle type. More... | |
void | removeVType (const MSVehicleType *vehType) |
bool | addVTypeDistribution (const std::string &id, RandomDistributor< MSVehicleType *> *vehTypeDistribution) |
Adds a vehicle type distribution. More... | |
bool | hasVType (const std::string &id) const |
Asks for existence of a vehicle type. More... | |
bool | hasVTypeDistribution (const std::string &id) const |
Asks for a vehicle type distribution. More... | |
MSVehicleType * | getVType (const std::string &id=DEFAULT_VTYPE_ID, std::mt19937 *rng=nullptr) |
Returns the named vehicle type or a sample from the named distribution. More... | |
void | insertVTypeIDs (std::vector< std::string > &into) const |
Inserts ids of all known vehicle types and vehicle type distributions to the given vector. More... | |
const std::set< std::string > | getVTypeDistributionMembership (const std::string &id) const |
Return the distribution IDs the vehicle type is a member of. More... | |
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. More... | |
void | saveState (OutputDevice &out) |
Saves the current state into the given stream. More... | |
Protected Attributes | |
Vehicle statistics (always accessible) | |
int | myLoadedVehNo |
The number of build vehicles. More... | |
Private Member Functions | |
GUIVehicleControl (const GUIVehicleControl &s) | |
invalidated copy constructor More... | |
GUIVehicleControl & | operator= (const GUIVehicleControl &s) |
invalidated assignment operator More... | |
Private Attributes | |
FXMutex | myLock |
The mutex used to avoid concurrent updates of the vehicle buffer. More... | |
Vehicle container | |
typedef std::map< std::string, SUMOVehicle *> | VehicleDictType |
Vehicle dictionary type. More... | |
VehicleDictType | myVehicleDict |
Dictionary of vehicles. More... | |
The class responsible for building and deletion of vehicles (gui-version)
Builds GUIVehicle instances instead of MSVehicle.
This is partially unsecure due to concurrent access...
Recheck vehicle deletion
Definition at line 47 of file GUIVehicleControl.h.
|
inherited |
Definition of the internal vehicles map iterator.
Definition at line 75 of file MSVehicleControl.h.
|
protectedinherited |
Vehicle dictionary type.
Definition at line 579 of file MSVehicleControl.h.
GUIVehicleControl::GUIVehicleControl | ( | ) |
Constructor.
Definition at line 37 of file GUIVehicleControl.cpp.
GUIVehicleControl::~GUIVehicleControl | ( | ) |
|
private |
invalidated copy constructor
|
inherited |
informes about all waiting vehicles (deletion in destructor)
Definition at line 430 of file MSVehicleControl.cpp.
References MSVehicleControl::myVehicleDict, and WRITE_WARNING.
Referenced by MSVehicleControl::discountStateLoaded(), and MSNet::simulationState().
|
inherited |
Definition at line 497 of file MSVehicleControl.cpp.
References IntermodalNetwork< E, L, N, V >::addSchedule(), MSRoute::dictionary(), IntermodalRouter< E, L, N, V >::getNetwork(), MSRoute::getStops(), and MSVehicleControl::myPTVehicles.
Referenced by MSNet::adaptIntermodalRouter(), and MSVehicleControl::getMinDeceleration().
|
virtual |
Tries to insert the vehicle into the internal vehicle container.
Identical to the MSVehicleControl implementation except for locking.
[in] | id | The id of the vehicle |
[in] | v | The vehicle |
Reimplemented from MSVehicleControl.
Definition at line 62 of file GUIVehicleControl.cpp.
References MSVehicleControl::addVehicle(), and myLock.
|
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.
[in] | vehType | The vehicle type to add |
Definition at line 296 of file MSVehicleControl.cpp.
References MSVehicleControl::checkVType(), MSVehicleType::getID(), and MSVehicleControl::myVTypeDict.
Referenced by MSVehicleControl::getTotalTravelTime().
|
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.
[in] | id | The id of the distribution to add |
[in] | vehTypeDistribution | The vehicle type distribution to add |
Definition at line 318 of file MSVehicleControl.cpp.
References MSVehicleControl::checkVType(), RandomDistributor< T >::getVals(), MSVehicleControl::myVTypeDistDict, and MSVehicleControl::myVTypeToDist.
Referenced by MSVehicleControl::getTotalTravelTime().
|
inherited |
Adds a vehicle to the list of waiting vehicles for the given edge.
Definition at line 389 of file MSVehicleControl.cpp.
References MSVehicleControl::myWaiting.
Referenced by MSVehicleControl::addVehicle(), MSVehicleControl::getTotalTravelTime(), MSVehicle::processNextStop(), and MESegment::receive().
|
virtual |
Builds a vehicle, increases the number of built vehicles.
Instead of a MSVehicle, a GUIVehicle is built
[in] | defs | The parameter defining the vehicle |
[in] | route | The route of this vehicle |
[in] | type | The type of this vehicle |
[in] | ignoreStopErrors | whether invalid stops trigger a warning only |
[in] | fromRouteFile | whether we are just reading the route file or creating via trigger, traci, ... |
Reimplemented from MSVehicleControl.
Definition at line 50 of file GUIVehicleControl.cpp.
References MSBaseVehicle::addStops(), MSVehicleType::computeChosenSpeedDeviation(), MSNet::getInstance(), MSRouteHandler::getParsingRNG(), MSNet::informVehicleStateListener(), MSVehicleControl::myLoadedVehNo, and MSNet::VEHICLE_STATE_BUILT.
|
virtual |
Deletes the vehicle.
Identical to the MSVehicleControl implementation except for locking.
[in] | v | The vehicle to delete |
Reimplemented from MSVehicleControl.
Definition at line 69 of file GUIVehicleControl.cpp.
References MSVehicleControl::deleteVehicle(), and myLock.
|
inlineinherited |
avoid counting a vehicle twice if it was loaded from state and route input
Definition at line 487 of file MSVehicleControl.h.
References MSVehicleControl::abortWaiting(), MSVehicleControl::myDiscarded, MSVehicleControl::myEndedVehNo, MSVehicleControl::myLoadedVehNo, and MSVehicleControl::myRunningVehNo.
Referenced by MSStateHandler::closeVehicle(), and MSInsertionControl::determineCandidates().
|
inlineinherited |
Returns the number of build vehicles that have not been removed or need to wait for a passenger or a container.
Definition at line 284 of file MSVehicleControl.h.
References MSVehicleControl::myEndedVehNo, MSVehicleControl::myLoadedVehNo, MSVehicleControl::myWaitingForContainer, and MSVehicleControl::myWaitingForPerson.
Referenced by libsumo::Simulation::getMinExpectedNumber(), and MSNet::simulationState().
|
inlineinherited |
Returns the number of arrived vehicles.
Definition at line 243 of file MSVehicleControl.h.
References MSVehicleControl::myDiscarded, and MSVehicleControl::myEndedVehNo.
Referenced by GUINet::getParameterWindow(), and MSNet::writeOutput().
|
inlineinherited |
return the number of collisions
Definition at line 290 of file MSVehicleControl.h.
References MSVehicleControl::myCollisions.
Referenced by GUIApplicationWindow::checkGamingEvents(), MSNet::generateStatistics(), GUINet::getParameterWindow(), and MSNet::writeOutput().
|
inlineinherited |
Returns the number of inserted vehicles.
Definition at line 266 of file MSVehicleControl.h.
References MSVehicleControl::getQuota(), MSVehicleControl::myDiscarded, MSVehicleControl::myEndedVehNo, and MSVehicleControl::myRunningVehNo.
Referenced by MSNet::generateStatistics(), GUINet::getParameterWindow(), MSNet::postSimStepOutput(), and MSNet::writeOutput().
|
inlineinherited |
Returns the number of discarded vehicles.
Definition at line 250 of file MSVehicleControl.h.
References MSVehicleControl::myDiscarded.
Referenced by GUINet::getParameterWindow().
|
inlineinherited |
return the number of emergency stops
Definition at line 313 of file MSVehicleControl.h.
References MSVehicleControl::myEmergencyStops.
Referenced by MSNet::generateStatistics().
|
inlineinherited |
Returns the number of removed vehicles.
Definition at line 236 of file MSVehicleControl.h.
References MSVehicleControl::myEndedVehNo.
Referenced by MSNet::writeOutput().
|
virtual |
Returns the number of halting vehicles.
Reimplemented from MSVehicleControl.
Definition at line 76 of file GUIVehicleControl.cpp.
References MSVehicleControl::getHaltingVehicleNo(), and myLock.
|
inlineinherited |
Returns the number of build vehicles.
Definition at line 214 of file MSVehicleControl.h.
References MSVehicleControl::getHaltingVehicleNo(), MSVehicleControl::getVehicleMeanSpeeds(), and MSVehicleControl::myLoadedVehNo.
Referenced by MSNet::generateStatistics(), GUINet::getParameterWindow(), and MSNet::writeOutput().
|
inlineinherited |
return the maximum speed factor for all vehicles that ever entered the network
Definition at line 503 of file MSVehicleControl.h.
References MSVehicleControl::myMaxSpeedFactor.
Referenced by MSLane::getMaximumBrakeDist().
|
inlineinherited |
return the minimum deceleration capability for all vehicles that ever entered the network
Definition at line 508 of file MSVehicleControl.h.
References MSVehicleControl::adaptIntermodalRouter(), and MSVehicleControl::myMinDeceleration.
Referenced by MSLane::getMaximumBrakeDist().
|
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)
Definition at line 473 of file MSVehicleControl.cpp.
References MSVehicleControl::myLoadedVehNo, and MSVehicleControl::myScale.
Referenced by MSRouteHandler::closeVehicle(), MSInsertionControl::determineCandidates(), MSDevice::equippedByDefaultAssignmentOptions(), and MSVehicleControl::getDepartedVehicleNo().
|
inlineinherited |
Returns the number of build and inserted, but not yet deleted vehicles.
Definition at line 258 of file MSVehicleControl.h.
References MSVehicleControl::myRunningVehNo.
Referenced by MSNet::generateStatistics(), GUINet::getParameterWindow(), GUIApplicationWindow::handleEvent_SimulationStep(), MSNet::postSimStepOutput(), GUINet::setSimDuration(), MSNet::simulationStep(), and MSNet::writeOutput().
|
inherited |
return the number of teleports (including collisions)
Definition at line 491 of file MSVehicleControl.cpp.
References MSVehicleControl::myCollisions, MSVehicleControl::myTeleportsJam, MSVehicleControl::myTeleportsWrongLane, MSVehicleControl::myTeleportsYield, and MSLane::teleportOnCollision().
Referenced by MSNet::generateStatistics(), GUINet::getParameterWindow(), MSVehicleControl::getTeleportsWrongLane(), MSNet::simulationState(), and MSNet::writeOutput().
|
inlineinherited |
return the number of teleports due to jamming
Definition at line 295 of file MSVehicleControl.h.
References MSVehicleControl::myTeleportsJam.
Referenced by MSNet::generateStatistics().
|
inlineinherited |
return the number of teleports due to vehicles stuck on the wrong lane
Definition at line 305 of file MSVehicleControl.h.
References MSVehicleControl::getTeleportCount(), and MSVehicleControl::myTeleportsWrongLane.
Referenced by MSNet::generateStatistics().
|
inlineinherited |
return the number of teleports due to vehicles stuck on a minor road
Definition at line 300 of file MSVehicleControl.h.
References MSVehicleControl::myTeleportsYield.
Referenced by MSNet::generateStatistics().
|
inlineinherited |
Returns the total departure delay.
Definition at line 320 of file MSVehicleControl.h.
References MSVehicleControl::myTotalDepartureDelay.
Referenced by MSNet::writeOutput().
|
inlineinherited |
Returns the total travel time.
Definition at line 328 of file MSVehicleControl.h.
References MSVehicleControl::addVType(), MSVehicleControl::addVTypeDistribution(), MSVehicleControl::addWaiting(), DEFAULT_VTYPE_ID, MSVehicleControl::getVType(), MSVehicleControl::getVTypeDistributionMembership(), MSVehicleControl::getWaitingVehicle(), MSVehicleControl::hasVType(), MSVehicleControl::hasVTypeDistribution(), MSVehicleControl::insertVTypeIDs(), MSVehicleControl::myTotalTravelTime, MSVehicleControl::removeVType(), and MSVehicleControl::removeWaiting().
Referenced by MSNet::writeOutput().
|
inherited |
Returns the vehicle with the given id.
If no vehicle with the given id is store din "myVehicleDict", 0 is returned.
[in] | id | The id of the vehicle to retrieve |
Definition at line 235 of file MSVehicleControl.cpp.
References MSVehicleControl::myVehicleDict.
Referenced by libsumo::Vehicle::add(), MSStateHandler::closeVehicle(), MSRouteHandler::closeVehicle(), MSInsertionControl::determineCandidates(), MSCFModel_CC::getRadarMeasurements(), libsumo::Polygon::getTrafficObject(), libsumo::Helper::getVehicle(), libsumo::Vehicle::isOnInit(), MSVehicleTransfer::loadState(), MESegment::loadState(), MSLane::loadState(), MSDevice_SSM::processEncounters(), TraCIServerAPI_Vehicle::processSet(), TraCIServerAPI_GUI::processSet(), MSCalibrator::removePending(), MSCFModel_CC::setParameter(), and GUINet::vehicleExists().
|
inlineinherited |
Definition at line 226 of file MSVehicleControl.h.
References MSVehicleControl::getVehicleMeanSpeeds().
Referenced by GUINet::getParameterWindow().
|
inlineinherited |
Definition at line 229 of file MSVehicleControl.h.
References MSVehicleControl::getVehicleMeanSpeeds().
Referenced by GUINet::getParameterWindow().
|
virtual |
get current absolute and relative mean vehicle speed in the network
Reimplemented from MSVehicleControl.
Definition at line 83 of file GUIVehicleControl.cpp.
References MSVehicleControl::getVehicleMeanSpeeds(), and myLock.
|
inherited |
Returns the named vehicle type or a sample from the named distribution.
[in] | id | The id of the vehicle type to return. If left out, the default type is returned. |
Definition at line 348 of file MSVehicleControl.cpp.
References DEFAULT_PEDTYPE_ID, DEFAULT_VTYPE_ID, MSVehicleControl::myDefaultPedTypeMayBeDeleted, MSVehicleControl::myDefaultVTypeMayBeDeleted, MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeDistDict.
Referenced by libsumo::Person::add(), libsumo::Vehicle::add(), MSRouteHandler::addPersonTrip(), MSRouteHandler::closeContainer(), MSRouteHandler::closePerson(), MSRouteHandler::closePersonFlow(), MSRouteHandler::closeVehicle(), MSInsertionControl::determineCandidates(), METriggeredCalibrator::execute(), MSCalibrator::execute(), libsumo::Simulation::findIntermodalRoute(), libsumo::Simulation::findRoute(), MSVehicleControl::getTotalTravelTime(), libsumo::VehicleType::getVType(), MSDevice_ToC::initColorScheme(), MSDevice_ToC::MSDevice_ToC(), MSRouteHandler::myStartElement(), MSCalibrator::myStartElement(), MSDevice_Bluelight::notifyMove(), MSRouteHandler::openVehicleTypeDistribution(), METriggeredCalibrator::remainingVehicleCapacity(), MSCalibrator::remainingVehicleCapacity(), MSTransportable::Stage_Trip::setArrived(), MSDevice_ToC::setParameter(), libsumo::Person::setType(), libsumo::Vehicle::setType(), MSDevice_ToC::switchHolderType(), and MSMeanData_Emissions::MSLaneMeanDataValues::write().
|
inherited |
Return the distribution IDs the vehicle type is a member of.
[in] | vehType | The vehicle type to look for membership in distributions |
Definition at line 379 of file MSVehicleControl.cpp.
References MSVehicleControl::myVTypeToDist.
Referenced by MSVehicleControl::getTotalTravelTime(), MSDevice_ToC::MSDevice_ToC(), MSDetectorFileOutput::vehicleApplies(), and MSTriggeredRerouter::vehicleApplies().
|
inherited |
Definition at line 409 of file MSVehicleControl.cpp.
References DEPART_CONTAINER_TRIGGERED, DEPART_TRIGGERED, MSTransportable::getID(), MSTransportable::isWaitingFor(), MSVehicleControl::myStopTolerance, MSVehicleControl::myWaiting, toString(), and WRITE_WARNING.
Referenced by MSVehicleControl::getTotalTravelTime(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
inherited |
Asks for existence of a vehicle type.
If vehicle type or distribution with the id exists, true is returned, false otherwise.
[in] | id | The id of the type or distribution |
Definition at line 336 of file MSVehicleControl.cpp.
References MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeDistDict.
Referenced by libsumo::Simulation::findIntermodalRoute(), MSVehicleControl::getTotalTravelTime(), and MSDevice_ToC::MSDevice_ToC().
|
inherited |
Asks for a vehicle type distribution.
If vehicle type distribution with the id exists, true is returned, false otherwise.
[in] | id | The id of the distribution |
Definition at line 342 of file MSVehicleControl.cpp.
References MSVehicleControl::myVTypeDistDict.
Referenced by MSVehicleControl::getTotalTravelTime(), and MSDevice_ToC::MSDevice_ToC().
void GUIVehicleControl::insertVehicleIDs | ( | std::vector< GUIGlID > & | into, |
bool | listParking, | ||
bool | listTeleporting | ||
) |
Returns the list of all known vehicles by gl-id.
Definition at line 90 of file GUIVehicleControl.cpp.
References SUMOVehicle::isOnRoad(), SUMOVehicle::isParking(), myLock, and MSVehicleControl::myVehicleDict.
|
inherited |
Inserts ids of all known vehicle types and vehicle type distributions to the given vector.
[in] | into | The vector to fill with ids |
Definition at line 367 of file MSVehicleControl.cpp.
References MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeDistDict.
Referenced by libsumo::VehicleType::getIDList(), and MSVehicleControl::getTotalTravelTime().
|
inlineinherited |
Returns the begin of the internal vehicle map.
Definition at line 178 of file MSVehicleControl.h.
References MSVehicleControl::myVehicleDict.
Referenced by GUIApplicationWindow::checkGamingEvents(), GUIApplicationWindow::checkGamingEventsDRT(), MSVTypeProbe::execute(), MSVehicleControl::getHaltingVehicleNo(), libsumo::Vehicle::getIDList(), MSVTKExport::getPositions(), MSVTKExport::getSpeed(), MSVehicleControl::getVehicleMeanSpeeds(), MSDevice_Bluelight::notifyMove(), GUIViewTraffic::onGamingClick(), MSVehicleType::setActionStepLength(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSAmitranTrajectories::write(), and MSFullExport::writeVehicles().
|
inlineinherited |
Returns the end of the internal vehicle map.
Definition at line 186 of file MSVehicleControl.h.
References MSVehicleControl::myVehicleDict, and MSVehicleControl::vehicleDeparted().
Referenced by GUIApplicationWindow::checkGamingEvents(), GUIApplicationWindow::checkGamingEventsDRT(), MSVTypeProbe::execute(), MSVehicleControl::getHaltingVehicleNo(), libsumo::Vehicle::getIDList(), MSVTKExport::getPositions(), MSVTKExport::getSpeed(), MSVehicleControl::getVehicleMeanSpeeds(), MSDevice_Bluelight::notifyMove(), GUIViewTraffic::onGamingClick(), MSVehicleType::setActionStepLength(), MSBatteryExport::write(), MSEmissionExport::write(), MSFCDExport::write(), MSAmitranTrajectories::write(), and MSFullExport::writeVehicles().
|
private |
invalidated assignment operator
|
inlineinherited |
registers one collision-related teleport
Definition at line 450 of file MSVehicleControl.h.
References MSVehicleControl::myCollisions.
Referenced by MSLane::detectCollisions(), MSLane::detectPedestrianJunctionCollision(), MSLane::executeMovements(), and MSLane::handleCollisionBetween().
|
inlineinherited |
register emergency stop
Definition at line 470 of file MSVehicleControl.h.
References MSVehicleControl::myEmergencyStops, MSVehicleControl::saveState(), and MSVehicleControl::setState().
Referenced by MSVehicle::executeMove().
|
inlineinherited |
increases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks
Definition at line 431 of file MSVehicleControl.h.
References MSVehicleControl::myWaitingForContainer, and MSVehicleControl::myWaitingForPerson.
Referenced by MSVehicleControl::addVehicle(), and MSVehicle::processNextStop().
|
inlineinherited |
register one non-collision-related teleport
Definition at line 455 of file MSVehicleControl.h.
References MSVehicleControl::myTeleportsJam.
Referenced by MSLane::executeMovements(), and MELoop::teleportVehicle().
|
inlineinherited |
register one non-collision-related teleport
Definition at line 465 of file MSVehicleControl.h.
References MSVehicleControl::myTeleportsWrongLane.
Referenced by MSLane::executeMovements().
|
inlineinherited |
register one non-collision-related teleport
Definition at line 460 of file MSVehicleControl.h.
References MSVehicleControl::myTeleportsYield.
Referenced by MSLane::executeMovements().
void GUIVehicleControl::releaseVehicles | ( | ) |
unlock access to vehicle removal/additions for thread synchronization
Definition at line 109 of file GUIVehicleControl.cpp.
References myLock.
|
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.
[in] | veh | The vehicle to remove |
Definition at line 130 of file MSVehicleControl.cpp.
References OutputDevice::closeTag(), MSVehicleControl::deleteVehicle(), OutputDevice::flush(), OutputDevice::getDeviceByOption(), MSNet::getInstance(), OptionsCont::getOptions(), MSNet::informVehicleStateListener(), OptionsCont::isSet(), MSVehicleControl::myPendingRemovals, MSVehicleControl::myRunningVehNo, MSVehicleControl::myTotalTravelTime, STEPS2TIME, and MSNet::VEHICLE_STATE_ARRIVED.
Referenced by MSEdgeControl::executeMovements(), and MSNet::simulationStep().
|
inherited |
Definition at line 306 of file MSVehicleControl.cpp.
References MSVehicleType::getID(), MSVehicleControl::myVTypeDict, and MSVehicleControl::myVTypeToDist.
Referenced by MSVehicleControl::getTotalTravelTime(), MSBaseVehicle::replaceVehicleType(), MSTransportable::replaceVehicleType(), MSTransportable::~MSTransportable(), and MSVehicle::~MSVehicle().
|
inherited |
Removes a vehicle from the list of waiting vehicles for the given edge.
Definition at line 398 of file MSVehicleControl.cpp.
References MSVehicleControl::myWaiting.
Referenced by MSVehicleControl::getTotalTravelTime(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MEVehicle::processStop(), and MSVehicle::resumeFromStopping().
|
inherited |
Saves the current state into the given stream.
Definition at line 186 of file MSVehicleControl.cpp.
References OutputDevice::closeTag(), MSVehicleControl::myEndedVehNo, MSVehicleControl::myLoadedVehNo, MSVehicleControl::myRunningVehNo, MSVehicleControl::myTotalDepartureDelay, MSVehicleControl::myTotalTravelTime, MSVehicleControl::myVehicleDict, MSVehicleControl::myVTypeDict, MSVehicleControl::myVTypeDistDict, OutputDevice::openTag(), SUMO_ATTR_BEGIN, SUMO_ATTR_DEPART, SUMO_ATTR_END, SUMO_ATTR_ID, SUMO_ATTR_NUMBER, SUMO_ATTR_PROBS, SUMO_ATTR_TIME, SUMO_ATTR_VTYPES, SUMO_TAG_DELAY, SUMO_TAG_VTYPE_DISTRIBUTION, and OutputDevice::writeAttr().
Referenced by MSVehicleControl::registerEmergencyStop(), and MSStateHandler::saveState().
|
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.
[in] | veh | The vehicle to remove |
Definition at line 115 of file MSVehicleControl.cpp.
References HAVE_FOX, MSVehicleControl::myPendingRemovals, and MSVehicleControl::myRunningVehNo.
Referenced by MSVehicleTransfer::add(), MELoop::changeSegment(), MSVehicleTransfer::checkInsertions(), MSLane::detectCollisions(), MSLane::executeMovements(), GUIBaseVehicle::GUIBaseVehiclePopupMenu::onCmdRemoveObject(), MESegment::receive(), libsumo::Vehicle::remove(), and MSCalibrator::removePending().
void GUIVehicleControl::secureVehicles | ( | ) |
lock access to vehicle removal/additions for thread synchronization
Definition at line 103 of file GUIVehicleControl.cpp.
References myLock.
|
inlineinherited |
sets the demand scaling factor
Definition at line 515 of file MSVehicleControl.h.
References MSVehicleControl::checkVType(), and MSVehicleControl::myScale.
Referenced by GUIApplicationWindow::onCmdDemandScale().
|
inherited |
Sets the current state variables as loaded from the stream.
Definition at line 176 of file MSVehicleControl.cpp.
References MSVehicleControl::myEndedVehNo, MSVehicleControl::myLoadedVehNo, MSVehicleControl::myRunningVehNo, MSVehicleControl::myTotalDepartureDelay, and MSVehicleControl::myTotalTravelTime.
Referenced by MSStateHandler::myStartElement(), and MSVehicleControl::registerEmergencyStop().
|
inlineinherited |
decreases the count of vehicles waiting for a transport to allow recognition of person / container related deadlocks
Definition at line 441 of file MSVehicleControl.h.
References MSVehicleControl::myWaitingForContainer, and MSVehicleControl::myWaitingForPerson.
Referenced by MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSVehicle::processNextStop(), and MSVehicle::resumeFromStopping().
|
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.
[in] | v | The inserted vehicle |
Definition at line 163 of file MSVehicleControl.cpp.
References SUMOVehicleParameter::depart, MSVehicleType::getCarFollowModel(), SUMOTrafficObject::getChosenSpeedFactor(), SUMOVehicle::getDeparture(), MSNet::getInstance(), MSCFModel::getMaxDecel(), SUMOVehicle::getParameter(), SUMOTrafficObject::getVClass(), SUMOTrafficObject::getVehicleType(), MSNet::informVehicleStateListener(), MAX2(), MIN2(), MSVehicleControl::myMaxSpeedFactor, MSVehicleControl::myMinDeceleration, MSVehicleControl::myRunningVehNo, MSVehicleControl::myTotalDepartureDelay, STEPFLOOR, STEPS2TIME, SVC_NON_ROAD, SVC_PEDESTRIAN, and MSNet::VEHICLE_STATE_DEPARTED.
Referenced by MSVehicleControl::loadedVehEnd(), and MSBaseVehicle::onDepart().
|
protectedinherited |
The number of build vehicles.
Definition at line 533 of file MSVehicleControl.h.
Referenced by GUIMEVehicleControl::buildVehicle(), MEVehicleControl::buildVehicle(), buildVehicle(), MSVehicleControl::buildVehicle(), MSVehicleControl::discountStateLoaded(), MSVehicleControl::getActiveVehicleCount(), MSVehicleControl::getLoadedVehicleNo(), MSVehicleControl::getQuota(), MSVehicleControl::saveState(), and MSVehicleControl::setState().
|
mutableprivate |
The mutex used to avoid concurrent updates of the vehicle buffer.
Definition at line 125 of file GUIVehicleControl.h.
Referenced by addVehicle(), deleteVehicle(), getHaltingVehicleNo(), getVehicleMeanSpeeds(), insertVehicleIDs(), releaseVehicles(), secureVehicles(), and ~GUIVehicleControl().
|
protectedinherited |
Dictionary of vehicles.
Definition at line 581 of file MSVehicleControl.h.
Referenced by MSVehicleControl::abortWaiting(), MSVehicleControl::addVehicle(), MSVehicleControl::deleteVehicle(), MSVehicleControl::getVehicle(), GUIMEVehicleControl::insertVehicleIDs(), insertVehicleIDs(), MSVehicleControl::loadedVehBegin(), MSVehicleControl::loadedVehEnd(), MSVehicleControl::saveState(), and MSVehicleControl::~MSVehicleControl().