48 const bool ignoreStopErrors,
const bool fromRouteFile) {
58 FXMutexLock locker(
myLock);
65 FXMutexLock locker(
myLock);
72 FXMutexLock locker(
myLock);
82 std::pair<double, double>
84 FXMutexLock locker(
myLock);
91 FXMutexLock locker(
myLock);
GUIGlID getGlID() const
Returns the numerical id of the object.
void deleteVehicle(SUMOVehicle *v, bool discard=false)
Deletes the vehicle.
GUIMEVehicleControl()
Constructor.
virtual std::pair< double, double > getVehicleMeanSpeeds() const
get current absolute and relative mean vehicle speed in the network
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.
void secureVehicles()
lock access to vehicle removal/additions for thread synchronization
bool addVehicle(const std::string &id, SUMOVehicle *v)
Tries to insert the vehicle into the internal vehicle container.
virtual int getHaltingVehicleNo() const
Returns the number of halting vehicles.
~GUIMEVehicleControl()
Destructor.
void releaseVehicles()
unlock access to vehicle removal/additions for thread synchronization
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
void insertVehicleIDs(std::vector< GUIGlID > &into)
Returns the list of all known vehicles by gl-id.
A MSVehicle extended by some values for usage within the gui.
The class responsible for building and deletion of vehicles (gui-version)
The base class for microscopic and mesoscopic vehicles.
static SumoRNG * getParsingRNG()
get parsing RNG
virtual void deleteVehicle(SUMOVehicle *v, bool discard=false)
Deletes the vehicle.
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
void initVehicle(MSBaseVehicle *built, const bool ignoreStopErrors)
virtual int getHaltingVehicleNo() const
Returns the number of halting vehicles.
VehicleDictType myVehicleDict
Dictionary of vehicles.
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)
Structure representing possible vehicle parameter.