![]() |
SUMO - Simulation of Urban MObility
|
#include <MSPerson.h>
Data Structures | |
class | MSPersonStage_Driving |
class | MSPersonStage_Walking |
Public Types | |
typedef std::vector< MSTransportable::Stage * > | MSTransportablePlan |
the structure holding the plan of a transportable More... | |
enum | StageType { WAITING_FOR_DEPART = 0, WAITING = 1, MOVING_WITHOUT_VEHICLE = 2, DRIVING = 3 } |
Public Member Functions | |
void | appendStage (Stage *stage) |
Appends the given stage to the current plan. More... | |
virtual double | getAngle () const |
return the current angle of the transportable More... | |
const MSEdge * | getArrivalEdge () const |
returns the final arrival edge More... | |
double | getArrivalPos () const |
returns the final arrival pos More... | |
MSTransportable::Stage * | getCurrentStage () const |
Return the current stage. More... | |
std::string | getCurrentStageDescription () const |
Returns the current stage description as a string. More... | |
StageType | getCurrentStageType () const |
the current stage type of the transportable More... | |
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 double | getEdgePos () const |
Return the position on the edge. More... | |
ConstMSEdgeVector | getEdges (int next) const |
Return the edges of the nth next stage. More... | |
const MSEdge * | getFromEdge () const |
Returns the departure edge. More... | |
const std::string & | getID () const |
returns the id of the transportable More... | |
const MSEdge & | getNextDestination () const |
Returns the destination after the current destination. More... | |
const std::string & | getNextEdge () const |
return the list of internal edges if this person is walking and the pedestrian model allows it More... | |
const MSEdge * | getNextEdgePtr () const |
returns the next edge ptr if this person is walking and the pedestrian model allows it More... | |
int | getNumRemainingStages () const |
Return the number of remaining stages (including the current) More... | |
int | getNumStages () const |
Return the total number stages in this persons plan. More... | |
const SUMOVehicleParameter & | getParameter () const |
virtual Position | getPosition () const |
Return the Network coordinate of the transportable. More... | |
virtual double | getSpeed () const |
the current speed of the transportable More... | |
StageType | getStageType (int next) const |
the stage type for the nth next stage More... | |
SUMOVehicle * | getVehicle () const |
The vehicle associated with this transportable. More... | |
const MSVehicleType & | getVehicleType () const |
virtual double | getWaitingSeconds () const |
the time this transportable spent waiting in seconds More... | |
bool | isWaiting4Vehicle () const |
Whether the transportable waits for a vehicle. More... | |
bool | isWaitingFor (const std::string &line) const |
Whether the transportable waits for a vehicle of the line specified. More... | |
MSPerson (const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan) | |
constructor More... | |
bool | proceed (MSNet *net, SUMOTime time) |
void | removeStage (int next) |
removes the nth next stage More... | |
void | replaceVehicleType (MSVehicleType *type) |
replace myVType More... | |
virtual void | routeOutput (OutputDevice &os) const |
Called on writing vehroute output. More... | |
void | setDeparted (SUMOTime now) |
logs depart time of the current stage More... | |
void | setSpeed (double speed) |
sets the walking speed (ignored in other stages) More... | |
virtual void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. More... | |
virtual | ~MSPerson () |
destructor More... | |
Protected Attributes | |
const SUMOVehicleParameter * | myParameter |
the plan of the transportable More... | |
MSTransportablePlan * | myPlan |
the plan of the transportable More... | |
MSTransportablePlan::iterator | myStep |
the iterator over the route More... | |
const MSVehicleType * | myVType |
This transportable's type. (mainly used for drawing related information Note sure if it is really necessary. More... | |
bool | myWriteEvents |
Whether events shall be written. More... | |
Static Protected Attributes | |
static const double | ROADSIDE_OFFSET |
the offset for computing positions when standing at an edge 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.
|
inherited |
the structure holding the plan of a transportable
Definition at line 377 of file MSTransportable.h.
|
inherited |
Enumerator | |
---|---|
WAITING_FOR_DEPART | |
WAITING | |
MOVING_WITHOUT_VEHICLE | |
DRIVING |
Definition at line 62 of file MSTransportable.h.
MSPerson::MSPerson | ( | const SUMOVehicleParameter * | pars, |
const MSVehicleType * | vtype, | ||
MSTransportable::MSTransportablePlan * | plan | ||
) |
constructor
Definition at line 294 of file MSPerson.cpp.
|
virtual |
destructor
Definition at line 299 of file MSPerson.cpp.
|
private |
Invalidated copy constructor.
|
inherited |
Appends the given stage to the current plan.
Definition at line 412 of file MSTransportable.cpp.
References MSTransportable::myPlan, and MSTransportable::myStep.
Referenced by MSTransportable::getVehicle(), TraCIServerAPI_Person::processSet(), and MSTransportable::removeStage().
|
virtualinherited |
return the current angle of the transportable
Reimplemented in GUIContainer.
Definition at line 386 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIPerson::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsTriangle(), GUIContainer::getAngle(), GUIPerson::getNaviDegree(), TraCIServerAPI_Person::processGet(), GUIPerson::setFunctionalColor(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
returns the final arrival edge
Definition at line 520 of file MSTransportable.h.
References MSTransportable::myPlan, and MSTransportable::replaceVehicleType().
Referenced by TraCIServerAPI_Person::processSet().
|
inlineinherited |
returns the final arrival pos
Definition at line 515 of file MSTransportable.h.
References MSTransportable::myPlan.
Referenced by TraCIServerAPI_Person::processSet().
|
inlineinherited |
Return the current stage.
Definition at line 459 of file MSTransportable.h.
References MSTransportable::myStep.
Referenced by GUIPerson::drawAction_drawWalkingareaPath(), GUIPerson::drawGLAdditional(), and MSEdge::transportable_by_position_sorter::operator()().
|
inlineinherited |
Returns the current stage description as a string.
Definition at line 454 of file MSTransportable.h.
Referenced by GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
the current stage type of the transportable
Definition at line 442 of file MSTransportable.h.
Referenced by MSPModel_Striping::add(), GUIContainer::drawGL(), GUIPerson::drawGL(), GUIPerson::drawGLAdditional(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), getNextEdgePtr(), and GUIContainer::getPosition().
|
inherited |
Returns the desired departure time.
Definition at line 366 of file MSTransportable.cpp.
References SUMOVehicleParameter::depart, and MSTransportable::myParameter.
Referenced by MSTransportable::getVehicleType(), MSContainer::routeOutput(), routeOutput(), MSContainer::tripInfoOutput(), and tripInfoOutput().
|
inlineinherited |
Returns the current destination.
Definition at line 407 of file MSTransportable.h.
Referenced by GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), MSDevice_Transportable::notifyLeave(), and MSDevice_Transportable::notifyMove().
|
inlineinherited |
Returns the current edge.
Definition at line 417 of file MSTransportable.h.
Referenced by MSPModel_Striping::add(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), GUIContainer::getPosition(), TraCIServerAPI_Person::processGet(), and MSTransportable::removeStage().
|
virtualinherited |
Return the position on the edge.
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 376 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIContainer::getEdgePos(), GUIPerson::getEdgePos(), TraCIServerAPI_Person::processGet(), MSTransportable::removeStage(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
Return the edges of the nth next stage.
Definition at line 464 of file MSTransportable.h.
References MSTransportable::Stage::getEdges(), MSTransportable::getNumRemainingStages(), MSTransportable::getNumStages(), MSTransportable::myPlan, MSTransportable::myStep, MSTransportable::Stage::routeOutput(), and MSTransportable::Stage::tripInfoOutput().
Referenced by TraCIServerAPI_Person::processGet().
|
inlineinherited |
Returns the departure edge.
Definition at line 422 of file MSTransportable.h.
References MSTransportable::Stage::getAngle(), MSTransportable::Stage::getEdgePos(), MSTransportable::Stage::getPosition(), MSTransportable::Stage::getSpeed(), and MSTransportable::getWaitingSeconds().
Referenced by GUIContainer::getParameterWindow(), and GUIPerson::getParameterWindow().
|
inherited |
returns the id of the transportable
Definition at line 361 of file MSTransportable.cpp.
References SUMOVehicleParameter::id, and MSTransportable::myParameter.
Referenced by MSTransportableControl::abortWaiting(), MSVehicle::addContainer(), MSVehicle::addPerson(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSTransportableControl::erase(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), TraCIServerAPI_Person::getSingularType(), MSPedestrianPushButton::isActiveForEdge(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), MSDevice_Transportable::notifyLeave(), MSPModel_Striping::by_xpos_sorter::operator()(), MSEdge::transportable_by_position_sorter::operator()(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPModel_Striping::PState::PState(), MSContainer::MSContainerStage_Driving::routeOutput(), MSContainer::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), routeOutput(), MSContainer::tripInfoOutput(), tripInfoOutput(), MSPModel_Striping::PState::walk(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
Returns the destination after the current destination.
Definition at line 412 of file MSTransportable.h.
References MSTransportable::myStep.
const std::string & MSPerson::getNextEdge | ( | ) | const |
return the list of internal edges if this person is walking and the pedestrian model allows it
Definition at line 329 of file MSPerson.cpp.
References StringUtils::emptyString, Named::getID(), and getNextEdgePtr().
const MSEdge * MSPerson::getNextEdgePtr | ( | ) | const |
returns the next edge ptr if this person is walking and the pedestrian model allows it
Definition at line 348 of file MSPerson.cpp.
References MSTransportable::getCurrentStageType(), PedestrianState::getNextEdge(), MSPerson::MSPersonStage_Walking::getPedestrianState(), and MSTransportable::MOVING_WITHOUT_VEHICLE.
Referenced by getNextEdge(), and MSPedestrianPushButton::isActiveForEdge().
|
inherited |
Return the number of remaining stages (including the current)
Definition at line 402 of file MSTransportable.cpp.
References MSTransportable::myPlan, and MSTransportable::myStep.
Referenced by MSTransportable::getEdges(), TraCIServerAPI_Person::processGet(), and TraCIServerAPI_Person::processSet().
|
inherited |
Return the total number stages in this persons plan.
Definition at line 407 of file MSTransportable.cpp.
References MSTransportable::myPlan.
Referenced by MSTransportable::getEdges(), and TraCIServerAPI_Person::processGet().
|
inlineinherited |
Definition at line 392 of file MSTransportable.h.
References MSTransportable::myParameter.
Referenced by MSTransportableControl::add(), GUIPerson::getParameterWindow(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Person::processSet(), GUIContainer::setFunctionalColor(), and GUIPerson::setFunctionalColor().
|
virtualinherited |
Return the Network coordinate of the transportable.
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 381 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by TraCIServerAPI_Person::getPosition(), GUIContainer::getPosition(), GUIPerson::getPosition(), TraCIServerAPI_Person::processGet(), and MSFCDExport::writeTransportable().
|
virtualinherited |
the current speed of the transportable
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 396 of file MSTransportable.cpp.
Referenced by GUIContainer::getSpeed(), GUIPerson::getSpeed(), TraCIServerAPI_Person::processGet(), and MSFCDExport::writeTransportable().
|
inlineinherited |
the stage type for the nth next stage
Definition at line 447 of file MSTransportable.h.
References MSTransportable::Stage::getStageType(), MSTransportable::myPlan, and MSTransportable::myStep.
Referenced by TraCIServerAPI_Person::processGet().
|
inlineinherited |
The vehicle associated with this transportable.
Definition at line 501 of file MSTransportable.h.
References MSTransportable::appendStage(), MSTransportable::removeStage(), and MSTransportable::Stage::setSpeed().
Referenced by TraCIServerAPI_Person::processGet().
|
inlineinherited |
Definition at line 396 of file MSTransportable.h.
References MSTransportable::getDesiredDepart(), MSTransportable::myVType, and MSTransportable::Stage::setDeparted().
Referenced by MSStoppingPlace::addTransportable(), GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), GUIContainer::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsTriangle(), GUIPerson::getCenteringBoundary(), MSPModel_Striping::PState::getImpatience(), MSPModel_Striping::PState::getLength(), MSPModel_Striping::PState::getMinGap(), MSPModel_Striping::getNextLaneObstacles(), TraCIServerAPI_Person::getSingularType(), MSPModel_Striping::PState::otherStripe(), TraCIServerAPI_Person::processGet(), TraCIServerAPI_Person::processSet(), MSStoppingPlace::removeTransportable(), GUIContainer::setFunctionalColor(), and GUIPerson::setFunctionalColor().
|
virtualinherited |
the time this transportable spent waiting in seconds
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 391 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and STEPS2TIME.
Referenced by MSTransportable::getFromEdge(), GUIContainer::getWaitingSeconds(), GUIPerson::getWaitingSeconds(), MSPedestrianPushButton::isActiveForEdge(), and TraCIServerAPI_Person::processGet().
|
inlineinherited |
Whether the transportable waits for a vehicle.
Definition at line 496 of file MSTransportable.h.
Referenced by GUIContainer::drawGL(), GUIPerson::drawGL(), GUIContainer::getColorValue(), and GUIPerson::getColorValue().
|
inlineinherited |
Whether the transportable waits for a vehicle of the line specified.
Definition at line 491 of file MSTransportable.h.
Implements MSTransportable.
Definition at line 304 of file MSPerson.cpp.
References MSTransportable::Stage::getEdge(), MSTransportable::myPlan, MSTransportable::myStep, MSEdge::removePerson(), and MSTransportable::Stage::setArrived().
Referenced by MSPerson::MSPersonStage_Walking::moveToNextEdge().
|
inherited |
removes the nth next stage
Definition at line 421 of file MSTransportable.cpp.
References MSTransportable::appendStage(), MSTransportable::getEdge(), MSTransportable::getEdgePos(), MSNet::getInstance(), MSTransportable::myPlan, MSTransportable::myStep, and MSTransportable::proceed().
Referenced by MSTransportable::getVehicle(), and TraCIServerAPI_Person::processSet().
|
inherited |
replace myVType
Definition at line 450 of file MSTransportable.cpp.
References MSTransportable::myVType.
Referenced by MSTransportable::getArrivalEdge(), TraCIServerAPI_Person::getSingularType(), and TraCIServerAPI_Person::processSet().
|
virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable.
Definition at line 370 of file MSPerson.cpp.
References OutputDevice::closeTag(), MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSNet::getInstance(), OutputDevice::lf(), MSTransportable::myPlan, MSTransportable::myStep, OutputDevice::openTag(), SUMO_ATTR_DEPART, SUMO_ATTR_ID, SUMO_TAG_PERSON, time2string(), and OutputDevice::writeAttr().
|
inherited |
logs depart time of the current stage
Definition at line 371 of file MSTransportable.cpp.
|
inherited |
sets the walking speed (ignored in other stages)
Definition at line 442 of file MSTransportable.cpp.
References MSTransportable::myPlan.
Referenced by TraCIServerAPI_Person::processSet().
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable.
Definition at line 360 of file MSPerson.cpp.
References OutputDevice::closeTag(), MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSTransportable::myPlan, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
protectedinherited |
the plan of the transportable
Definition at line 532 of file MSTransportable.h.
Referenced by MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSTransportable::getParameter(), and MSTransportable::~MSTransportable().
|
protectedinherited |
the plan of the transportable
Definition at line 542 of file MSTransportable.h.
Referenced by MSTransportable::appendStage(), MSTransportable::getArrivalEdge(), MSTransportable::getArrivalPos(), MSTransportable::getEdges(), MSTransportable::getNumRemainingStages(), MSTransportable::getNumStages(), MSTransportable::getStageType(), MSTransportable::MSTransportable(), MSContainer::proceed(), proceed(), MSTransportable::removeStage(), MSContainer::routeOutput(), routeOutput(), MSTransportable::setSpeed(), MSContainer::tripInfoOutput(), tripInfoOutput(), and MSTransportable::~MSTransportable().
|
protectedinherited |
the iterator over the route
Definition at line 545 of file MSTransportable.h.
Referenced by MSTransportable::appendStage(), MSTransportable::getCurrentStage(), MSTransportable::getEdges(), MSTransportable::getNextDestination(), MSTransportable::getNumRemainingStages(), MSTransportable::getStageType(), MSTransportable::MSTransportable(), MSContainer::proceed(), proceed(), MSTransportable::removeStage(), MSContainer::routeOutput(), and routeOutput().
|
protectedinherited |
This transportable's type. (mainly used for drawing related information Note sure if it is really necessary.
Definition at line 536 of file MSTransportable.h.
Referenced by GUIPerson::getTypeParameterWindow(), MSTransportable::getVehicleType(), and MSTransportable::replaceVehicleType().
|
protectedinherited |
Whether events shall be written.
Definition at line 539 of file MSTransportable.h.
|
staticprotectedinherited |
the offset for computing positions when standing at an edge
Definition at line 529 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Waiting::getPosition(), and MSTransportable::Stage_Driving::getPosition().