![]() |
SUMO - Simulation of Urban MObility
|
#include <MSContainer.h>
Public Member Functions | |
virtual void | beginEventOutput (const MSTransportable &container, SUMOTime t, OutputDevice &os) const |
Called for writing the events output. More... | |
virtual void | endEventOutput (const MSTransportable &container, SUMOTime t, OutputDevice &os) const |
Called for writing the events output (end of an action) More... | |
SUMOReal | getAngle (SUMOTime now) const |
the angle of the edge minus 90deg More... | |
SUMOReal | getArrivalPos () const |
MSStoppingPlace * | getDepartContainerStop () 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... | |
SUMOReal | getEdgeAngle (const MSEdge *e, SUMOReal at) const |
get angle of the edge at a certain position More... | |
SUMOReal | getEdgePos (SUMOTime now) const |
Position | getEdgePosition (const MSEdge *e, SUMOReal at, SUMOReal offset) const |
get position on edge e at length at with orthogonal offset More... | |
const MSEdge * | getFromEdge () const |
Returns the current edge. More... | |
Position | getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal 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... | |
SUMOReal | getSpeed () const |
Returns the speed of the container which is always zero in that stage. More... | |
std::string | getStageDescription () const |
Returns the current stage description as a string. More... | |
StageType | getStageType () const |
SUMOTime | getUntil () const |
Returns time until the container waits. More... | |
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... | |
MSContainerStage_Waiting (const MSEdge &destination, SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string &actType) | |
constructor More... | |
virtual void | proceed (MSNet *net, MSTransportable *container, SUMOTime now, Stage *previous) |
proceeds to the next step More... | |
virtual void | routeOutput (OutputDevice &os) const |
Called on writing vehroute output. More... | |
void | setArrived (SUMOTime now) |
logs end of the step More... | |
void | setDeparted (SUMOTime now) |
logs end of the step More... | |
virtual void | tripInfoOutput (OutputDevice &os) const |
Called on writing tripinfo output. More... | |
~MSContainerStage_Waiting () | |
destructor More... | |
Protected Attributes | |
SUMOReal | 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 | |
MSContainerStage_Waiting (const MSContainerStage_Waiting &) | |
Invalidated copy constructor. More... | |
MSContainerStage_Waiting & | operator= (const MSContainerStage_Waiting &) |
Invalidated assignment operator. More... | |
Private Attributes | |
std::string | myActType |
The type of activity. More... | |
MSStoppingPlace * | myCurrentContainerStop |
the container stop at which the container is waiting More... | |
SUMOTime | myWaitingDuration |
the time the container is waiting More... | |
SUMOTime | myWaitingStart |
the time the container started waiting More... | |
SUMOTime | myWaitingUntil |
the time until the container is waiting More... | |
A "real" stage performing a waiting over the specified time A container is in this stage if it is not on a ride or waiting for a ride, e.g. if it is stored, or if gets filled or emptied.
Definition at line 192 of file MSContainer.h.
MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting | ( | const MSEdge & | destination, |
SUMOTime | duration, | ||
SUMOTime | until, | ||
SUMOReal | pos, | ||
const std::string & | actType | ||
) |
constructor
Definition at line 197 of file MSContainer.cpp.
MSContainer::MSContainerStage_Waiting::~MSContainerStage_Waiting | ( | ) |
destructor
Definition at line 206 of file MSContainer.cpp.
|
private |
Invalidated copy constructor.
|
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 279 of file MSContainer.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 285 of file MSContainer.cpp.
References getEdge(), Named::getID(), MSTransportable::getID(), myActType, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
the angle of the edge minus 90deg
Implements MSTransportable::Stage.
Definition at line 234 of file MSContainer.cpp.
References MSTransportable::Stage::getEdgeAngle(), M_PI, MSTransportable::Stage::myArrivalPos, and MSTransportable::Stage::myDestination.
|
inlineinherited |
MSStoppingPlace * MSContainer::MSContainerStage_Waiting::getDepartContainerStop | ( | ) | const |
Definition at line 249 of file MSContainer.cpp.
References myCurrentContainerStop.
|
inherited |
returns the destination edge
Definition at line 54 of file MSTransportable.cpp.
References MSTransportable::Stage::myDestination.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::routeOutput(), routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), and MSPerson::MSPersonStage_Waiting::routeOutput().
|
inlineinherited |
returns the destination stop (if any)
Definition at line 79 of file MSTransportable.h.
References MSTransportable::Stage::myDestinationStop.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
virtual |
Returns the current edge.
Implements MSTransportable::Stage.
Definition at line 209 of file MSContainer.cpp.
References MSTransportable::Stage::myDestination.
Referenced by beginEventOutput(), and endEventOutput().
get angle of the edge at a certain position
Definition at line 87 of file MSTransportable.cpp.
References MSEdge::getLanes().
Referenced by MSPModel_NonInteracting::PState::getAngle(), MSContainer::MSContainerStage_Driving::getAngle(), CState::getAngle(), getAngle(), MSPerson::MSPersonStage_Driving::getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), and MSTransportable::Stage::getVehicle().
Implements MSTransportable::Stage.
Definition at line 219 of file MSContainer.cpp.
References MSTransportable::Stage::myArrivalPos.
|
inherited |
get position on edge e at length at with orthogonal offset
Definition at line 77 of file MSTransportable.cpp.
References MSTransportable::Stage::getLanePosition(), and MSEdge::getLanes().
Referenced by MSContainer::MSContainerStage_Driving::getPosition(), getPosition(), MSPerson::MSPersonStage_Driving::getPosition(), MSPerson::MSPersonStage_Waiting::getPosition(), and MSTransportable::Stage::getVehicle().
|
virtual |
Returns the current edge.
Implements MSTransportable::Stage.
Definition at line 214 of file MSContainer.cpp.
References MSTransportable::Stage::myDestination, and SUMOReal.
|
inherited |
get position on lane at length at with orthogonal offset
Definition at line 82 of file MSTransportable.cpp.
References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), PositionVector::positionAtOffset(), and SUMOReal.
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 229 of file MSContainer.cpp.
References MSTransportable::Stage::getEdgePosition(), MSTransportable::Stage::myArrivalPos, MSTransportable::Stage::myDestination, MSContainer::ROADSIDE_OFFSET, and SUMOReal.
|
virtual |
Returns the speed of the container which is always zero in that stage.
Implements MSTransportable::Stage.
Definition at line 244 of file MSContainer.cpp.
|
inlinevirtual |
Returns the current stage description as a string.
Implements MSTransportable::Stage.
Definition at line 223 of file MSContainer.h.
References MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Driving::getDepartContainerStop(), MSContainer::MSContainerStage_Driving::proceed(), MSContainer::MSContainerStage_Driving::routeOutput(), and MSContainer::MSContainerStage_Driving::tripInfoOutput().
|
inlineinherited |
SUMOTime MSContainer::MSContainerStage_Waiting::getUntil | ( | ) | const |
Returns time until the container waits.
Definition at line 224 of file MSContainer.cpp.
References myWaitingUntil.
Referenced by MSContainer::routeOutput().
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.
Definition at line 124 of file MSTransportable.h.
References MSTransportable::Stage::beginEventOutput(), MSTransportable::Stage::endEventOutput(), MSTransportable::Stage::getEdgeAngle(), MSTransportable::Stage::getEdgePosition(), MSTransportable::Stage::getLanePosition(), MSTransportable::Stage::getSpeed(), MSTransportable::Stage::getWaitingTime(), MSTransportable::Stage::routeOutput(), SUMOReal, and MSTransportable::Stage::tripInfoOutput().
the time this transportable spent waiting
Implements MSTransportable::Stage.
Definition at line 239 of file MSContainer.cpp.
References myWaitingStart, and SUMOReal.
|
inlinevirtualinherited |
Whether the transportable waits for a vehicle.
Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.
Definition at line 119 of file MSTransportable.h.
|
virtualinherited |
Whether the transportable waits for a vehicle of the line specified.
Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.
Definition at line 72 of file MSTransportable.cpp.
Referenced by MSTransportable::Stage::getStageType().
|
private |
Invalidated assignment operator.
|
virtual |
proceeds to the next step
Implements MSTransportable::Stage.
Definition at line 254 of file MSContainer.cpp.
References MSEdge::addContainer(), MSNet::getContainerControl(), MSTransportable::Stage::getEdge(), MAX3(), myWaitingDuration, myWaitingStart, myWaitingUntil, and MSContainerControl::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 267 of file MSContainer.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::getDestination(), MSTransportable::getID(), myWaitingDuration, myWaitingUntil, OutputDevice::openTag(), SUMO_ATTR_DURATION, SUMO_ATTR_LANE, SUMO_ATTR_UNTIL, time2string(), and OutputDevice::writeAttr().
|
inherited |
logs end of the step
Definition at line 67 of file MSTransportable.cpp.
References MSTransportable::Stage::myArrived.
Referenced by MSTransportable::Stage::getStageType(), MSPerson::proceed(), and MSContainer::proceed().
|
inherited |
logs end of the step
Definition at line 60 of file MSTransportable.cpp.
References MSTransportable::Stage::myDeparted.
Referenced by MSTransportable::Stage::getStageType(), and MSTransportable::getVehicleType().
|
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 262 of file MSContainer.cpp.
References OutputDevice::closeTag(), MSTransportable::Stage::myArrived, OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().
|
private |
The type of activity.
Definition at line 274 of file MSContainer.h.
Referenced by beginEventOutput(), and endEventOutput().
|
protectedinherited |
the position at which we want to arrive
Definition at line 175 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Walking::computeAverageSpeed(), getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), MSTransportable::Stage::getArrivalPos(), MSPerson::MSPersonStage_Walking::getArrivalPos(), MSContainer::MSContainerStage_Tranship::getArrivalPos(), getEdgePos(), MSPerson::MSPersonStage_Waiting::getEdgePos(), getPosition(), and MSPerson::MSPersonStage_Waiting::getPosition().
|
protectedinherited |
the time at which this stage ended
Definition at line 181 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setArrived(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), and MSPerson::MSPersonStage_Waiting::tripInfoOutput().
|
private |
the container stop at which the container is waiting
Definition at line 277 of file MSContainer.h.
Referenced by getDepartContainerStop().
|
protectedinherited |
the time at which this stage started
Definition at line 178 of file MSTransportable.h.
Referenced by MSTransportable::Stage::setDeparted(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protectedinherited |
the next edge to reach by getting transported
Definition at line 169 of file MSTransportable.h.
Referenced by getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), MSTransportable::Stage::getDestination(), getEdge(), MSPerson::MSPersonStage_Waiting::getEdge(), getFromEdge(), MSPerson::MSPersonStage_Waiting::getFromEdge(), getPosition(), and MSPerson::MSPersonStage_Waiting::getPosition().
|
protectedinherited |
the stop to reach by getting transported (if any)
Definition at line 172 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getDestinationStop(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), and MSContainer::MSContainerStage_Tranship::moveToNextEdge().
|
protectedinherited |
The type of this stage.
Definition at line 184 of file MSTransportable.h.
Referenced by MSTransportable::Stage::getStageType().
|
private |
the time the container is waiting
Definition at line 265 of file MSContainer.h.
Referenced by proceed(), and routeOutput().
|
private |
the time the container started waiting
Definition at line 271 of file MSContainer.h.
Referenced by getWaitingTime(), and proceed().
|
private |
the time until the container is waiting
Definition at line 268 of file MSContainer.h.
Referenced by getUntil(), proceed(), and routeOutput().