![]() |
SUMO - Simulation of Urban MObility
|
#include <MSTransportable.h>
Public Member Functions | |
virtual void | beginEventOutput (const MSTransportable &transportable, SUMOTime t, OutputDevice &os) const =0 |
Called for writing the events output (begin of an action) More... | |
virtual void | endEventOutput (const MSTransportable &transportable, SUMOTime t, OutputDevice &os) const =0 |
Called for writing the events output (end of an action) More... | |
virtual SUMOReal | getAngle (SUMOTime now) const =0 |
returns the angle of the transportable More... | |
SUMOReal | getArrivalPos () const |
const MSEdge & | getDestination () const |
returns the destination edge More... | |
const MSStoppingPlace * | getDestinationStop () const |
returns the destination stop (if any) More... | |
virtual const MSEdge * | getEdge () const =0 |
Returns the current edge. More... | |
SUMOReal | getEdgeAngle (const MSEdge *e, SUMOReal at) const |
get angle of the edge at a certain position More... | |
virtual SUMOReal | getEdgePos (SUMOTime now) const =0 |
Position | getEdgePosition (const MSEdge *e, SUMOReal at, SUMOReal offset) const |
get position on edge e at length at with orthogonal offset More... | |
virtual const MSEdge * | getFromEdge () const =0 |
Position | getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const |
get position on lane at length at with orthogonal offset More... | |
virtual Position | getPosition (SUMOTime now) const =0 |
returns the position of the transportable More... | |
virtual SUMOReal | getSpeed () const =0 |
the speed of the transportable More... | |
virtual std::string | getStageDescription () const =0 |
return string representation of the current stage More... | |
StageType | getStageType () const |
virtual SUMOVehicle * | getVehicle () const |
Whether the transportable waits for a vehicle. More... | |
virtual SUMOTime | getWaitingTime (SUMOTime now) const =0 |
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)=0 |
proceeds to the next step More... | |
virtual void | routeOutput (OutputDevice &os) const =0 |
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... | |
Stage (const MSEdge &destination, MSStoppingPlace *toStop, const SUMOReal arrivalPos, StageType type) | |
constructor More... | |
virtual void | tripInfoOutput (OutputDevice &os) const =0 |
Called on writing tripinfo output. More... | |
virtual | ~Stage () |
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 | |
Stage & | operator= (const Stage &) |
Invalidated assignment operator. More... | |
Stage (const Stage &) | |
Invalidated copy constructor. More... | |
The "abstract" class for a single stage of a movement Contains the destination of the current movement step
Definition at line 67 of file MSTransportable.h.
MSTransportable::Stage::Stage | ( | const MSEdge & | destination, |
MSStoppingPlace * | toStop, | ||
const SUMOReal | arrivalPos, | ||
StageType | type | ||
) |
constructor
Definition at line 48 of file MSTransportable.cpp.
|
virtual |
destructor
Definition at line 51 of file MSTransportable.cpp.
|
private |
Invalidated copy constructor.
|
pure virtual |
Called for writing the events output (begin of an action)
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by getVehicle().
|
pure virtual |
Called for writing the events output (end of an action)
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by getVehicle().
returns the angle of the transportable
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by getArrivalPos(), and MSTransportable::getFromEdge().
|
inline |
Definition at line 83 of file MSTransportable.h.
References getAngle(), getEdge(), getEdgePos(), getFromEdge(), getPosition(), myArrivalPos, and SUMOReal.
const MSEdge & MSTransportable::Stage::getDestination | ( | ) | const |
returns the destination edge
Definition at line 54 of file MSTransportable.cpp.
References myDestination.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::routeOutput(), MSContainer::MSContainerStage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), and MSPerson::MSPersonStage_Waiting::routeOutput().
|
inline |
returns the destination stop (if any)
Definition at line 79 of file MSTransportable.h.
References myDestinationStop.
Referenced by MSPModel_Striping::moveInDirectionOnLane(), MSContainer::MSContainerStage_Driving::proceed(), and MSPerson::MSPersonStage_Driving::proceed().
|
pure virtual |
Returns the current edge.
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by getArrivalPos(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Walking::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSContainer::MSContainerStage_Waiting::proceed(), MSContainer::MSContainerStage_Tranship::proceed(), MSPerson::MSPersonStage_Waiting::proceed(), MSPerson::proceed(), and MSContainer::proceed().
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(), MSContainer::MSContainerStage_Waiting::getAngle(), MSPerson::MSPersonStage_Driving::getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), and getVehicle().
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by getArrivalPos(), MSTransportable::getFromEdge(), MSEdge::transportable_by_position_sorter::operator()(), MSPerson::MSPersonStage_Walking::proceed(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), and MSContainer::MSContainerStage_Tranship::proceed().
Position MSTransportable::Stage::getEdgePosition | ( | const MSEdge * | e, |
SUMOReal | at, | ||
SUMOReal | offset | ||
) | const |
get position on edge e at length at with orthogonal offset
Definition at line 77 of file MSTransportable.cpp.
References getLanePosition(), and MSEdge::getLanes().
Referenced by MSContainer::MSContainerStage_Driving::getPosition(), MSContainer::MSContainerStage_Waiting::getPosition(), MSPerson::MSPersonStage_Driving::getPosition(), MSPerson::MSPersonStage_Waiting::getPosition(), and getVehicle().
|
pure virtual |
Position MSTransportable::Stage::getLanePosition | ( | const MSLane * | lane, |
SUMOReal | at, | ||
SUMOReal | offset | ||
) | const |
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(), getEdgePosition(), MSPModel_NonInteracting::PState::getPosition(), MSPModel_Striping::PState::getPosition(), and getVehicle().
returns the position of the transportable
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by getArrivalPos(), and MSTransportable::getFromEdge().
|
pure virtual |
the speed of the transportable
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by MSTransportable::getFromEdge(), and getVehicle().
|
pure virtual |
return string representation of the current stage
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSPerson::MSPersonStage_Walking, and MSContainer::MSContainerStage_Driving.
Referenced by getStageType().
|
inline |
Definition at line 99 of file MSTransportable.h.
References getStageDescription(), isWaitingFor(), myType, proceed(), setArrived(), and setDeparted().
|
inlinevirtual |
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 beginEventOutput(), endEventOutput(), getEdgeAngle(), getEdgePosition(), getLanePosition(), getSpeed(), getWaitingTime(), routeOutput(), SUMOReal, and tripInfoOutput().
the time this transportable spent waiting
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by getVehicle().
|
inlinevirtual |
Whether the transportable waits for a vehicle.
Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.
Definition at line 119 of file MSTransportable.h.
|
virtual |
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 getStageType().
|
pure virtual |
proceeds to the next step
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSContainer::MSContainerStage_Waiting, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by getStageType().
|
pure virtual |
Called on writing vehroute output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by MSTransportable::getCurrentStage(), and getVehicle().
void MSTransportable::Stage::setArrived | ( | SUMOTime | now | ) |
logs end of the step
Definition at line 67 of file MSTransportable.cpp.
References myArrived.
Referenced by getStageType(), MSPerson::proceed(), and MSContainer::proceed().
void MSTransportable::Stage::setDeparted | ( | SUMOTime | now | ) |
logs end of the step
Definition at line 60 of file MSTransportable.cpp.
References myDeparted.
Referenced by getStageType(), and MSTransportable::getVehicleType().
|
pure virtual |
Called on writing tripinfo output.
[in] | os | The stream to write the information into |
IOError | not yet implemented |
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by MSTransportable::getCurrentStage(), and getVehicle().
|
protected |
the position at which we want to arrive
Definition at line 175 of file MSTransportable.h.
Referenced by MSPerson::MSPersonStage_Walking::computeAverageSpeed(), MSContainer::MSContainerStage_Waiting::getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), getArrivalPos(), MSPerson::MSPersonStage_Walking::getArrivalPos(), MSContainer::MSContainerStage_Tranship::getArrivalPos(), MSContainer::MSContainerStage_Waiting::getEdgePos(), MSPerson::MSPersonStage_Waiting::getEdgePos(), MSContainer::MSContainerStage_Waiting::getPosition(), and MSPerson::MSPersonStage_Waiting::getPosition().
|
protected |
the time at which this stage ended
Definition at line 181 of file MSTransportable.h.
Referenced by setArrived(), MSPerson::MSPersonStage_Walking::tripInfoOutput(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), MSContainer::MSContainerStage_Waiting::tripInfoOutput(), MSPerson::MSPersonStage_Driving::tripInfoOutput(), MSContainer::MSContainerStage_Tranship::tripInfoOutput(), and MSPerson::MSPersonStage_Waiting::tripInfoOutput().
|
protected |
the time at which this stage started
Definition at line 178 of file MSTransportable.h.
Referenced by setDeparted(), MSContainer::MSContainerStage_Driving::tripInfoOutput(), and MSPerson::MSPersonStage_Driving::tripInfoOutput().
|
protected |
the next edge to reach by getting transported
Definition at line 169 of file MSTransportable.h.
Referenced by MSContainer::MSContainerStage_Waiting::getAngle(), MSPerson::MSPersonStage_Waiting::getAngle(), getDestination(), MSContainer::MSContainerStage_Waiting::getEdge(), MSPerson::MSPersonStage_Waiting::getEdge(), MSContainer::MSContainerStage_Waiting::getFromEdge(), MSPerson::MSPersonStage_Waiting::getFromEdge(), MSContainer::MSContainerStage_Waiting::getPosition(), and MSPerson::MSPersonStage_Waiting::getPosition().
|
protected |
the stop to reach by getting transported (if any)
Definition at line 172 of file MSTransportable.h.
Referenced by getDestinationStop(), MSPerson::MSPersonStage_Walking::moveToNextEdge(), and MSContainer::MSContainerStage_Tranship::moveToNextEdge().
|
protected |
The type of this stage.
Definition at line 184 of file MSTransportable.h.
Referenced by getStageType().