|
SUMO - Simulation of Urban MObility
|
GUI-version of the person control for building gui persons. More...
#include <GUIPersonControl.h>


Public Types | |
| typedef std::map< std::string, MSTransportable * >::const_iterator | constVehIt |
| Definition of the internal persons map iterator. More... | |
| typedef std::vector< MSTransportable * > | PersonVector |
| Definition of a list of persons. More... | |
Public Member Functions | |
| void | abortWaiting () |
| aborts the plan for any person that is still waiting for a ride More... | |
| bool | add (const std::string &id, MSPerson *person) |
| Adds a single person, returns false if an id clash occured. More... | |
| void | addWaiting (const MSEdge *edge, MSTransportable *person) |
| adds a person to the list of persons waiting for a vehicle on the specified edge More... | |
| 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 removes them from myWaiting More... | |
| virtual MSPerson * | buildPerson (const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan) const |
| Builds a new person. More... | |
| void | checkWaitingPersons (MSNet *net, const SUMOTime time) |
| checks whether any persons waiting or walking time is over More... | |
| virtual void | erase (MSTransportable *person) |
| removes a single person More... | |
| MSTransportable * | get (const std::string &id) const |
| Returns the named person, if existing. More... | |
| GUIPersonControl () | |
| constructor More... | |
| bool | hasNonWaiting () const |
| checks whether any person is still engaged in walking / stopping More... | |
| bool | hasPersons () const |
| checks whether any person waits to finish her plan More... | |
| void | insertPersonIDs (std::vector< GUIGlID > &into) |
| Returns the list of all known persons by gl-id. More... | |
| bool | isWaiting4Vehicle (const MSEdge *const edge, MSPerson *p) const |
| returns whether the the given person is waiting for a vehicle on the given edge More... | |
| constVehIt | loadedPersonsBegin () const |
| Returns the begin of the internal persons map. More... | |
| constVehIt | loadedPersonsEnd () const |
| Returns the end of the internal persons map. More... | |
| void | registerJammed () |
| register a jammed person More... | |
| void | setDeparture (SUMOTime time, MSPerson *person) |
| sets the arrival time for a waiting or walking person More... | |
| void | setWaitEnd (SUMOTime time, MSTransportable *person) |
| sets the arrival time for a waiting or walking person More... | |
| void | setWalking (MSTransportable *p) |
| unsigned int | size () const |
| Returns the number of known persons. More... | |
| void | unsetWalking (MSTransportable *p) |
| virtual | ~GUIPersonControl () |
| destructor More... | |
Retrieval of Person statistics (always accessable) | |
| unsigned int | getLoadedPersonNumber () const |
| Returns the number of build Persons. More... | |
| unsigned int | getRunningPersonNumber () const |
| Returns the number of build and inserted, but not yet deleted Persons. More... | |
| unsigned int | getJammedPersonNumber () const |
| Returns the number of times a person was jammed. More... | |
Protected Attributes | |
| unsigned int | myJammedPersonNumber |
| The number of jammed persons. More... | |
| unsigned int | myLoadedPersonNumber |
| The number of build persons. More... | |
| std::map< std::string, MSTransportable * > | myPersons |
| all persons by id More... | |
| unsigned int | myRunningPersonNumber |
| The number of persons within the network (build and inserted but not removed) More... | |
| std::map< SUMOTime, PersonVector > | myWaiting4Departure |
| Persons waiting for departure. More... | |
| std::map< const MSEdge *, PersonVector > | myWaiting4Vehicle |
| the lists of waiting persons More... | |
| std::map< SUMOTime, PersonVector > | myWaitingUntil |
| the lists of walking / stopping persons More... | |
| std::map< std::string, MSTransportable * > | myWalking |
| all persons by id More... | |
GUI-version of the person control for building gui persons.
Definition at line 45 of file GUIPersonControl.h.
|
inherited |
Definition of the internal persons map iterator.
Definition at line 65 of file MSPersonControl.h.
|
inherited |
Definition of a list of persons.
Definition at line 62 of file MSPersonControl.h.
| GUIPersonControl::GUIPersonControl | ( | ) |
constructor
Definition at line 47 of file GUIPersonControl.cpp.
|
virtual |
destructor
Definition at line 50 of file GUIPersonControl.cpp.
|
inherited |
aborts the plan for any person that is still waiting for a ride
Definition at line 241 of file MSPersonControl.cpp.
References MSPersonControl::erase(), MSTransportable::getID(), MSPersonControl::myWaiting4Vehicle, MSEdge::removePerson(), and WRITE_WARNING.
Referenced by MSNet::simulationState().
|
inherited |
Adds a single person, returns false if an id clash occured.
| [in] | id | The id of the person |
| [in] | person | The person to add |
Definition at line 69 of file MSPersonControl.cpp.
References MSPersonControl::myLoadedPersonNumber, MSPersonControl::myPersons, and MSPersonControl::myRunningPersonNumber.
|
inherited |
adds a person to the list of persons waiting for a vehicle on the specified edge
Definition at line 161 of file MSPersonControl.cpp.
References MSPersonControl::myWaiting4Vehicle.
Referenced by MSPerson::MSPersonStage_Driving::proceed().
|
inherited |
board any applicable persons Boards any people who wait on that edge for the given vehicle and removes them from myWaiting
| [in] | the | edge on which the boarding should take place |
| [in] | the | vehicle which is taking on passengers |
| [in] | the | stop at which the vehicle is stopping |
Definition at line 176 of file MSPersonControl.cpp.
References MSVehicle::addPerson(), DELTA_T, MSVehicle::Stop::duration, MSVehicle::Stop::endPos, MSVehicleType::getBoardingDuration(), MSNet::getCurrentTimeStep(), MSNet::getInstance(), MSBaseVehicle::getParameter(), MSVehicleType::getPersonCapacity(), MSVehicle::getPersonNumber(), MSBaseVehicle::getVehicleType(), SUMOVehicleParameter::id, SUMOVehicleParameter::line, MSPersonControl::myWaiting4Vehicle, MSEdge::removePerson(), MSVehicle::Stop::startPos, and MSVehicle::Stop::timeToBoardNextPerson.
Referenced by MSVehicle::processNextStop().
|
virtual |
Builds a new person.
| [in] | pars | The parameter |
| [in] | vtype | The type (reusing vehicle type container here) |
| [in] | plan | This person's plan |
Reimplemented from MSPersonControl.
Definition at line 55 of file GUIPersonControl.cpp.
checks whether any persons waiting or walking time is over
Definition at line 136 of file MSPersonControl.cpp.
References MSPersonControl::erase(), MSPersonControl::myWaiting4Departure, and MSPersonControl::myWaitingUntil.
Referenced by MSNet::simulationStep().
|
virtualinherited |
removes a single person
Definition at line 91 of file MSPersonControl.cpp.
References OutputDevice::closeTag(), MSTransportable::getDesiredDepart(), OutputDevice::getDeviceByOption(), MSTransportable::getID(), MSNet::getInstance(), OptionsCont::getOptions(), MSPersonControl::myPersons, MSPersonControl::myRunningPersonNumber, OutputDevice::openTag(), MSTransportable::routeOutput(), time2string(), MSTransportable::tripInfoOutput(), and OutputDevice::writeAttr().
Referenced by MSPersonControl::abortWaiting(), MSPersonControl::checkWaitingPersons(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSDevice_Person::notifyLeave(), MSDevice_Person::notifyMove(), and MSPerson::MSPersonStage_Walking::proceed().
|
inherited |
Returns the named person, if existing.
| [in] | id | The id of the person |
Definition at line 81 of file MSPersonControl.cpp.
References MSPersonControl::myPersons.
Referenced by TraCIServerAPI_Person::getPosition(), TraCIServerAPI_Person::processGet(), and TraCIServerAPI_Person::processSet().
|
inlineinherited |
Returns the number of times a person was jammed.
Definition at line 189 of file MSPersonControl.h.
References MSPersonControl::myJammedPersonNumber.
Referenced by MSNet::closeSimulation(), and GUINet::getParameterWindow().
|
inlineinherited |
Returns the number of build Persons.
Definition at line 174 of file MSPersonControl.h.
References MSPersonControl::myLoadedPersonNumber.
Referenced by MSNet::closeSimulation(), and GUINet::getParameterWindow().
|
inlineinherited |
Returns the number of build and inserted, but not yet deleted Persons.
Definition at line 182 of file MSPersonControl.h.
References MSPersonControl::myRunningPersonNumber.
Referenced by MSNet::closeSimulation(), and GUINet::getParameterWindow().
|
inherited |
checks whether any person is still engaged in walking / stopping
Definition at line 220 of file MSPersonControl.cpp.
References MSPersonControl::myWaiting4Departure, MSPersonControl::myWaitingUntil, and MSPersonControl::myWalking.
Referenced by MSNet::simulationState().
|
inherited |
checks whether any person waits to finish her plan
Definition at line 214 of file MSPersonControl.cpp.
References MSPersonControl::myPersons.
Referenced by MSNet::simulationStep().
| void GUIPersonControl::insertPersonIDs | ( | std::vector< GUIGlID > & | into | ) |
Returns the list of all known persons by gl-id.
Definition at line 61 of file GUIPersonControl.cpp.
References MSPersonControl::myPersons.
returns whether the the given person is waiting for a vehicle on the given edge
Definition at line 170 of file MSPersonControl.cpp.
References MSPersonControl::myWaiting4Vehicle.
|
inlineinherited |
Returns the begin of the internal persons map.
Definition at line 143 of file MSPersonControl.h.
References MSPersonControl::myPersons.
Referenced by TraCIServerAPI_Person::processGet().
|
inlineinherited |
Returns the end of the internal persons map.
Definition at line 151 of file MSPersonControl.h.
References MSPersonControl::myPersons.
Referenced by TraCIServerAPI_Person::processGet().
|
inlineinherited |
register a jammed person
Definition at line 164 of file MSPersonControl.h.
References MSPersonControl::myJammedPersonNumber.
Referenced by MSPModel_Striping::PState::walk().
sets the arrival time for a waiting or walking person
Definition at line 116 of file MSPersonControl.cpp.
References DELTA_T, and MSPersonControl::myWaiting4Departure.
Referenced by MSRouteHandler::closePerson().
|
inherited |
sets the arrival time for a waiting or walking person
Definition at line 126 of file MSPersonControl.cpp.
References DELTA_T, and MSPersonControl::myWaitingUntil.
Referenced by MSPerson::MSPersonStage_Waiting::proceed().
|
inherited |
Definition at line 226 of file MSPersonControl.cpp.
References MSTransportable::getID(), and MSPersonControl::myWalking.
Referenced by MSPerson::MSPersonStage_Walking::proceed().
|
inlineinherited |
Returns the number of known persons.
Definition at line 159 of file MSPersonControl.h.
References MSPersonControl::myPersons.
Referenced by TraCIServerAPI_Person::processGet().
|
inherited |
Definition at line 232 of file MSPersonControl.cpp.
References MSTransportable::getID(), and MSPersonControl::myWalking.
Referenced by MSPerson::MSPersonStage_Walking::moveToNextEdge().
|
protectedinherited |
The number of jammed persons.
Definition at line 218 of file MSPersonControl.h.
Referenced by MSPersonControl::getJammedPersonNumber(), and MSPersonControl::registerJammed().
|
protectedinherited |
The number of build persons.
Definition at line 212 of file MSPersonControl.h.
Referenced by MSPersonControl::add(), and MSPersonControl::getLoadedPersonNumber().
|
protectedinherited |
all persons by id
Definition at line 197 of file MSPersonControl.h.
Referenced by MSPersonControl::add(), MSPersonControl::erase(), MSPersonControl::get(), MSPersonControl::hasPersons(), insertPersonIDs(), MSPersonControl::loadedPersonsBegin(), MSPersonControl::loadedPersonsEnd(), MSPersonControl::size(), and MSPersonControl::~MSPersonControl().
|
protectedinherited |
The number of persons within the network (build and inserted but not removed)
Definition at line 215 of file MSPersonControl.h.
Referenced by MSPersonControl::add(), MSPersonControl::erase(), and MSPersonControl::getRunningPersonNumber().
|
protectedinherited |
Persons waiting for departure.
Definition at line 203 of file MSPersonControl.h.
Referenced by MSPersonControl::checkWaitingPersons(), MSPersonControl::hasNonWaiting(), and MSPersonControl::setDeparture().
|
protectedinherited |
the lists of waiting persons
Definition at line 209 of file MSPersonControl.h.
Referenced by MSPersonControl::abortWaiting(), MSPersonControl::addWaiting(), MSPersonControl::boardAnyWaiting(), MSPersonControl::isWaiting4Vehicle(), and MSPersonControl::~MSPersonControl().
|
protectedinherited |
the lists of walking / stopping persons
Definition at line 206 of file MSPersonControl.h.
Referenced by MSPersonControl::checkWaitingPersons(), MSPersonControl::hasNonWaiting(), and MSPersonControl::setWaitEnd().
|
protectedinherited |
all persons by id
Definition at line 200 of file MSPersonControl.h.
Referenced by MSPersonControl::hasNonWaiting(), MSPersonControl::setWalking(), and MSPersonControl::unsetWalking().