![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <MSStage.h>
Public Member Functions | |
void | abort (MSTransportable *) |
abort this stage (TraCI) More... | |
MSStage * | clone () const |
double | getAngle (SUMOTime now) const |
returns the angle of the transportable More... | |
virtual double | getArrivalPos () const |
SUMOTime | getArrived () const |
get arrival time of stage More... | |
SUMOTime | getDeparted () const |
get departure time of stage More... | |
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... | |
virtual 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... | |
virtual 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... | |
virtual ConstMSEdgeVector | getEdges () const |
the edges of the current stage More... | |
virtual const MSEdge * | getFromEdge () const |
const std::string & | getGroup () const |
return the id of the group of transportables traveling together More... | |
virtual const MSLane * | getLane () const |
Returns the current lane (if applicable) More... | |
Position | getLanePosition (const MSLane *lane, double at, double offset) const |
get position on lane at length at with orthogonal offset More... | |
virtual MSStoppingPlace * | getOriginStop () const |
returns the origin stop (if any). only needed for MSStageTrip More... | |
Position | getPosition (SUMOTime now) const |
returns the position of the transportable More... | |
virtual double | getSpeed () const |
the speed of the transportable More... | |
std::string | getStageDescription (const bool isPerson) const |
return (brief) string representation of the current stage More... | |
std::string | getStageSummary (const bool isPerson) const |
return string summary of the current stage More... | |
MSStageType | getStageType () const |
SUMOTime | getUntil () 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... | |
virtual void | loadState (MSTransportable *transportable, std::istringstream &state) |
Reconstructs the current state, standard implementation does nothing. More... | |
MSStageWaiting (const MSEdge *destination, MSStoppingPlace *toStop, SUMOTime duration, SUMOTime until, double pos, const std::string &actType, const bool initial) | |
constructor More... | |
void | proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, MSStage *previous) |
proceeds to the next step More... | |
void | routeOutput (const bool isPerson, OutputDevice &os, const bool withRouteLength, const MSStage *const previous) const |
Called on writing vehroute output. More... | |
virtual void | saveState (std::ostringstream &out) |
Saves the current state into the given stream, standard implementation does nothing. More... | |
void | setArrivalPos (double arrivalPos) |
virtual const std::string | setArrived (MSNet *net, MSTransportable *transportable, SUMOTime now, const bool vehicleArrived) |
logs end of the step More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
void | setDestination (const MSEdge *newDestination, MSStoppingPlace *newDestStop) |
virtual void | setSpeed (double) |
sets the walking speed (ignored in other stages) More... | |
void | tripInfoOutput (OutputDevice &os, const MSTransportable *const transportable) const |
Called on writing tripinfo output. More... | |
virtual | ~MSStageWaiting () |
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... | |
const std::string | myGroup |
The id of the group of transportables traveling together. More... | |
MSStageType | myType |
The type of this stage. More... | |
Static Protected Attributes | |
static const double | ROADSIDE_OFFSET |
the offset for computing positions when standing at an edge More... | |
Private Member Functions | |
MSStageWaiting (const MSStageWaiting &) | |
Invalidated copy constructor. More... | |
MSStageWaiting & | operator= (const MSStageWaiting &)=delete |
Invalidated assignment operator. More... | |
Private Attributes | |
std::string | myActType |
The type of activity. More... | |
SUMOTime | myWaitingDuration |
the time the person is waiting More... | |
SUMOTime | myWaitingUntil |
the time until the person is waiting More... | |
A "real" stage performing a waiting over the specified time
MSStageWaiting::MSStageWaiting | ( | const MSEdge * | destination, |
MSStoppingPlace * | toStop, | ||
SUMOTime | duration, | ||
SUMOTime | until, | ||
double | pos, | ||
const std::string & | actType, | ||
const bool | initial | ||
) |
constructor
Definition at line 407 of file MSStage.cpp.
References WAITING, and WAITING_FOR_DEPART.
Referenced by clone().
|
virtual |
destructor
Definition at line 419 of file MSStage.cpp.
|
private |
Invalidated copy constructor.
|
virtual |
abort this stage (TraCI)
Reimplemented from MSStage.
Definition at line 508 of file MSStage.cpp.
References MSTransportableControl::abortWaiting(), MSNet::getContainerControl(), MSNet::getInstance(), MSNet::getPersonControl(), and MSTransportable::isPerson().
|
virtual |
Implements MSStage.
Definition at line 422 of file MSStage.cpp.
References MSStageWaiting(), myActType, MSStage::myArrivalPos, MSStage::myDestination, MSStage::myDestinationStop, MSStage::myType, myWaitingDuration, myWaitingUntil, and WAITING_FOR_DEPART.
|
virtual |
returns the angle of the transportable
Implements MSStage.
Definition at line 440 of file MSStage.cpp.
References MSStage::getEdgeAngle(), MSGlobals::gLefthand, M_PI, MSStage::myArrivalPos, and MSStage::myDestination.
|
inlinevirtualinherited |
Reimplemented in MSStageTranship, MSStageDriving, and MSPerson::MSPersonStage_Walking.
Definition at line 89 of file MSStage.h.
References MSStage::myArrivalPos.
Referenced by MSPModel_NonInteracting::PState::computeDuration(), MSPModel_NonInteracting::CState::computeDuration(), MSPModel_Striping::getNextLane(), LIBSUMO_NAMESPACE::Person::getStage(), GUIPerson::getStageArrivalPos(), MSPModel_Striping::moveInDirectionOnLane(), LIBSUMO_NAMESPACE::Person::moveToXY(), MSRouteHandler::parseWalkPositions(), MSPModel_Striping::PState::PState(), MSTransportable::rerouteParkingArea(), LIBSUMO_NAMESPACE::Person::rerouteTraveltime(), routeOutput(), and MSStageTrip::setArrived().
|
inherited |
get arrival time of stage
Definition at line 126 of file MSStage.cpp.
References MSStage::myArrived.
Referenced by LIBSUMO_NAMESPACE::Person::getStage().
|
inherited |
get departure time of stage
Definition at line 121 of file MSStage.cpp.
References MSStage::myDeparted.
Referenced by LIBSUMO_NAMESPACE::Person::getStage().
|
inherited |
returns the destination edge
Definition at line 70 of file MSStage.cpp.
References MSStage::myDestination.
Referenced by MSPerson::checkAccess(), MSStageDriving::getArrivalPos(), MSStage::getEdges(), MSStageDriving::getEdges(), MSStageTrip::getStageSummary(), getStageSummary(), MSStageDriving::getStageSummary(), MSStageTranship::getStageSummary(), MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSStageDriving::proceed(), MSTransportable::proceed(), MSTransportable::rerouteParkingArea(), routeOutput(), MSStageDriving::routeOutput(), and MSStageTrip::setArrived().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 80 of file MSStage.h.
References MSStage::myDestinationStop.
Referenced by MSPerson::checkAccess(), LIBSUMO_NAMESPACE::Person::getStage(), MSStageDriving::getStageSummary(), MSStageTranship::getStageSummary(), MSPModel_Striping::moveInDirectionOnLane(), GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSRouteHandler::parseWalkPositions(), MSStageDriving::proceed(), MSTransportable::proceed(), MSTransportable::rerouteParkingArea(), and MSStageTrip::setArrived().
|
inlinevirtual |
|
virtualinherited |
Returns the current edge.
Reimplemented in MSStageDriving, MSStageMoving, and MSStageTrip.
Definition at line 76 of file MSStage.cpp.
References MSStage::myDestination.
Referenced by GUIPerson::GUIPersonPopupMenu::onCmdRemoveObject(), MSPerson::MSPersonStage_Walking::proceed(), proceed(), MSStageDriving::proceed(), MSTransportable::proceed(), and MSStageDriving::routeOutput().
|
inherited |
get angle of the edge at a certain position
Definition at line 153 of file MSStage.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), MSPModel_NonInteracting::CState::getAngle(), MSStageTrip::getAngle(), getAngle(), and MSStageDriving::getAngle().
|
virtualinherited |
Reimplemented in MSStageDriving, MSStageMoving, and MSStageTrip.
Definition at line 88 of file MSStage.cpp.
References MSStage::myArrivalPos.
Referenced by MSEdge::transportable_by_position_sorter::operator()(), MSPerson::MSPersonStage_Walking::proceed(), MSStageDriving::proceed(), and MSStageTranship::proceed().
get position on edge e at length at with orthogonal offset
Definition at line 142 of file MSStage.cpp.
References MSStage::getLanePosition(), and MSEdge::getLanes().
Referenced by MSStageTrip::getPosition(), getPosition(), and MSStageDriving::getPosition().
|
virtualinherited |
the edges of the current stage
Reimplemented in MSStageDriving, and MSStageMoving.
Definition at line 106 of file MSStage.cpp.
References MSStage::getDestination().
Referenced by LIBSUMO_NAMESPACE::Person::getStage(), LIBSUMO_NAMESPACE::Person::rerouteTraveltime(), and MSStageTrip::setArrived().
|
virtualinherited |
Reimplemented in MSStageDriving, and MSStageMoving.
Definition at line 82 of file MSStage.cpp.
References MSStage::myDestination.
Referenced by MSTransportable::rerouteParkingArea().
|
inlineinherited |
return the id of the group of transportables traveling together
Definition at line 119 of file MSStage.h.
References MSStage::myGroup.
|
inlinevirtualinherited |
Returns the current lane (if applicable)
Reimplemented in MSStageMoving.
get position on lane at length at with orthogonal offset
Definition at line 147 of file MSStage.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by MSPModel_NonInteracting::CState::computeDuration(), MSStage::getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().
|
inlinevirtualinherited |
returns the origin stop (if any). only needed for MSStageTrip
Reimplemented in MSStageDriving, and MSStageTrip.
Definition at line 85 of file MSStage.h.
Referenced by MSStageDriving::proceed().
returns the position of the transportable
Implements MSStage.
Definition at line 433 of file MSStage.cpp.
References MSStage::getEdgePosition(), MSGlobals::gLefthand, MSStage::myArrivalPos, MSStage::myDestination, and MSStage::ROADSIDE_OFFSET.
|
virtualinherited |
the speed of the transportable
Reimplemented in MSStageDriving, and MSStageMoving.
Definition at line 100 of file MSStage.cpp.
|
inlinevirtual |
return (brief) string representation of the current stage
Implements MSStage.
Definition at line 401 of file MSStage.h.
References myActType, and UNUSED_PARAMETER.
|
virtual |
return string summary of the current stage
Implements MSStage.
Definition at line 517 of file MSStage.cpp.
References MSStage::getDestination(), Named::getID(), myActType, myWaitingDuration, myWaitingUntil, and time2string().
|
inlineinherited |
Definition at line 114 of file MSStage.h.
References MSStage::myType.
Referenced by MSPerson::checkAccess(), LIBSUMO_NAMESPACE::Person::getStage(), MSStageDriving::proceed(), MSTransportable::proceed(), MSTransportable::rerouteParkingArea(), and MSStageDriving::routeOutput().
SUMOTime MSStageWaiting::getUntil | ( | ) | const |
Definition at line 427 of file MSStage.cpp.
References myWaitingUntil.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSStageDriving.
the time this transportable spent waiting
Reimplemented from MSStage.
Definition at line 502 of file MSStage.cpp.
References MSStage::myDeparted.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSStageDriving.
|
virtualinherited |
Whether the transportable waits for the given vehicle.
Reimplemented in MSStageDriving.
Definition at line 137 of file MSStage.cpp.
|
inlinevirtualinherited |
Reconstructs the current state, standard implementation does nothing.
Reimplemented in MSStageDriving, and MSPerson::MSPersonStage_Walking.
Definition at line 211 of file MSStage.h.
References UNUSED_PARAMETER.
|
privatedelete |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSStage.
Definition at line 446 of file MSStage.cpp.
References MSEdge::addContainer(), MSEdge::addPerson(), MSStoppingPlace::addTransportable(), MSNet::getContainerControl(), MSStage::getEdge(), MSNet::getPersonControl(), MAX3(), MSStage::myDeparted, MSStage::myDestinationStop, myWaitingDuration, myWaitingUntil, and MSTransportableControl::setWaitEnd().
|
virtual |
Called on writing vehroute output.
[in] | isPerson | Whether we are writing person or container info |
[in] | os | The stream to write the information into |
[in] | withRouteLength | whether route length shall be written |
[in] | previous | The previous stage for additional info such as from edge |
IOError | not yet implemented |
Implements MSStage.
Definition at line 476 of file MSStage.cpp.
References OutputDevice::closeTag(), StringUtils::escapeXML(), MSStage::getArrivalPos(), MSStage::getDestination(), Named::getID(), MSStoppingPlace::getMyName(), MSStage::myDestinationStop, MSStage::myType, myWaitingDuration, myWaitingUntil, OutputDevice::openTag(), SUMO_ATTR_BUS_STOP, SUMO_ATTR_DURATION, SUMO_ATTR_ENDPOS, SUMO_ATTR_LANE, SUMO_ATTR_UNTIL, time2string(), WAITING_FOR_DEPART, and OutputDevice::writeAttr().
|
inlinevirtualinherited |
Saves the current state into the given stream, standard implementation does nothing.
Reimplemented in MSStageDriving, and MSPerson::MSPersonStage_Walking.
Definition at line 205 of file MSStage.h.
References UNUSED_PARAMETER.
|
inlineinherited |
Definition at line 93 of file MSStage.h.
References MSStage::myArrivalPos.
Referenced by MSStageTrip::setArrived().
|
virtualinherited |
logs end of the step
Reimplemented in MSStageDriving, and MSStageTrip.
Definition at line 131 of file MSStage.cpp.
References MSStage::myArrived.
Referenced by MSTransportable::proceed(), MSStageTrip::setArrived(), and MSStageDriving::setArrived().
|
inherited |
|
inherited |
Definition at line 159 of file MSStage.cpp.
References MSStoppingPlace::getBeginLanePosition(), MSStoppingPlace::getEndLanePosition(), MSStage::myArrivalPos, MSStage::myDestination, and MSStage::myDestinationStop.
Referenced by MSTransportable::rerouteParkingArea().
|
inlinevirtualinherited |
sets the walking speed (ignored in other stages)
Reimplemented in MSPerson::MSPersonStage_Walking.
|
virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSStage.
Definition at line 463 of file MSStage.cpp.
References OutputDevice::closeTag(), myActType, MSStage::myArrivalPos, MSStage::myArrived, MSStage::myDeparted, MSStage::myType, OutputDevice::openTag(), time2string(), toString(), WAITING_FOR_DEPART, and OutputDevice::writeAttr().
|
private |
The type of activity.
Definition at line 435 of file MSStage.h.
Referenced by clone(), getStageDescription(), getStageSummary(), and tripInfoOutput().
|
protectedinherited |
the position at which we want to arrive
Definition at line 224 of file MSStage.h.
Referenced by MSStageTrip::clone(), clone(), MSStageDriving::clone(), MSStageTranship::clone(), getAngle(), MSStageDriving::getAngle(), MSPerson::MSPersonStage_Walking::getArrivalPos(), MSStage::getArrivalPos(), MSStageDriving::getArrivalPos(), MSStageTranship::getArrivalPos(), MSStage::getEdgePos(), MSStageDriving::getEdgePos(), getPosition(), MSStageDriving::getPosition(), MSPerson::MSPersonStage_Walking::MSPersonStage_Walking(), MSStageTranship::MSStageTranship(), MSStageDriving::routeOutput(), MSStage::setArrivalPos(), MSStageTrip::setArrived(), MSStageDriving::setArrived(), MSStage::setDestination(), tripInfoOutput(), MSStageTranship::tripInfoOutput(), and MSStageDriving::unspecifiedArrivalPos().
|
protectedinherited |
the time at which this stage ended
Definition at line 230 of file MSStage.h.
Referenced by MSStageDriving::getAngle(), MSStage::getArrived(), MSStageTranship::getDistance(), MSStageDriving::getEdge(), MSStageDriving::getEdgePos(), MSStageDriving::getPosition(), MSStageDriving::isWaiting4Vehicle(), MSStageDriving::loadState(), MSStageTranship::routeOutput(), MSStageDriving::saveState(), MSStage::setArrived(), tripInfoOutput(), MSStageDriving::tripInfoOutput(), and MSStageTranship::tripInfoOutput().
|
protectedinherited |
the time at which this stage started
Definition at line 227 of file MSStage.h.
Referenced by MSStage::getDeparted(), MSStageTranship::getDistance(), getWaitingTime(), MSStageDriving::loadState(), proceed(), MSStageTranship::proceed(), MSStageTranship::routeOutput(), MSStageDriving::saveState(), MSStage::setDeparted(), tripInfoOutput(), MSStageDriving::tripInfoOutput(), and MSStageTranship::tripInfoOutput().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 218 of file MSStage.h.
Referenced by MSStageDriving::abort(), MSStageTrip::clone(), clone(), MSStageDriving::clone(), getAngle(), MSStageDriving::getAngle(), MSStage::getDestination(), MSStage::getEdge(), MSStageDriving::getEdge(), MSStage::getFromEdge(), getPosition(), MSStageDriving::getPosition(), MSStageDriving::isWaitingFor(), MSStageTrip::setArrived(), and MSStage::setDestination().
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 221 of file MSStage.h.
Referenced by MSStageDriving::abort(), MSStageTrip::clone(), clone(), MSStageDriving::clone(), MSStageTranship::clone(), MSStage::getDestinationStop(), MSStageDriving::getWaitingDescription(), MSStageDriving::isWaitingFor(), MSStageTranship::moveToNextEdge(), MSPerson::MSPersonStage_Access::MSPersonStage_Access(), proceed(), routeOutput(), MSStageDriving::routeOutput(), MSStageTrip::setArrived(), and MSStage::setDestination().
|
protectedinherited |
The id of the group of transportables traveling together.
Definition at line 236 of file MSStage.h.
Referenced by MSStageDriving::clone(), MSStage::getGroup(), and MSStageDriving::proceed().
|
protectedinherited |
The type of this stage.
Definition at line 233 of file MSStage.h.
Referenced by clone(), MSStage::getStageType(), routeOutput(), and tripInfoOutput().
|
private |
the time the person is waiting
Definition at line 429 of file MSStage.h.
Referenced by clone(), getStageSummary(), proceed(), and routeOutput().
|
private |
the time until the person is waiting
Definition at line 432 of file MSStage.h.
Referenced by clone(), getStageSummary(), getUntil(), proceed(), and routeOutput().
|
staticprotectedinherited |
the offset for computing positions when standing at an edge
Definition at line 239 of file MSStage.h.
Referenced by MSStageTrip::getPosition(), getPosition(), and MSStageDriving::getPosition().