 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
51 const bool ignoreStopErrors,
const bool fromRouteFile) {
62 FXMutexLock locker(
myLock);
69 FXMutexLock locker(
myLock);
76 FXMutexLock locker(
myLock);
81 std::pair<double, double>
83 FXMutexLock locker(
myLock);
90 FXMutexLock locker(
myLock);
The car-following model and parameter.
bool addVehicle(const std::string &id, SUMOVehicle *v)
Tries to insert the vehicle into the internal vehicle container.
void informVehicleStateListener(const SUMOVehicle *const vehicle, VehicleState to, const std::string &info="")
Informs all added listeners about a vehicle's state change.
Representation of a vehicle.
virtual bool isOnRoad() const =0
Returns the information whether the vehicle is on a road (is simulated)
void secureVehicles()
lock access to vehicle removal/additions for thread synchronization
Structure representing possible vehicle parameter.
~GUIVehicleControl()
Destructor.
int myLoadedVehNo
The number of build vehicles.
void deleteVehicle(SUMOVehicle *v, bool discard=false)
Deletes the vehicle.
virtual int getHaltingVehicleNo() const
Returns the number of halting vehicles.
virtual bool addVehicle(const std::string &id, SUMOVehicle *v)
Tries to insert the vehicle into the internal vehicle container.
double computeChosenSpeedDeviation(std::mt19937 *rng, const double minDev=-1.) const
Computes and returns the speed deviation.
A MSVehicle extended by some values for usage within the gui.
VehicleDictType myVehicleDict
Dictionary of vehicles.
GUIGlID getGlID() const
Returns the numerical id of the object.
virtual void deleteVehicle(SUMOVehicle *v, bool discard=false)
Deletes the vehicle.
virtual std::pair< double, double > getVehicleMeanSpeeds() const
get current absolute and relative mean vehicle speed in the network
@ VEHICLE_STATE_BUILT
The vehicle was built, but has not yet departed.
GUIVehicleControl()
Constructor.
void addStops(const bool ignoreStopErrors)
Adds stops to the built vehicle.
virtual int getHaltingVehicleNo() const
Returns the number of halting vehicles.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
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 releaseVehicles()
unlock access to vehicle removal/additions for thread synchronization
static std::mt19937 * getParsingRNG()
get parsing RNG
void insertVehicleIDs(std::vector< GUIGlID > &into, bool listParking, bool listTeleporting)
Returns the list of all known vehicles by gl-id.
virtual std::pair< double, double > getVehicleMeanSpeeds() const
get current absolute and relative mean vehicle speed in the network
The class responsible for building and deletion of vehicles.
FXMutex myLock
The mutex used to avoid concurrent updates of the vehicle buffer.
virtual bool isParking() const =0
Returns the information whether the vehicle is parked.
Representation of a vehicle in the micro simulation.