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 { DRIVING = 0, WAITING = 1, MOVING_WITHOUT_VEHICLE = 2, WAITING_FOR_DEPART = 3 } |
Public Member Functions | |
virtual SUMOReal | getAngle () const |
return the current angle of the transportable 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 SUMOReal | getEdgePos () const |
Return the position on the edge. 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... | |
const SUMOVehicleParameter & | getParameter () const |
virtual Position | getPosition () const |
Return the Network coordinate of the transportable. More... | |
virtual SUMOReal | getSpeed () const |
the current speed of the transportable More... | |
SUMOVehicle * | getVehicle () const |
The vehicle associated with this transportable. More... | |
const MSVehicleType & | getVehicleType () const |
virtual SUMOReal | 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) |
virtual void | routeOutput (OutputDevice &os) const |
Called on writing vehroute output. More... | |
void | setDeparted (SUMOTime now) |
logs depart time of the current stage 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 SUMOReal | 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 359 of file MSTransportable.h.
|
inherited |
Enumerator | |
---|---|
DRIVING | |
WAITING | |
MOVING_WITHOUT_VEHICLE | |
WAITING_FOR_DEPART |
Definition at line 60 of file MSTransportable.h.
MSPerson::MSPerson | ( | const SUMOVehicleParameter * | pars, |
const MSVehicleType * | vtype, | ||
MSTransportable::MSTransportablePlan * | plan | ||
) |
constructor
Definition at line 281 of file MSPerson.cpp.
|
virtual |
destructor
Definition at line 286 of file MSPerson.cpp.
|
private |
Invalidated copy constructor.
|
virtualinherited |
return the current angle of the transportable
Reimplemented in GUIContainer.
Definition at line 364 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 |
Return the current stage.
Definition at line 434 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 429 of file MSTransportable.h.
Referenced by GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
the current stage type of the transportable
Definition at line 424 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 344 of file MSTransportable.cpp.
References SUMOVehicleParameter::depart, and MSTransportable::myParameter.
Referenced by MSContainer::routeOutput(), routeOutput(), MSContainer::tripInfoOutput(), and tripInfoOutput().
|
inlineinherited |
Returns the current destination.
Definition at line 389 of file MSTransportable.h.
Referenced by GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), MSDevice_Transportable::notifyLeave(), MSDevice_Transportable::notifyMove(), MSContainer::MSContainerStage_Driving::routeOutput(), MSTransportable::Stage_Waiting::routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
inlineinherited |
Returns the current edge.
Definition at line 399 of file MSTransportable.h.
Referenced by MSPModel_Striping::add(), MSTransportable::Stage_Waiting::beginEventOutput(), MSTransportable::Stage_Driving::beginEventOutput(), MSTransportable::Stage_Waiting::endEventOutput(), MSTransportable::Stage_Driving::endEventOutput(), MSTransportable::Stage_Driving::getEdgePos(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), GUIContainer::getPosition(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), and TraCIServerAPI_Person::processGet().
|
virtualinherited |
Return the position on the edge.
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 354 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), and MSNet::getInstance().
Referenced by GUIContainer::getEdgePos(), GUIPerson::getEdgePos(), TraCIServerAPI_Person::processGet(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
Returns the departure edge.
Definition at line 404 of file MSTransportable.h.
Referenced by GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), MSContainer::MSContainerStage_Driving::routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
inherited |
returns the id of the transportable
Definition at line 339 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(), MSPedestrianPushButton::isActiveForEdge(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), 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(), MSTransportable::Stage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSContainer::routeOutput(), routeOutput(), MSContainer::tripInfoOutput(), tripInfoOutput(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().
|
inlineinherited |
Returns the destination after the current destination.
Definition at line 394 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 316 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 335 of file MSPerson.cpp.
References MSTransportable::getCurrentStageType(), PedestrianState::getNextEdge(), MSPerson::MSPersonStage_Walking::getPedestrianState(), and MSTransportable::MOVING_WITHOUT_VEHICLE.
Referenced by getNextEdge(), and MSPedestrianPushButton::isActiveForEdge().
|
inlineinherited |
Definition at line 374 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 359 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 374 of file MSTransportable.cpp.
Referenced by GUIContainer::getSpeed(), GUIPerson::getSpeed(), TraCIServerAPI_Person::processGet(), and MSFCDExport::writeTransportable().
|
inlineinherited |
The vehicle associated with this transportable.
Definition at line 463 of file MSTransportable.h.
|
inlineinherited |
Definition at line 378 of file MSTransportable.h.
References MSTransportable::myVType.
Referenced by MSStoppingPlace::addTransportable(), GUIContainer::drawAction_drawAsImage(), GUIPerson::drawAction_drawAsImage(), GUIContainer::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsPoly(), GUIPerson::drawAction_drawAsTriangle(), GUIPerson::getCenteringBoundary(), MSPModel_Striping::getNextLaneObstacles(), TraCIServerAPI_Person::processGet(), MSStoppingPlace::removeTransportable(), GUIContainer::setFunctionalColor(), and GUIPerson::setFunctionalColor().
|
virtualinherited |
the time this transportable spent waiting in seconds
Reimplemented in GUIPerson, and GUIContainer.
Definition at line 369 of file MSTransportable.cpp.
References MSNet::getCurrentTimeStep(), MSNet::getInstance(), and STEPS2TIME.
Referenced by GUIContainer::getWaitingSeconds(), GUIPerson::getWaitingSeconds(), MSPedestrianPushButton::isActiveForEdge(), and TraCIServerAPI_Person::processGet().
|
inlineinherited |
Whether the transportable waits for a vehicle.
Definition at line 458 of file MSTransportable.h.
Referenced by GUIContainer::drawGL(), GUIPerson::drawGL(), MSTransportable::Stage_Driving::getAngle(), GUIContainer::getColorValue(), GUIPerson::getColorValue(), MSTransportable::Stage_Driving::getEdgePos(), MSTransportable::Stage_Driving::getPosition(), MSTransportable::Stage_Driving::getSpeed(), MSContainer::MSContainerStage_Driving::getStageDescription(), MSPerson::MSPersonStage_Driving::getStageDescription(), and MSTransportable::Stage_Driving::getWaitingTime().
|
inlineinherited |
Whether the transportable waits for a vehicle of the line specified.
Definition at line 453 of file MSTransportable.h.
Implements MSTransportable.
Definition at line 291 of file MSPerson.cpp.
References MSTransportable::Stage::getEdge(), MSTransportable::myPlan, MSTransportable::myStep, MSEdge::removePerson(), and MSTransportable::Stage::setArrived().
Referenced by MSPerson::MSPersonStage_Walking::moveToNextEdge().
|
virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable.
Definition at line 357 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 349 of file MSTransportable.cpp.
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable.
Definition at line 347 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 472 of file MSTransportable.h.
Referenced by MSTransportable::getDesiredDepart(), MSTransportable::getID(), MSTransportable::getParameter(), and MSTransportable::~MSTransportable().
|
protectedinherited |
the plan of the transportable
Definition at line 482 of file MSTransportable.h.
Referenced by MSTransportable::MSTransportable(), MSContainer::proceed(), proceed(), MSContainer::routeOutput(), routeOutput(), MSContainer::tripInfoOutput(), tripInfoOutput(), and MSTransportable::~MSTransportable().
|
protectedinherited |
the iterator over the route
Definition at line 485 of file MSTransportable.h.
Referenced by MSTransportable::getCurrentStage(), MSTransportable::getNextDestination(), MSTransportable::MSTransportable(), MSContainer::proceed(), proceed(), 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 476 of file MSTransportable.h.
Referenced by GUIPerson::getParameterWindow(), and MSTransportable::getVehicleType().
|
protectedinherited |
Whether events shall be written.
Definition at line 479 of file MSTransportable.h.
|
staticprotectedinherited |
the offset for computing positions when standing at an edge
Definition at line 469 of file MSTransportable.h.
Referenced by MSTransportable::Stage_Waiting::getPosition(), and MSTransportable::Stage_Driving::getPosition().