23 #ifndef MSPersonControl_h
24 #define MSPersonControl_h
65 typedef std::map<std::string, MSPerson*>::const_iterator
constVehIt;
89 MSPerson*
get(
const std::string& id)
const;
virtual MSPerson * buildPerson(const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSPerson::MSPersonPlan *plan) const
Builds a new person.
Representation of a vehicle in the micro simulation.
std::map< std::string, MSPerson * > myWalking
all persons by id
std::map< SUMOTime, PersonVector > myWaiting4Departure
Persons waiting for departure.
constVehIt loadedPersonsEnd() const
Returns the end of the internal persons map.
Definition of vehicle stop (position and duration)
MSPersonControl()
Constructor.
The simulated network and simulation perfomer.
The car-following model and parameter.
bool hasPersons() const
checks whether any person waits to finish her plan
std::map< std::string, MSPerson * > myPersons
all persons by id
A road/street connecting two junctions.
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 addWaiting(const MSEdge *edge, MSPerson *person)
adds a person to the list of persons waiting for a vehicle on the specified edge
void checkWaitingPersons(MSNet *net, const SUMOTime time)
checks whether any persons waiting or walking time is over
std::map< std::string, MSPerson * >::const_iterator constVehIt
Definition of the internal persons map iterator.
unsigned int size() const
Returns the number of known persons.
void setWaitEnd(SUMOTime time, MSPerson *person)
sets the arrival time for a waiting or walking person
void unsetWalking(MSPerson *p)
std::map< const MSEdge *, PersonVector > myWaiting4Vehicle
the lists of waiting persons
bool hasNonWaiting() const
checks whether any person is still engaged in walking / stopping
Structure representing possible vehicle parameter.
void setWalking(MSPerson *p)
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::vector< MSPerson * > PersonVector
Definition of a list of persons.
virtual void erase(MSPerson *person)
removes a single person
std::vector< MSPersonStage * > MSPersonPlan
the structure holding the plan of a person
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.