48 const bool ignoreStopErrors,
const bool fromRouteFile) {
58 FXMutexLock locker(
myLock);
65 FXMutexLock locker(
myLock);
72 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.
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.
~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 std::mt19937 * 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.
void initVehicle(MSBaseVehicle *built, const bool ignoreStopErrors)
VehicleDictType myVehicleDict
Dictionary of vehicles.
The car-following model and parameter.
double computeChosenSpeedDeviation(std::mt19937 *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.