38 #ifdef CHECK_MEMORY_LEAKS 40 #endif // CHECK_MEMORY_LEAKS 61 const bool ignoreStopErrors,
const bool fromRouteFile) {
95 into.push_back(static_cast<GUIMEVehicle*>((*i).second)->getGlID());
virtual void deleteVehicle(SUMOVehicle *v, bool discard=false)
Deletes the vehicle.
SUMOTime computeRandomDepartOffset() const
compute (optional) random offset to the departure time
MFXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
void releaseVehicles()
unlock 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.
void secureVehicles()
lock access to vehicle removal/additions for thread synchronization
static MTRand * getParsingRNG()
void deleteVehicle(SUMOVehicle *v, bool discard=false)
Deletes the vehicle.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
VehicleDictType myVehicleDict
Dictionary of vehicles.
virtual bool addVehicle(const std::string &id, SUMOVehicle *v)
Tries to insert the vehicle into the internal vehicle container.
The base class for microscopic and mesoscopic vehicles.
The car-following model and parameter.
SUMOReal computeChosenSpeedDeviation(MTRand *rng, const SUMOReal minDevFactor=0.2) const
Computes and returns the speed deviation.
GUIMEVehicleControl()
Constructor.
Representation of a vehicle.
void insertVehicleIDs(std::vector< GUIGlID > &into)
Returns the list of all known vehicles by gl-id.
SUMOTime depart
The vehicle's departure time.
int myLoadedVehNo
The number of build vehicles.
virtual bool isOnRoad() const =0
Returns the information whether the vehicle is on a road (is simulated)
The class responsible for building and deletion of vehicles (gui-version)
SUMOVehicle * buildVehicle(SUMOVehicleParameter *defs, const MSRoute *route, const MSVehicleType *type, const bool ignoreStopErrors, const bool fromRouteFile=true)
Builds a vehicle, increases the number of built vehicles.
The vehicle was built, but has not yet departed.
void unlock()
release mutex lock
~GUIMEVehicleControl()
Destructor.
void addStops(const bool ignoreStopErrors)
Adds stops to the built vehicle.
Structure representing possible vehicle parameter.
A MSVehicle extended by some values for usage within the gui.
A mutex encapsulator which locks/unlocks the given mutex on construction/destruction, respectively.
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to)
Informs all added listeners about a vehicle's state change.