![]() |
SUMO - Simulation of Urban MObility
|
#include <MSTransportable.h>
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... | |
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 |
const MSEdge & | getDestination () const |
returns the destination edge More... | |
const MSStoppingPlace * | getDestinationStop () const |
returns the destination stop (if any) 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... | |
Position | getPosition (SUMOTime now) const |
returns the position of the transportable More... | |
double | getSpeed () const |
the speed of the transportable More... | |
std::string | getStageDescription () const |
return string representation of the current stage More... | |
StageType | 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 std::string &line) const |
Whether the transportable waits for a vehicle of the line specified. More... | |
virtual void | proceed (MSNet *net, MSTransportable *transportable, SUMOTime now, Stage *previous) |
proceeds to the next step More... | |
virtual void | routeOutput (OutputDevice &os) const |
Called on writing vehroute output. More... | |
virtual void | setArrived (SUMOTime now) |
logs end of the step More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
virtual void | setSpeed (double) |
sets the walking speed (ignored in other stages) More... | |
Stage_Waiting (const MSEdge &destination, SUMOTime duration, SUMOTime until, double pos, const std::string &actType, const bool initial) | |
constructor More... | |
virtual void | tripInfoOutput (OutputDevice &os, MSTransportable *transportable) const |
Called on writing tripinfo output. More... | |
virtual | ~Stage_Waiting () |
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 *const | myDestinationStop |
the stop to reach by getting transported (if any) More... | |
StageType | myType |
The type of this stage. More... | |
Private Member Functions | |
Stage_Waiting & | operator= (const Stage_Waiting &) |
Invalidated assignment operator. More... | |
Stage_Waiting (const Stage_Waiting &) | |
Invalidated copy constructor. 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
Definition at line 215 of file MSTransportable.h.
MSTransportable::Stage_Waiting::Stage_Waiting | ( | const MSEdge & | destination, |
SUMOTime | duration, | ||
SUMOTime | until, | ||
double | pos, | ||
const std::string & | actType, | ||
const bool | initial | ||
) |
constructor
Definition at line 101 of file MSTransportable.cpp.
|
virtual |
destructor
Definition at line 113 of file MSTransportable.cpp.
|
private |
Invalidated copy constructor.
|
virtual |
abort this stage (TraCI)
Reimplemented from MSTransportable::Stage.
Definition at line 229 of file MSTransportable.cpp.
References MSTransportableControl::abortWaiting(), MSNet::getContainerControl(), MSNet::getInstance(), and MSNet::getPersonControl().
|
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 196 of file MSTransportable.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), myActType, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
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 203 of file MSTransportable.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), myActType, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
virtual |
returns the angle of the transportable
Implements MSTransportable::Stage.
Definition at line 148 of file MSTransportable.cpp.
References MSTransportable::Stage::getEdgeAngle(), MSNet::getInstance(), MSNet::lefthand(), M_PI, MSTransportable::Stage::myArrivalPos, and MSTransportable::Stage::myDestination.
|
inlineinherited |
Definition at line 91 of file MSTransportable.h.
References MSTransportable::Stage::getAngle(), MSTransportable::Stage::getEdge(), MSTransportable::Stage::getEdgePos(), MSTransportable::Stage::getFromEdge(), MSTransportable::Stage::getPosition(), and MSTransportable::Stage::myArrivalPos.
Referenced by MSRouteHandler::parseWalkPositions().
|
inherited |
returns the destination edge
Definition at line 60 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
Referenced by getEdges(), MSTransportable::Stage_Driving::getEdges(), MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSContainer::MSContainerStage_Driving::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), and routeOutput().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 87 of file MSTransportable.h.
References MSTransportable::Stage::myDestinationStop.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSRouteHandler::parseWalkPositions(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
virtual |
Returns the current edge.
Implements MSTransportable::Stage.
Definition at line 117 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
Referenced by beginEventOutput(), and endEventOutput().
|
inherited |
get angle of the edge at a certain position
Definition at line 93 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), CState::getAngle(), getAngle(), MSTransportable::Stage_Driving::getAngle(), and MSTransportable::Stage::getVehicle().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 129 of file MSTransportable.cpp.
References MSTransportable::Stage::myArrivalPos.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 83 of file MSTransportable.cpp.
References MSTransportable::Stage::getLanePosition(), and MSEdge::getLanes().
Referenced by getPosition(), MSTransportable::Stage_Driving::getPosition(), and MSTransportable::Stage::getVehicle().
|
virtual |
the edges of the current stage
Implements MSTransportable::Stage.
Definition at line 222 of file MSTransportable.cpp.
References MSTransportable::Stage::getDestination().
|
virtual |
Implements MSTransportable::Stage.
Definition at line 123 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 88 of file MSTransportable.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().
Referenced by CState::computeTranshipTime(), MSTransportable::Stage::getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), MSPModel_Striping::PState::getPosition(), and MSTransportable::Stage::getVehicle().
returns the position of the transportable
Implements MSTransportable::Stage.
Definition at line 141 of file MSTransportable.cpp.
References MSTransportable::Stage::getEdgePosition(), MSNet::getInstance(), MSTransportable::Stage::myArrivalPos, MSTransportable::Stage::myDestination, and MSTransportable::ROADSIDE_OFFSET.
|
virtual |
the speed of the transportable
Implements MSTransportable::Stage.
Definition at line 216 of file MSTransportable.cpp.
|
inlinevirtual |
return string representation of the current stage
Implements MSTransportable::Stage.
Definition at line 244 of file MSTransportable.h.
References MSTransportable::Stage::beginEventOutput(), MSTransportable::Stage::endEventOutput(), MSTransportable::Stage::proceed(), MSTransportable::Stage::routeOutput(), and MSTransportable::Stage::tripInfoOutput().
|
inlineinherited |
Definition at line 107 of file MSTransportable.h.
References MSTransportable::Stage::getStageDescription(), MSTransportable::Stage::myType, and MSTransportable::Stage::proceed().
Referenced by MSTransportable::getStageType().
SUMOTime MSTransportable::Stage_Waiting::getUntil | ( | ) | const |
Definition at line 135 of file MSTransportable.cpp.
References myWaitingUntil.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 138 of file MSTransportable.h.
References MSTransportable::Stage::beginEventOutput(), MSTransportable::Stage::endEventOutput(), MSTransportable::Stage::getEdgeAngle(), MSTransportable::Stage::getEdgePosition(), MSTransportable::Stage::getEdges(), MSTransportable::Stage::getLanePosition(), MSTransportable::Stage::getSpeed(), MSTransportable::Stage::getWaitingTime(), MSTransportable::Stage::routeOutput(), and MSTransportable::Stage::tripInfoOutput().
the time this transportable spent waiting
Implements MSTransportable::Stage.
Definition at line 210 of file MSTransportable.cpp.
References MSTransportable::Stage::myDeparted.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 133 of file MSTransportable.h.
|
virtualinherited |
Whether the transportable waits for a vehicle of the line specified.
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 78 of file MSTransportable.cpp.
Referenced by MSTransportable::Stage::setSpeed().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 154 of file MSTransportable.cpp.
References MSEdge::addContainer(), MSEdge::addPerson(), MSNet::getContainerControl(), MSTransportable::Stage::getEdge(), MSNet::getPersonControl(), MAX3(), MSTransportable::Stage::myDeparted, myWaitingDuration, myWaitingUntil, and MSTransportableControl::setWaitEnd().
|
virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implements MSTransportable::Stage.
Definition at line 181 of file MSTransportable.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::getDestination(), MSTransportable::getID(), MSTransportable::Stage::myType, myWaitingDuration, myWaitingUntil, OutputDevice::openTag(), SUMO_ATTR_DURATION, SUMO_ATTR_LANE, SUMO_ATTR_UNTIL, time2string(), MSTransportable::WAITING_FOR_DEPART, and OutputDevice::writeAttr().
|
virtualinherited |
logs end of the step
Reimplemented in MSTransportable::Stage_Driving.
Definition at line 73 of file MSTransportable.cpp.
References MSTransportable::Stage::myArrived.
Referenced by MSTransportable::Stage_Driving::getVehicle(), MSContainer::proceed(), MSPerson::proceed(), MSTransportable::Stage_Driving::setArrived(), and MSTransportable::Stage::setSpeed().
|
inherited |
logs end of the step
Definition at line 66 of file MSTransportable.cpp.
References MSTransportable::Stage::myDeparted.
Referenced by MSTransportable::getVehicleType(), and MSTransportable::Stage::setSpeed().
|
inlinevirtualinherited |
sets the walking speed (ignored in other stages)
Reimplemented in MSPerson::MSPersonStage_Walking.
Definition at line 121 of file MSTransportable.h.
References MSTransportable::Stage::isWaitingFor(), MSTransportable::Stage::setArrived(), and MSTransportable::Stage::setDeparted().
Referenced by MSTransportable::getVehicle().
|
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 168 of file MSTransportable.cpp.
References OutputDevice::closeTag(), myActType, MSTransportable::Stage::myArrivalPos, MSTransportable::Stage::myArrived, MSTransportable::Stage::myDeparted, MSTransportable::Stage::myType, OutputDevice::openTag(), time2string(), toString(), MSTransportable::WAITING_FOR_DEPART, and OutputDevice::writeAttr().
|
private |
The type of activity.
Definition at line 285 of file MSTransportable.h.
Referenced by beginEventOutput(), endEventOutput(), and tripInfoOutput().
|
protectedinherited |
the position at which we want to arrive
Definition at line 192 of file MSTransportable.h.
Referenced by getAngle(), MSTransportable::Stage::getArrivalPos(), MSPerson::MSPersonStage_Walking::getArrivalPos(), MSContainer::MSContainerStage_Tranship::getArrivalPos(), getEdgePos(), getPosition(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), tripInfoOutput(), and MSPerson::MSPersonStage_Walking::walkDistance().
|
protectedinherited |
the time at which this stage ended
Definition at line 198 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setArrived(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
the time at which this stage started
Definition at line 195 of file MSTransportable.h.
Referenced by getWaitingTime(), MSTransportable::Stage_Driving::getWaitingTime(), MSPerson::MSPersonStage_Walking::proceed(), MSContainer::MSContainerStage_Tranship::proceed(), proceed(), MSTransportable::Stage::setDeparted(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 186 of file MSTransportable.h.
Referenced by getAngle(), MSTransportable::Stage::getDestination(), getEdge(), getFromEdge(), and getPosition().
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 189 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), MSTransportable::Stage_Driving::getWaitingDescription(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), MSContainer::MSContainerStage_Tranship::moveToNextEdge(), MSPerson::MSPersonStage_Walking::routeOutput(), and MSPerson::MSPersonStage_Driving::routeOutput().
|
protectedinherited |
The type of this stage.
Definition at line 201 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType(), routeOutput(), and tripInfoOutput().
|
private |
the time the person is waiting
Definition at line 279 of file MSTransportable.h.
Referenced by proceed(), and routeOutput().
|
private |
the time until the person is waiting
Definition at line 282 of file MSTransportable.h.
Referenced by getUntil(), proceed(), and routeOutput().