|
SUMO - Simulation of Urban MObility
|
#include <MSTransportable.h>
Public Member Functions | |
| virtual void | beginEventOutput (const MSTransportable &container, SUMOTime t, OutputDevice &os) const =0 |
| Called for writing the events output (begin of an action) More... | |
| virtual void | endEventOutput (const MSTransportable &container, 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... | |
| const MSEdge & | getDestination () const |
| returns the destination edge 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 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, MSEdge *previousEdge, const SUMOReal at)=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, StageType type) | |
| constructor More... | |
| virtual void | tripInfoOutput (OutputDevice &os) const =0 |
| Called on writing tripinfo output. More... | |
| virtual | ~Stage () |
| destructor More... | |
Protected Attributes | |
| 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... | |
| 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 65 of file MSTransportable.h.
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.
|
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.
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.
| const MSEdge & MSTransportable::Stage::getDestination | ( | ) | const |
returns the destination edge
Definition at line 54 of file MSTransportable.cpp.
|
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.
get angle of the edge at a certain position
Definition at line 86 of file MSTransportable.cpp.
References MSEdge::getLanes(), and PositionVector::rotationDegreeAtOffset().
Referenced by MSPModel_NonInteracting::PState::getAngle(), and CState::getAngle().
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
Referenced by MSEdge::transportable_by_position_sorter::operator()().
| 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 76 of file MSTransportable.cpp.
References MSEdge::getLanes().
|
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 81 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().
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.
|
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.
|
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.
|
inline |
Definition at line 88 of file MSTransportable.h.
References myType.
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.
|
inlinevirtual |
Whether the transportable waits for a vehicle.
Reimplemented in MSPerson::MSPersonStage_Driving, and MSContainer::MSContainerStage_Driving.
Definition at line 108 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 71 of file MSTransportable.cpp.
|
pure virtual |
proceeds to the next step
Implemented in MSPerson::MSPersonStage_Waiting, MSContainer::MSContainerStage_Tranship, MSPerson::MSPersonStage_Driving, MSContainer::MSContainerStage_Waiting, MSContainer::MSContainerStage_Driving, and MSPerson::MSPersonStage_Walking.
|
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.
| void MSTransportable::Stage::setArrived | ( | SUMOTime | now | ) |
logs end of the step
Definition at line 66 of file MSTransportable.cpp.
| void MSTransportable::Stage::setDeparted | ( | SUMOTime | now | ) |
logs end of the step
Definition at line 59 of file MSTransportable.cpp.
|
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.
|
protected |
the time at which this stage ended
Definition at line 159 of file MSTransportable.h.
|
protected |
the time at which this stage started
Definition at line 156 of file MSTransportable.h.
|
protected |
the next edge to reach by getting transported
Definition at line 153 of file MSTransportable.h.
Referenced by MSContainer::MSContainerStage_Waiting::MSContainerStage_Waiting(), and MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting().
|
protected |
The type of this stage.
Definition at line 162 of file MSTransportable.h.
Referenced by getStageType().