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 = 0, DRIVING = 1, WAITING = 2 } |
Public Member Functions | |
virtual SUMOReal | getAngle () const |
return the current angle of the person More... | |
MSPersonStage * | getCurrentStage () const |
std::string | getCurrentStageDescription () const |
StageType | getCurrentStageType () const |
SUMOTime | getDesiredDepart () const |
Returns the desired departure time. More... | |
const MSEdge & | getDestination () const |
Returns the current destination. More... | |
const MSEdge * | getEdge () const |
Returns the current edge. More... | |
virtual SUMOReal | getEdgePos () const |
return the offset from the start of the current edge More... | |
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 () const |
return the Network coordinate of the person More... | |
virtual SUMOReal | getSpeed () const |
the current speed of the person More... | |
const MSVehicleType & | getVehicleType () const |
virtual SUMOReal | getWaitingSeconds () const |
the time this person spent waiting in seconds More... | |
bool | isWaiting4Vehicle () const |
Whether the person waits for a vehicle. 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 | routeOutput (OutputDevice &os) const |
Called on writing vehroute output. More... | |
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... | |
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 70 of file MSPerson.h.
typedef std::vector<MSPersonStage*> MSPerson::MSPersonPlan |
the structure holding the plan of a person
Definition at line 515 of file MSPerson.h.
enum MSPerson::StageType |
Enumerator | |
---|---|
WALKING | |
DRIVING | |
WAITING |
Definition at line 72 of file MSPerson.h.
MSPerson::MSPerson | ( | const SUMOVehicleParameter * | pars, |
const MSVehicleType * | vtype, | ||
MSPersonPlan * | plan | ||
) |
|
virtual |
|
private |
Invalidated copy constructor.
|
virtual |
return the current angle of the person
Reimplemented in GUIPerson.
Definition at line 626 of file MSPerson.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIPerson::getAngle(), and MSFCDExport::write().
|
inline |
Definition at line 593 of file MSPerson.h.
References myStep.
Referenced by GUIPerson::drawGL(), and MSEdge::person_by_offset_sorter::operator()().
|
inline |
Definition at line 589 of file MSPerson.h.
Referenced by GUIPerson::getParameterWindow().
|
inline |
Definition at line 584 of file MSPerson.h.
Referenced by MSPModel_Striping::add(), GUIPerson::getColorValue(), and GUIPerson::getPosition().
SUMOTime MSPerson::getDesiredDepart | ( | ) | const |
Returns the desired departure time.
Definition at line 584 of file MSPerson.cpp.
References SUMOVehicleParameter::depart, and myParameter.
Referenced by MSPersonControl::erase(), and routeOutput().
|
inline |
Returns the current destination.
Definition at line 554 of file MSPerson.h.
Referenced by GUIPerson::getParameterWindow(), MSDevice_Person::notifyLeave(), MSDevice_Person::notifyMove(), MSPerson::MSPersonStage_Driving::routeOutput(), and MSPerson::MSPersonStage_Waiting::routeOutput().
|
inline |
Returns the current edge.
Definition at line 559 of file MSPerson.h.
Referenced by MSPModel_Striping::add(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::getEdgePos(), GUIPerson::getParameterWindow(), and MSPerson::MSPersonStage_Walking::moveToNextEdge().
|
virtual |
return the offset from the start of the current edge
Reimplemented in GUIPerson.
Definition at line 615 of file MSPerson.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIPerson::getEdgePos(), and MSFCDExport::write().
|
inline |
Returns the departure edge.
Definition at line 564 of file MSPerson.h.
Referenced by GUIPerson::getParameterWindow(), and MSPerson::MSPersonStage_Driving::routeOutput().
const std::string & MSPerson::getID | ( | ) | const |
returns the person id
Definition at line 551 of file MSPerson.cpp.
References SUMOVehicleParameter::id, and myParameter.
Referenced by MSPersonControl::abortWaiting(), MSVehicle::addPerson(), 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(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), GUIPerson::getParameterWindow(), MSPModel_Striping::moveInDirection(), MSDevice_Person::notifyLeave(), MSPModel_Striping::by_xpos_sorter::operator()(), MSEdge::person_by_offset_sorter::operator()(), MSPModel_Striping::PState::PState(), MSPerson::MSPersonStage_Driving::routeOutput(), MSPerson::MSPersonStage_Waiting::routeOutput(), MSPersonControl::setWalking(), MSPersonControl::unsetWalking(), and MSFCDExport::write().
|
inline |
Definition at line 622 of file MSPerson.h.
References myParameter.
Referenced by GUIPerson::setFunctionalColor().
|
virtual |
return the Network coordinate of the person
Reimplemented in GUIPerson.
Definition at line 620 of file MSPerson.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIPerson::getPosition(), and MSFCDExport::write().
|
virtual |
the current speed of the person
Reimplemented in GUIPerson.
Definition at line 636 of file MSPerson.cpp.
Referenced by GUIPerson::getSpeed(), and MSFCDExport::write().
|
inline |
Definition at line 627 of file MSPerson.h.
References myVType.
Referenced by GUIPerson::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsTriangle(), and GUIPerson::setFunctionalColor().
|
virtual |
the time this person spent waiting in seconds
Reimplemented in GUIPerson.
Definition at line 631 of file MSPerson.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and STEPS2TIME.
Referenced by GUIPerson::getWaitingSeconds().
|
inline |
Whether the person waits for a vehicle.
Definition at line 617 of file MSPerson.h.
Referenced by GUIPerson::getColorValue(), GUIPerson::getPosition(), MSPerson::MSPersonStage_Driving::getStageDescription(), and MSPerson::MSPersonStage_Driving::getWaitingTime().
|
inline |
Whether the person waits for a vehicle of the line specified.
Definition at line 612 of file MSPerson.h.
Definition at line 557 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::routeOutput | ( | OutputDevice & | os | ) | const |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Definition at line 604 of file MSPerson.cpp.
References getDesiredDepart(), MSPerson::MSPersonStage_Waiting::getUntil(), myPlan, and WAITING.
Referenced by MSPersonControl::erase().
void MSPerson::setDeparted | ( | SUMOTime | now | ) |
logs end of the step
Definition at line 590 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 596 of file MSPerson.cpp.
References myPlan.
Referenced by MSPersonControl::erase().
|
protected |
the plan of the person
Definition at line 519 of file MSPerson.h.
Referenced by getDesiredDepart(), getID(), getParameter(), and ~MSPerson().
|
protected |
the plan of the person
Definition at line 525 of file MSPerson.h.
Referenced by MSPerson(), proceed(), routeOutput(), tripInfoOutput(), and ~MSPerson().
|
protected |
the iterator over the route
Definition at line 528 of file MSPerson.h.
Referenced by getCurrentStage(), MSPerson(), and proceed().
|
protected |
This Persons's type. (mainly used for drawing related information.
Definition at line 522 of file MSPerson.h.
Referenced by getVehicleType().
|
protected |
Whether events shall be written.
Definition at line 531 of file MSPerson.h.