![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSPerson.h>
Data Structures | |
class | arrival_finder |
Public Member Functions | |
void | abort (MSTransportable *) |
abort this stage (TraCI) More... | |
virtual void | beginEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const |
Called for writing the events output. More... | |
Stage * | clone () const |
virtual void | endEventOutput (const MSTransportable &p, SUMOTime t, OutputDevice &os) const |
Called for writing the events output (end of an action) More... | |
double | getAngle (SUMOTime now) const |
returns the angle of the transportable More... | |
double | getArrivalPos () const |
SUMOTime | getDeparted () const |
get departure time of stage More... | |
double | getDepartPos () const |
double | getDepartPosLat () const |
const MSEdge * | getDestination () const |
returns the destination edge More... | |
MSStoppingPlace * | getDestinationStop () const |
returns the destination stop (if any) More... | |
double | getDistance () const |
get travel distance in this stage More... | |
const MSEdge * | getEdge () const |
Returns the current edge. More... | |
double | getEdgeAngle (const MSEdge *e, double at) const |
get angle of the edge at a certain position More... | |
double | getEdgePos (SUMOTime now) const |
Position | getEdgePosition (const MSEdge *e, double at, double offset) const |
get position on edge e at length at with orthogonal offset More... | |
ConstMSEdgeVector | getEdges () const |
the edges of the current stage More... | |
const MSEdge * | getFromEdge () const |
Position | getLanePosition (const MSLane *lane, double at, double offset) const |
get position on lane at length at with orthogonal offset More... | |
double | getMaxSpeed (const MSTransportable *const person) const |
accessors to be used by MSPModel More... | |
const MSEdge * | getNextRouteEdge () const |
virtual const MSStoppingPlace * | getOriginStop () const |
returns the origin stop (if any). only needed for Stage_Trip More... | |
PedestrianState * | getPedestrianState () const |
Position | getPosition (SUMOTime now) const |
returns the position of the transportable More... | |
const ConstMSEdgeVector & | getRoute () const |
const MSEdge * | getRouteEdge () const |
const std::vector< const MSEdge * >::iterator | getRouteStep () const |
double | getSpeed () const |
the speed of the transportable More... | |
std::string | getStageDescription () const |
return (brief) string representation of the current stage More... | |
std::string | getStageSummary () const |
return string summary of the current stage More... | |
StageType | getStageType () const |
virtual SUMOVehicle * | getVehicle () const |
Whether the transportable waits for a vehicle. More... | |
SUMOTime | getWaitingTime (SUMOTime now) const |
the time this transportable spent waiting More... | |
virtual bool | isWaiting4Vehicle () const |
Whether the transportable waits for a vehicle. More... | |
virtual bool | isWaitingFor (const SUMOVehicle *vehicle) const |
Whether the transportable waits for the given vehicle. More... | |
bool | moveToNextEdge (MSPerson *person, SUMOTime currentTime, MSEdge *nextInternal=nullptr) |
move forward and return whether the person arrived More... | |
MSPersonStage_Walking (const std::string &personID, const ConstMSEdgeVector &route, MSStoppingPlace *toStop, SUMOTime walkingTime, double speed, double departPos, double arrivalPos, double departPosLat) | |
constructor More... | |
virtual void | proceed (MSNet *net, MSTransportable *person, SUMOTime now, Stage *previous) |
proceeds to the next step More... | |
virtual void | routeOutput (OutputDevice &os, const bool withRouteLength) const |
Called on writing vehroute output. More... | |
virtual void | setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now) |
logs end of the step More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
void | setDestination (const MSEdge *newDestination, MSStoppingPlace *newDestStop) |
void | setRouteIndex (MSPerson *person, int routeOffset) |
place person on a previously passed edge More... | |
void | setSpeed (double speed) |
sets the walking speed (ignored in other stages) More... | |
virtual void | tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const |
Called on writing tripinfo output. More... | |
~MSPersonStage_Walking () | |
destructor More... | |
Protected Attributes | |
double | myArrivalPos |
the position at which we want to arrive More... | |
SUMOTime | myArrived |
the time at which this stage ended More... | |
SUMOTime | myDeparted |
the time at which this stage started More... | |
const MSEdge * | myDestination |
the next edge to reach by getting transported More... | |
MSStoppingPlace * | myDestinationStop |
the stop to reach by getting transported (if any) More... | |
StageType | myType |
The type of this stage. More... | |
Private Member Functions | |
double | computeAverageSpeed () const |
MSPersonStage_Walking (const MSPersonStage_Walking &) | |
Invalidated copy constructor. More... | |
MSPersonStage_Walking & | operator= (const MSPersonStage_Walking &) |
Invalidated assignment operator. More... | |
double | walkDistance () const |
compute total walking distance More... | |
Private Attributes | |
MSEdge * | myCurrentInternalEdge |
The current internal edge this person is on or 0. More... | |
double | myDepartPos |
double | myDepartPosLat |
SUMOTime | myLastEdgeEntryTime |
the time the person entered the edge More... | |
PedestrianState * | myPedestrianState |
state that is to be manipulated by MSPModel More... | |
ConstMSEdgeVector | myRoute |
The route of the person. More... | |
ConstMSEdgeVector::iterator | myRouteStep |
double | mySpeed |
SUMOTime | myWalkingTime |
the time the person is walking More... | |
A "real" stage performing the walking to an edge The walking does not need any route as it is not simulated. Only the duration is needed
Definition at line 70 of file MSPerson.h.
MSPerson::MSPersonStage_Walking::MSPersonStage_Walking | ( | const std::string & | personID, |
const ConstMSEdgeVector & | route, | ||
MSStoppingPlace * | toStop, | ||
SUMOTime | walkingTime, | ||
double | speed, | ||
double | departPos, | ||
double | arrivalPos, | ||
double | departPosLat | ||
) |
constructor
Definition at line 55 of file MSPerson.cpp.
References computeAverageSpeed(), SUMOVehicleParameter::interpretEdgePos(), myDepartPos, mySpeed, and SUMO_ATTR_DEPARTPOS.
MSPerson::MSPersonStage_Walking::~MSPersonStage_Walking | ( | ) |
|
private |
Invalidated copy constructor.
|
virtual |
abort this stage (TraCI)
Reimplemented from MSTransportable::Stage.
Definition at line 176 of file MSPerson.cpp.
References MSPModel::getModel(), and MSPModel::remove().
|
virtual |
Called for writing the events output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 313 of file MSPerson.cpp.
References OutputDevice::closeTag(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 86 of file MSPerson.cpp.
|
private |
Definition at line 188 of file MSPerson.cpp.
References STEPS2TIME.
Referenced by MSPersonStage_Walking().
|
virtual |
Called for writing the events output (end of an action)
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 320 of file MSPerson.cpp.
References OutputDevice::closeTag(), MSTransportable::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
virtual |
returns the angle of the transportable
Implements MSTransportable::Stage.
Definition at line 119 of file MSPerson.cpp.
|
inline |
Definition at line 160 of file MSPerson.h.
References MSTransportable::Stage::myArrivalPos.
Referenced by MSPModel_Remote::add(), MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::getNextLane(), MSPModel_Striping::moveInDirectionOnLane(), and MSPModel_Striping::PState::PState().
|
inherited |
get departure time of stage
Definition at line 108 of file MSTransportable.cpp.
|
inline |
Definition at line 152 of file MSPerson.h.
References myDepartPos.
Referenced by MSPModel_Remote::add(), and MSPModel_NonInteracting::PState::computeWalkingTime().
|
inline |
Definition at line 156 of file MSPerson.h.
References myDepartPosLat.
|
inherited |
returns the destination edge
Definition at line 57 of file MSTransportable.cpp.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSPerson::proceed(), and MSTransportable::rerouteParkingArea().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 85 of file MSTransportable.h.
References MSTransportable::Stage::myDestinationStop.
Referenced by libsumo::Person::getStage(), MSPModel_Striping::moveInDirectionOnLane(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSRouteHandler::parseWalkPositions(), MSContainer::MSContainerStage_Driving::proceed(), MSContainer::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPerson::proceed(), MSTransportable::rerouteParkingArea(), and MSTransportable::Stage_Trip::setArrived().
|
inlinevirtual |
get travel distance in this stage
Implements MSTransportable::Stage.
Definition at line 101 of file MSPerson.h.
References walkDistance().
|
virtual |
Returns the current edge.
Reimplemented from MSTransportable::Stage.
Definition at line 91 of file MSPerson.cpp.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_NonInteracting::MoveToNextEdge::execute(), MSPModel_NonInteracting::PState::getAngle(), and MSPModel_NonInteracting::PState::getPosition().
|
inherited |
get angle of the edge at a certain position
Definition at line 133 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), and CState::getAngle().
|
virtual |
Reimplemented from MSTransportable::Stage.
Definition at line 107 of file MSPerson.cpp.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 123 of file MSTransportable.cpp.
References MSEdge::getLanes().
|
virtual |
the edges of the current stage
Reimplemented from MSTransportable::Stage.
Definition at line 137 of file MSPerson.cpp.
Referenced by libsumo::Person::moveToXY().
|
virtual |
Reimplemented from MSTransportable::Stage.
Definition at line 101 of file MSPerson.cpp.
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 128 of file MSTransportable.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by CState::computeTranshipTime(), MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().
double MSPerson::MSPersonStage_Walking::getMaxSpeed | ( | const MSTransportable *const | person | ) | const |
accessors to be used by MSPModel
Definition at line 378 of file MSPerson.cpp.
References MSVehicleType::getMaxSpeed(), MSTransportable::getSpeedFactor(), and MSTransportable::getVehicleType().
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Striping::getNextLane(), MSPModel_NonInteracting::PState::getSpeed(), MSPModel_Striping::moveInDirectionOnLane(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 171 of file MSPerson.h.
References myRoute, and myRouteStep.
Referenced by MSPModel_NonInteracting::PState::computeWalkingTime(), MSPModel_Remote::execute(), MSPModel_NonInteracting::PState::getNextEdge(), and MSPModel_Striping::getNextLane().
|
inlinevirtualinherited |
returns the origin stop (if any). only needed for Stage_Trip
Reimplemented in MSTransportable::Stage_Trip.
Definition at line 90 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Driving::proceed().
|
inline |
Definition at line 178 of file MSPerson.h.
References myPedestrianState.
Referenced by GUIPerson::drawAction_drawWalkingareaPath(), MSPModel_NonInteracting::MoveToNextEdge::execute(), MSPerson::getNextEdgePtr(), and MSPerson::Influencer::postProcessRemoteControl().
returns the position of the transportable
Implements MSTransportable::Stage.
Definition at line 113 of file MSPerson.cpp.
|
inline |
Definition at line 174 of file MSPerson.h.
References myRoute.
Referenced by MSPModel_Remote::add(), GUIPerson::drawGLAdditional(), MSPModel_Striping::getNextLane(), libsumo::Person::moveToXY(), and MSPModel_Striping::PState::PState().
|
inline |
Definition at line 168 of file MSPerson.h.
References myRouteStep.
|
inline |
Definition at line 164 of file MSPerson.h.
References myRouteStep.
Referenced by libsumo::Person::moveToXY().
|
virtual |
the speed of the transportable
Reimplemented from MSTransportable::Stage.
Definition at line 131 of file MSPerson.cpp.
|
inlinevirtual |
return (brief) string representation of the current stage
Implements MSTransportable::Stage.
Definition at line 112 of file MSPerson.h.
|
virtual |
return string summary of the current stage
Implements MSTransportable::Stage.
Definition at line 383 of file MSPerson.cpp.
References MSTransportable::getDestination(), and Named::getID().
|
inlineinherited |
Definition at line 110 of file MSTransportable.h.
References MSTransportable::Stage::myType.
Referenced by libsumo::Person::getStage(), MSPerson::MSPersonStage_Driving::proceed(), MSPerson::proceed(), and MSTransportable::rerouteParkingArea().
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 147 of file MSTransportable.h.
Referenced by libsumo::Person::getStage().
the time this transportable spent waiting
Reimplemented from MSTransportable::Stage.
Definition at line 125 of file MSPerson.cpp.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 142 of file MSTransportable.h.
|
virtualinherited |
Whether the transportable waits for the given vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 118 of file MSTransportable.cpp.
bool MSPerson::MSPersonStage_Walking::moveToNextEdge | ( | MSPerson * | person, |
SUMOTime | currentTime, | ||
MSEdge * | nextInternal = nullptr |
||
) |
move forward and return whether the person arrived
Definition at line 327 of file MSPerson.cpp.
References MSTransportableControl::erase(), MSTransportable::getArrivalPos(), MSTransportable::getEdge(), MSNet::getInstance(), MSLane::getLength(), MSLane::getMoveReminders(), MSNet::getPersonControl(), MSMoveReminder::NOTIFICATION_ARRIVED, MSMoveReminder::NOTIFICATION_JUNCTION, and MSPerson::proceed().
Referenced by MSPModel_Striping::arriveAndAdvance(), MSPModel_Remote::execute(), and MSPModel_NonInteracting::MoveToNextEdge::execute().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 143 of file MSPerson.cpp.
References MSPModel::add(), MSEdge::addPerson(), MSTransportableControl::erase(), MSTransportable::Stage::getEdge(), MSTransportable::getEdge(), MSTransportable::Stage::getEdgePos(), MSNet::getInstance(), MSPModel::getModel(), MSLane::getMoveReminders(), MSNet::getPersonControl(), MSMoveReminder::NOTIFICATION_DEPARTED, and MSTransportable::proceed().
|
virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
[in] | withRouteLength | whether route length shall be written |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 291 of file MSPerson.cpp.
References OutputDevice::closeTag(), StringUtils::escapeXML(), OutputDevice::openTag(), SUMO_ATTR_BUS_STOP, SUMO_ATTR_DURATION, SUMO_ATTR_EDGES, SUMO_ATTR_SPEED, time2string(), and OutputDevice::writeAttr().
|
virtualinherited |
logs end of the step
Reimplemented in MSTransportable::Stage_Driving, and MSTransportable::Stage_Trip.
Definition at line 113 of file MSTransportable.cpp.
Referenced by MSContainer::proceed(), MSPerson::proceed(), MSTransportable::Stage_Trip::setArrived(), and MSTransportable::Stage_Driving::setArrived().
|
inherited |
logs end of the step
Definition at line 101 of file MSTransportable.cpp.
|
inherited |
Definition at line 139 of file MSTransportable.cpp.
References MSStoppingPlace::getBeginLanePosition(), and MSStoppingPlace::getEndLanePosition().
Referenced by MSTransportable::rerouteParkingArea().
void MSPerson::MSPersonStage_Walking::setRouteIndex | ( | MSPerson * | person, |
int | routeOffset | ||
) |
place person on a previously passed edge
Definition at line 369 of file MSPerson.cpp.
References MSTransportable::getEdge().
|
virtual |
sets the walking speed (ignored in other stages)
Reimplemented from MSTransportable::Stage.
Definition at line 182 of file MSPerson.cpp.
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 270 of file MSPerson.cpp.
References MSDevice_Tripinfo::addPedestrianData(), OutputDevice::closeTag(), MSNet::getInstance(), MSTransportable::getMaxSpeed(), OutputDevice::openTag(), TIME2STEPS, time2string(), and OutputDevice::writeAttr().
|
private |
compute total walking distance
Definition at line 194 of file MSPerson.cpp.
References MSPModel::BACKWARD, MSPModel::canTraverse(), Position::distanceTo2D(), MSPModel::FORWARD, MSEdge::getFromJunction(), MSPModel::getModel(), MSLane::getShape(), MSEdge::getToJunction(), MAX2(), POSITION_EPS, MSPModel::UNDEFINED_DIRECTION, and MSPModel::usingInternalLanes().
Referenced by getDistance().
|
protectedinherited |
the position at which we want to arrive
Definition at line 209 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getArrivalPos(), getArrivalPos(), and MSContainer::MSContainerStage_Tranship::getArrivalPos().
|
protectedinherited |
the time at which this stage ended
Definition at line 215 of file MSTransportable.h.
|
private |
The current internal edge this person is on or 0.
Definition at line 208 of file MSPerson.h.
|
protectedinherited |
the time at which this stage started
Definition at line 212 of file MSTransportable.h.
|
private |
Definition at line 210 of file MSPerson.h.
Referenced by getDepartPos(), and MSPersonStage_Walking().
|
private |
Definition at line 211 of file MSPerson.h.
Referenced by getDepartPosLat().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 203 of file MSTransportable.h.
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 206 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), and MSPerson::MSPersonStage_Access::MSPersonStage_Access().
|
private |
the time the person entered the edge
Definition at line 199 of file MSPerson.h.
|
private |
state that is to be manipulated by MSPModel
Definition at line 215 of file MSPerson.h.
Referenced by getPedestrianState().
|
private |
The route of the person.
Definition at line 202 of file MSPerson.h.
Referenced by getNextRouteEdge(), and getRoute().
|
private |
Definition at line 205 of file MSPerson.h.
Referenced by getNextRouteEdge(), getRouteEdge(), and getRouteStep().
|
private |
Definition at line 212 of file MSPerson.h.
Referenced by MSPersonStage_Walking().
|
protectedinherited |
The type of this stage.
Definition at line 218 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType().
|
private |
the time the person is walking
Definition at line 196 of file MSPerson.h.