23 #ifndef MSPersonControl_h 24 #define MSPersonControl_h 65 typedef std::map<std::string, MSTransportable*>::const_iterator
constVehIt;
unsigned int getLoadedPersonNumber() const
Returns the number of build Persons.
Representation of a vehicle in the micro simulation.
virtual void erase(MSTransportable *person)
removes a single person
virtual MSPerson * buildPerson(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan) const
Builds a new person.
std::map< SUMOTime, PersonVector > myWaiting4Departure
Persons waiting for departure.
unsigned int myRunningPersonNumber
The number of persons within the network (build and inserted but not removed)
constVehIt loadedPersonsEnd() const
Returns the end of the internal persons map.
unsigned int getJammedPersonNumber() const
Returns the number of times a person was jammed.
unsigned int getRunningPersonNumber() const
Returns the number of build and inserted, but not yet deleted Persons.
Definition of vehicle stop (position and duration)
void setWalking(MSTransportable *p)
MSPersonControl()
Constructor.
unsigned int myJammedPersonNumber
The number of jammed persons.
The simulated network and simulation perfomer.
The car-following model and parameter.
void setWaitEnd(SUMOTime time, MSTransportable *person)
sets the arrival time for a waiting or walking person
bool hasPersons() const
checks whether any person waits to finish her plan
A road/street connecting two junctions.
std::vector< MSTransportable::Stage * > MSTransportablePlan
the structure holding the plan of a transportable
bool add(const std::string &id, MSPerson *person)
Adds a single person, returns false if an id clash occured.
void abortWaiting()
aborts the plan for any person that is still waiting for a ride
void checkWaitingPersons(MSNet *net, const SUMOTime time)
checks whether any persons waiting or walking time is over
std::map< std::string, MSTransportable * > myWalking
all persons by id
unsigned int size() const
Returns the number of known persons.
std::map< const MSEdge *, PersonVector > myWaiting4Vehicle
the lists of waiting persons
std::map< std::string, MSTransportable * > myPersons
all persons by id
void unsetWalking(MSTransportable *p)
bool hasNonWaiting() const
checks whether any person is still engaged in walking / stopping
void registerJammed()
register a jammed person
void addWaiting(const MSEdge *edge, MSTransportable *person)
adds a person to the list of persons waiting for a vehicle on the specified edge
unsigned int myLoadedPersonNumber
The number of build persons.
Structure representing possible vehicle parameter.
std::map< SUMOTime, PersonVector > myWaitingUntil
the lists of walking / stopping persons
void setDeparture(SUMOTime time, MSPerson *person)
sets the arrival time for a waiting or walking person
std::map< std::string, MSTransportable * >::const_iterator constVehIt
Definition of the internal persons map iterator.
std::vector< MSTransportable * > PersonVector
Definition of a list of persons.
virtual ~MSPersonControl()
Destructor.
bool boardAnyWaiting(MSEdge *edge, MSVehicle *vehicle, MSVehicle::Stop *stop)
board any applicable persons Boards any people who wait on that edge for the given vehicle and remove...
bool isWaiting4Vehicle(const MSEdge *const edge, MSPerson *p) const
returns whether the the given person is waiting for a vehicle on the given edge
constVehIt loadedPersonsBegin() const
Returns the begin of the internal persons map.