SUMO - Simulation of Urban MObility
|
#include <MSPerson.h>
Data Structures | |
class | MSPersonStage |
class | MSPersonStage_Driving |
class | MSPersonStage_Waiting |
class | MSPersonStage_Walking |
Public Types | |
typedef std::vector < MSPersonStage * > | MSPersonPlan |
the structure holding the plan of a person More... | |
enum | StageType { WALKING, DRIVING, WAITING } |
Public Member Functions | |
SUMOReal | getAngle (SUMOTime now) const |
MSPersonStage * | getCurrentStage () const |
StageType | getCurrentStageType () const |
std::string | getCurrentStageTypeName () const |
SUMOTime | getDesiredDepart () const |
Returns the desired departure time. More... | |
const MSEdge & | getDestination () const |
Returns the current destination. More... | |
const MSEdge * | getEdge (SUMOTime now) const |
Returns the current edge. More... | |
SUMOReal | getEdgePos (SUMOTime now) const |
const MSEdge * | getFromEdge () const |
Returns the departure edge. More... | |
const std::string & | getID () const |
returns the person id More... | |
const SUMOVehicleParameter & | getParameter () const |
virtual Position | getPosition (SUMOTime now) const |
const MSVehicleType & | getVehicleType () const |
bool | isWaiting4Vehicle () const |
Whether the person waits for a vehicle of the line specified. More... | |
bool | isWaitingFor (const std::string &line) const |
Whether the person waits for a vehicle of the line specified. More... | |
MSPerson (const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSPersonPlan *plan) | |
constructor More... | |
bool | proceed (MSNet *net, SUMOTime time) |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. More... | |
virtual | ~MSPerson () |
destructor More... | |
Static Public Attributes | |
static const SUMOReal | SIDEWALK_OFFSET |
the offset for computing person positions when walking More... | |
Protected Attributes | |
const SUMOVehicleParameter * | myParameter |
the plan of the person More... | |
MSPersonPlan * | myPlan |
the plan of the person More... | |
MSPersonPlan::iterator | myStep |
the iterator over the route More... | |
const MSVehicleType * | myVType |
This Persons's type. (mainly used for drawing related information. More... | |
bool | myWriteEvents |
Whether events shall be written. More... | |
Private Member Functions | |
MSPerson (const MSPerson &) | |
Invalidated copy constructor. More... | |
MSPerson & | operator= (const MSPerson &) |
Invalidated assignment operator. More... | |
The class holds a simulated person together with her movement stages
Definition at line 66 of file MSPerson.h.
typedef std::vector<MSPersonStage*> MSPerson::MSPersonPlan |
the structure holding the plan of a person
Definition at line 440 of file MSPerson.h.
enum MSPerson::StageType |
Enumerator | |
---|---|
WALKING | |
DRIVING | |
WAITING |
Definition at line 68 of file MSPerson.h.
MSPerson::MSPerson | ( | const SUMOVehicleParameter * | pars, |
const MSVehicleType * | vtype, | ||
MSPersonPlan * | plan | ||
) |
|
virtual |
|
private |
Invalidated copy constructor.
Definition at line 503 of file MSPerson.h.
Referenced by GUIPerson::drawAction_drawAsImage(), and GUIPerson::drawAction_drawAsPoly().
|
inline |
Definition at line 517 of file MSPerson.h.
References myStep.
|
inline |
Definition at line 508 of file MSPerson.h.
|
inline |
Definition at line 513 of file MSPerson.h.
Referenced by GUIPerson::getParameterWindow().
SUMOTime MSPerson::getDesiredDepart | ( | ) | const |
Returns the desired departure time.
Definition at line 551 of file MSPerson.cpp.
References SUMOVehicleParameter::depart, and myParameter.
Referenced by MSPersonControl::erase().
|
inline |
Returns the current destination.
Definition at line 479 of file MSPerson.h.
Referenced by GUIPerson::getParameterWindow(), MSDevice_Person::notifyLeave(), and MSDevice_Person::notifyMove().
Returns the current edge.
Definition at line 484 of file MSPerson.h.
Referenced by MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Walking::getAngle(), MSPerson::MSPersonStage_Driving::getEdgePos(), and MSPerson::MSPersonStage_Walking::getPosition().
Definition at line 493 of file MSPerson.h.
|
inline |
Returns the departure edge.
Definition at line 489 of file MSPerson.h.
Referenced by GUIPerson::getParameterWindow().
const std::string & MSPerson::getID | ( | ) | const |
returns the person id
Definition at line 517 of file MSPerson.cpp.
References SUMOVehicleParameter::id, and myParameter.
Referenced by MSPersonControl::abortWaiting(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSPersonControl::erase(), GUIPerson::getParameterWindow(), MSDevice_Person::notifyLeave(), MSPersonControl::setWalking(), and MSPersonControl::unsetWalking().
|
inline |
Definition at line 538 of file MSPerson.h.
References myParameter.
Referenced by GUIPerson::setFunctionalColor().
Reimplemented in GUIPerson.
Definition at line 498 of file MSPerson.h.
Referenced by GUIPerson::getPosition().
|
inline |
Definition at line 543 of file MSPerson.h.
References myVType.
Referenced by GUIPerson::drawAction_drawAsImage().
|
inline |
Whether the person waits for a vehicle of the line specified.
Definition at line 534 of file MSPerson.h.
Referenced by GUIPerson::getPosition(), and MSPerson::MSPersonStage_Driving::getStageTypeName().
|
inline |
Whether the person waits for a vehicle of the line specified.
Definition at line 529 of file MSPerson.h.
Definition at line 523 of file MSPerson.cpp.
References myPlan, myStep, MSEdge::removePerson(), and SUMOReal.
Referenced by MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSDevice_Person::notifyLeave(), MSDevice_Person::notifyMove(), and MSPerson::MSPersonStage_Walking::proceed().
void MSPerson::setDeparted | ( | SUMOTime | now | ) |
logs end of the step
Definition at line 557 of file MSPerson.cpp.
void MSPerson::tripInfoOutput | ( | OutputDevice & | os | ) | const |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Definition at line 563 of file MSPerson.cpp.
References myPlan.
Referenced by MSPersonControl::erase().
|
protected |
the plan of the person
Definition at line 444 of file MSPerson.h.
Referenced by getDesiredDepart(), getID(), getParameter(), and ~MSPerson().
|
protected |
the plan of the person
Definition at line 450 of file MSPerson.h.
Referenced by MSPerson(), proceed(), tripInfoOutput(), and ~MSPerson().
|
protected |
the iterator over the route
Definition at line 453 of file MSPerson.h.
Referenced by getCurrentStage(), MSPerson(), and proceed().
|
protected |
This Persons's type. (mainly used for drawing related information.
Definition at line 447 of file MSPerson.h.
Referenced by getVehicleType().
|
protected |
Whether events shall be written.
Definition at line 456 of file MSPerson.h.
|
static |
the offset for computing person positions when walking
Definition at line 549 of file MSPerson.h.
Referenced by MSPerson::MSPersonStage_Walking::getPosition(), MSPerson::MSPersonStage_Driving::getPosition(), MSPerson::MSPersonStage_Waiting::getPosition(), and GUINet::initGUIStructures().