53 initVehicle(built, ignoreStopErrors, addRouteStops, source);
60 FXMutexLock locker(
myLock);
67 FXMutexLock locker(
myLock);
74 FXMutexLock locker(
myLock);
79std::pair<double, double>
81 FXMutexLock locker(
myLock);
88 FXMutexLock locker(
myLock);
std::shared_ptr< const MSRoute > ConstMSRoutePtr
GUIGlID getGlID() const
Returns the numerical id of the object.
virtual int getHaltingVehicleNo() const override
Returns the number of halting vehicles.
void secureVehicles()
lock access to vehicle removal/additions for thread synchronization
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
virtual std::pair< double, double > getVehicleMeanSpeeds() const override
get current absolute and relative mean vehicle speed in the network
void insertVehicleIDs(std::vector< GUIGlID > &into, bool listParking, bool listTeleporting)
Returns the list of all known vehicles by gl-id.
bool addVehicle(const std::string &id, SUMOVehicle *v) override
Tries to insert the vehicle into the internal vehicle container.
void releaseVehicles()
unlock access to vehicle removal/additions for thread synchronization
SUMOVehicle * buildVehicle(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.
~GUIVehicleControl()
Destructor.
void deleteVehicle(SUMOVehicle *v, bool discard=false, bool wasKept=false) override
Deletes the vehicle.
GUIVehicleControl()
Constructor.
A MSVehicle extended by some values for usage within the gui.
static SumoRNG * getParsingRNG()
get parsing RNG
The class responsible for building and deletion of vehicles.
VehicleDefinitionSource
possible origins of a vehicle definition
void initVehicle(MSBaseVehicle *built, const bool ignoreStopErrors, bool addRouteStops, const VehicleDefinitionSource source)
virtual bool addVehicle(const std::string &id, SUMOVehicle *v)
Tries to insert the vehicle into the internal vehicle container.
virtual std::pair< double, double > getVehicleMeanSpeeds() const
get current absolute and relative mean vehicle speed in the network
virtual int getHaltingVehicleNo() const
Returns the number of halting vehicles.
virtual void deleteVehicle(SUMOVehicle *v, bool discard=false, bool wasKept=false)
Deletes the vehicle.
VehicleDictType myVehicleDict
Dictionary of vehicles.
Representation of a vehicle in the micro simulation.
The car-following model and parameter.
double computeChosenSpeedDeviation(SumoRNG *rng, const double minDev=-1.) const
Computes and returns the speed deviation.
Representation of a vehicle.
virtual bool isOnRoad() const =0
Returns the information whether the vehicle is on a road (is simulated)
virtual bool isParking() const =0
Returns the information whether the vehicle is parked.
Structure representing possible vehicle parameter.