 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
18 #ifndef MSVehicleContainer_h
19 #define MSVehicleContainer_h
93 friend std::ostream&
operator << (std::ostream& strm,
Searches for the VehicleDepartureVector with the wished depart.
void pop()
Removes the uppermost vehicle vector.
Representation of a vehicle.
int currentSize
Number of elements in heap.
MSVehicleContainer(int capacity=10)
Constructor.
void addReplacing(const VehicleDepartureVector &cont)
Replaces the existing single departure time vector by the one given.
bool operator()(const VehicleDepartureVector &e) const
comparison operator
~MSVehicleContainer()
Destructor.
void remove(SUMOVehicle *veh)
Removes a single vehicle.
bool operator()(const VehicleDepartureVector &e1, const VehicleDepartureVector &e2) const
comparison operator
std::pair< SUMOTime, VehicleVector > VehicleDepartureVector
SUMOTime topTime() const
Returns the time the uppermost vehicle vector is assigned to.
std::vector< SUMOVehicle * > VehicleVector
definition of a list of vehicles which have the same departure time
friend std::ostream & operator<<(std::ostream &strm, MSVehicleContainer &cont)
Prints the contents of the container.
SUMOTime myTime
the searched departure time
std::vector< VehicleDepartureVector > VehicleHeap
Definition of the heap type.
VehicleHeap array
The vehicle vector heap.
bool isEmpty() const
Returns the information whether the container is empty.
int size() const
Returns the size of the container.
bool anyWaitingBefore(SUMOTime time) const
Returns the information whether any vehicles want to depart before the given time.
void percolateDown(int hole)
Moves the elements down.
const VehicleVector & top()
Returns the uppermost vehicle vector.
DepartFinder(SUMOTime time)
constructor
void showArray() const
Prints the container (the departure times)
void add(SUMOVehicle *veh)
Adds a single vehicle.
Sort-criterion for vehicle departure lists.
Representation of a vehicle in the micro simulation.