SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSPerson::MSPersonStage_Waiting Class Reference

#include <MSPerson.h>

Inheritance diagram for MSPerson::MSPersonStage_Waiting:
MSPerson::MSPersonStage

Public Member Functions

virtual void beginEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const
 Called for writing the events output.
virtual void endEventOutput (const MSPerson &p, SUMOTime t, OutputDevice &os) const
 Called for writing the events output (end of an action)
SUMOReal getAngle (SUMOTime now) const
const MSEdgegetDestination () const
 returns the destination edge
const MSEdgegetEdge () const
 Returns the current edge.
SUMOReal getEdgeAngle (const MSEdge *e, SUMOReal at) const
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
const MSEdgegetFromEdge () const
Position getLanePosition (const MSLane *lane, SUMOReal at, SUMOReal offset) const
 get position on lane at length at with orthogonal offset
Position getPosition (SUMOTime now) const
SUMOReal getSpeed () const
 the time this person spent waiting
std::string getStageDescription () const
 return string representation of the current stage
StageType getStageType () const
SUMOTime getUntil () const
SUMOTime getWaitingTime (SUMOTime now) const
 the time this person spent waiting
virtual bool isWaiting4Vehicle () const
 Whether the person waits for a vehicle.
virtual bool isWaitingFor (const std::string &line) const
 Whether the person waits for a vehicle of the line specified.
 MSPersonStage_Waiting (const MSEdge &destination, SUMOTime duration, SUMOTime until, SUMOReal pos, const std::string &actType)
 constructor
virtual void proceed (MSNet *net, MSPerson *person, SUMOTime now, MSEdge *previousEdge, const SUMOReal at)
 proceeds to the next step
virtual void routeOutput (OutputDevice &os) const
 Called on writing vehroute output.
void setArrived (SUMOTime now)
 logs end of the step
void setDeparted (SUMOTime now)
 logs end of the step
virtual void tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output.
 ~MSPersonStage_Waiting ()
 destructor

Protected Attributes

SUMOTime myArrived
 the time at which this stage ended
SUMOTime myDeparted
 the time at which this stage started
const MSEdgemyDestination
 the next edge to reach (either by walking or driving)
StageType myType
 The type of this stage.

Private Member Functions

 MSPersonStage_Waiting (const MSPersonStage_Waiting &)
 Invalidated copy constructor.
MSPersonStage_Waitingoperator= (const MSPersonStage_Waiting &)
 Invalidated assignment operator.

Private Attributes

std::string myActType
 The type of activity.
SUMOReal myStartPos
SUMOTime myWaitingDuration
 the time the person is waiting
SUMOTime myWaitingStart
 the time the person is waiting
SUMOTime myWaitingUntil
 the time until the person is waiting

Detailed Description

A "real" stage performing a waiting over the specified time

Definition at line 431 of file MSPerson.h.

Constructor & Destructor Documentation

MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting ( const MSEdge destination,
SUMOTime  duration,
SUMOTime  until,
SUMOReal  pos,
const std::string &  actType 
)
MSPerson::MSPersonStage_Waiting::~MSPersonStage_Waiting ( )

destructor

Definition at line 436 of file MSPerson.cpp.

MSPerson::MSPersonStage_Waiting::MSPersonStage_Waiting ( const MSPersonStage_Waiting )
private

Invalidated copy constructor.

Member Function Documentation

void MSPerson::MSPersonStage_Waiting::beginEventOutput ( const MSPerson p,
SUMOTime  t,
OutputDevice os 
) const
virtual

Called for writing the events output.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSPerson::MSPersonStage.

Definition at line 505 of file MSPerson.cpp.

References MSPerson::getEdge(), Named::getID(), MSPerson::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

void MSPerson::MSPersonStage_Waiting::endEventOutput ( const MSPerson p,
SUMOTime  t,
OutputDevice os 
) const
virtual

Called for writing the events output (end of an action)

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSPerson::MSPersonStage.

Definition at line 512 of file MSPerson.cpp.

