 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
19 #ifndef MSTransportableControl_h
20 #define MSTransportableControl_h
57 typedef std::map<std::string, MSTransportable*>::const_iterator
constVehIt;
137 std::mt19937* rng)
const;
std::map< std::string, MSTransportable * >::const_iterator constVehIt
Definition of the internal transportables map iterator.
The car-following model and parameter.
void abortWaitingForVehicle(MSTransportable *t)
let the given transportable abort waiting for a vehicle (when removing stage via TraCI)
bool boardAnyWaiting(MSEdge *edge, SUMOVehicle *vehicle, const SUMOVehicleParameter::Stop &stop, SUMOTime &timeToBoardNextPerson, SUMOTime &stopDuration)
board any applicable persons Boards any people who wait on that edge for the given vehicle and remove...
int getActiveCount()
return the number of active transportable objects
virtual void erase(MSTransportable *transportable)
removes a single transportable
The simulated network and simulation perfomer.
virtual ~MSTransportableControl()
Destructor.
Representation of a vehicle.
int getWaitingForVehicleNumber() const
Returns the number of vehicles waiting for a ride.
std::map< const MSEdge *, TransportableVector > myWaiting4Vehicle
the lists of waiting transportables
int size() const
Returns the number of known transportables.
Structure representing possible vehicle parameter.
int myJammedNumber
The number of jammed transportables.
bool add(MSTransportable *transportable)
Adds a single transportable, returns false if an id clash occurred.
void setWaitEnd(SUMOTime time, MSTransportable *transportable)
sets the arrival time for a waiting transportable
void registerJammed()
register a jammed transportable
bool loadAnyWaiting(MSEdge *edge, SUMOVehicle *vehicle, const SUMOVehicleParameter::Stop &stop, SUMOTime &timeToLoadNextContainer, SUMOTime &stopDuration)
load any applicable containers Loads any container that is waiting on that edge for the given vehicle...
bool hasNonWaiting() const
checks whether any transportable is still engaged in walking / stopping
MSTransportable * get(const std::string &id) const
Returns the named transportable, if existing.
std::map< SUMOTime, TransportableVector > myWaiting4Departure
Transportables waiting for departure.
int myRunningNumber
The number of transportables within the network (build and inserted but not removed)
virtual MSTransportable * buildPerson(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan, std::mt19937 *rng) const
Builds a new person.
bool hasTransportables() const
checks whether any transportable waits to finish her plan
constVehIt loadedBegin() const
Returns the begin of the internal transportables map.
void abortAnyWaitingForVehicle()
aborts the plan for any transportable that is still waiting for a ride
A road/street connecting two junctions.
int myLoadedNumber
The number of build transportables.
std::map< SUMOTime, TransportableVector > myWaitingUntil
the lists of walking / stopping transportables
int getJammedNumber() const
Returns the number of times a transportables was jammed.
bool myHaveNewWaiting
whether a new transportable waiting for a vehicle has been added in the last step
std::vector< MSTransportable * > TransportableVector
Definition of a list of transportables.
int myWaitingForVehicleNumber
The number of transportables waiting for vehicles.
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
constVehIt loadedEnd() const
Returns the end of the internal transportables map.
MSTransportableControl()
Constructor.
void addWaiting(const MSEdge *edge, MSTransportable *person)
adds a transportable to the list of transportables waiting for a vehicle on the specified edge
void checkWaiting(MSNet *net, const SUMOTime time)
checks whether any transportables waiting time is over
int getRunningNumber() const
Returns the number of build and inserted, but not yet deleted transportables.
int getLoadedNumber() const
Returns the number of build transportables.
std::map< std::string, MSTransportable * > myTransportables
all currently created transportables by id
void abortWaiting(MSTransportable *t)
aborts waiting stage of transportable
virtual MSTransportable * buildContainer(const SUMOVehicleParameter *pars, MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan) const
Builds a new container.
Definition of vehicle stop (position and duration)