References MSPerson::getEdge(), Named::getID(), MSPerson::getID(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

SUMOReal MSPerson::MSPersonStage_Waiting::getAngle ( SUMOTime  now) const
virtual

Implements MSPerson::MSPersonStage.

Definition at line 470 of file MSPerson.cpp.

const MSEdge & MSPerson::MSPersonStage::getDestination ( ) const
inherited

returns the destination edge

Definition at line 70 of file MSPerson.cpp.

const MSEdge * MSPerson::MSPersonStage_Waiting::getEdge ( ) const
virtual

Returns the current edge.

Implements MSPerson::MSPersonStage.

Definition at line 440 of file MSPerson.cpp.

SUMOReal MSPerson::MSPersonStage::getEdgeAngle ( const MSEdge e,
SUMOReal  at 
) const
inherited
SUMOReal MSPerson::MSPersonStage_Waiting::getEdgePos ( SUMOTime  now) const
virtual

Implements MSPerson::MSPersonStage.

Definition at line 452 of file MSPerson.cpp.

Position MSPerson::MSPersonStage::getEdgePosition ( const MSEdge e,
SUMOReal  at,
SUMOReal  offset 
) const
inherited

get position on edge e at length at with orthogonal offset

Definition at line 96 of file MSPerson.cpp.

References MSEdge::getLanes().

const MSEdge * MSPerson::MSPersonStage_Waiting::getFromEdge ( ) const
virtual

Implements MSPerson::MSPersonStage.

Definition at line 446 of file MSPerson.cpp.

Position MSPerson::MSPersonStage::getLanePosition ( const MSLane lane,
SUMOReal  at,
SUMOReal  offset 
) const
inherited

get position on lane at length at with orthogonal offset

Definition at line 102 of file MSPerson.cpp.

References MSLane::getShape(), MSLane::interpolateLanePosToGeometryPos(), and PositionVector::positionAtOffset().

Referenced by MSPModel_NonInteracting::PState::getPosition(), and MSPModel_Striping::PState::getPosition().

Position MSPerson::MSPersonStage_Waiting::getPosition ( SUMOTime  now) const
virtual

Implements MSPerson::MSPersonStage.

Definition at line 464 of file MSPerson.cpp.

References MSPModel::SIDEWALK_OFFSET.

SUMOReal MSPerson::MSPersonStage_Waiting::getSpeed ( ) const
virtual

the time this person spent waiting

Implements MSPerson::MSPersonStage.

Definition at line 525 of file MSPerson.cpp.

std::string MSPerson::MSPersonStage_Waiting::getStageDescription ( ) const
inlinevirtual

return string representation of the current stage

Implements MSPerson::MSPersonStage.

Definition at line 455 of file MSPerson.h.

References myActType.

StageType MSPerson::MSPersonStage::getStageType ( ) const
inlineinherited

Definition at line 104 of file MSPerson.h.

References MSPerson::MSPersonStage::myType.

SUMOTime MSPerson::MSPersonStage_Waiting::getUntil ( ) const

Definition at line 458 of file MSPerson.cpp.

Referenced by MSPerson::routeOutput().

SUMOTime MSPerson::MSPersonStage_Waiting::getWaitingTime ( SUMOTime  now) const
virtual

the time this person spent waiting

Implements MSPerson::MSPersonStage.

Definition at line 519 of file MSPerson.cpp.

virtual bool MSPerson::MSPersonStage::isWaiting4Vehicle ( ) const
inlinevirtualinherited

Whether the person waits for a vehicle.

Reimplemented in MSPerson::MSPersonStage_Driving.

Definition at line 124 of file MSPerson.h.

bool MSPerson::MSPersonStage::isWaitingFor ( const std::string &  line) const
virtualinherited

Whether the person waits for a vehicle of the line specified.

Reimplemented in MSPerson::MSPersonStage_Driving.

Definition at line 90 of file MSPerson.cpp.

MSPersonStage_Waiting& MSPerson::MSPersonStage_Waiting::operator= ( const MSPersonStage_Waiting )
private

Invalidated assignment operator.

void MSPerson::MSPersonStage_Waiting::proceed ( MSNet net,
MSPerson person,
SUMOTime  now,
MSEdge previousEdge,
const SUMOReal  at 
)
virtual

proceeds to the next step

Implements MSPerson::MSPersonStage.

Definition at line 476 of file MSPerson.cpp.

References MSEdge::addPerson(), MSNet::getPersonControl(), MAX3(), and MSPersonControl::setWaitEnd().

void MSPerson::MSPersonStage_Waiting::routeOutput ( OutputDevice os) const
virtual

Called on writing vehroute output.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSPerson::MSPersonStage.

Definition at line 492 of file MSPerson.cpp.

References OutputDevice::closeTag(), MSPerson::getDestination(), MSPerson::getID(), OutputDevice::openTag(), SUMO_ATTR_DURATION, SUMO_ATTR_LANE, SUMO_ATTR_UNTIL, time2string(), and OutputDevice::writeAttr().

void MSPerson::MSPersonStage::setArrived ( SUMOTime  now)
inherited

logs end of the step

Definition at line 84 of file MSPerson.cpp.

void MSPerson::MSPersonStage::setDeparted ( SUMOTime  now)
inherited

logs end of the step

Definition at line 76 of file MSPerson.cpp.

void MSPerson::MSPersonStage_Waiting::tripInfoOutput ( OutputDevice os) const
virtual

Called on writing tripinfo output.

Parameters
[in]osThe stream to write the information into
Exceptions
IOErrornot yet implemented

Implements MSPerson::MSPersonStage.

Definition at line 486 of file MSPerson.cpp.

References OutputDevice::closeTag(), OutputDevice::openTag(), time2string(), and OutputDevice::writeAttr().

Field Documentation

std::string MSPerson::MSPersonStage_Waiting::myActType
private

The type of activity.

Definition at line 499 of file MSPerson.h.

Referenced by getStageDescription().

SUMOTime MSPerson::MSPersonStage::myArrived
protectedinherited

the time at which this stage ended

Definition at line 175 of file MSPerson.h.

SUMOTime MSPerson::MSPersonStage::myDeparted
protectedinherited

the time at which this stage started

Definition at line 172 of file MSPerson.h.

const MSEdge& MSPerson::MSPersonStage::myDestination
protectedinherited

the next edge to reach (either by walking or driving)

Definition at line 169 of file MSPerson.h.

Referenced by MSPersonStage_Waiting().

SUMOReal MSPerson::MSPersonStage_Waiting::myStartPos
private

Definition at line 501 of file MSPerson.h.

Referenced by MSPersonStage_Waiting().

StageType MSPerson::MSPersonStage::myType
protectedinherited

The type of this stage.

Definition at line 178 of file MSPerson.h.

Referenced by MSPerson::MSPersonStage::getStageType().

SUMOTime MSPerson::MSPersonStage_Waiting::myWaitingDuration
private

the time the person is waiting

Definition at line 490 of file MSPerson.h.

SUMOTime MSPerson::MSPersonStage_Waiting::myWaitingStart
private

the time the person is waiting

Definition at line 496 of file MSPerson.h.

SUMOTime MSPerson::MSPersonStage_Waiting::myWaitingUntil
private

the time until the person is waiting

Definition at line 493 of file MSPerson.h.


The documentation for this class was generated from the following files: