SUMO - Simulation of Urban MObility
MSPerson Class Reference

#include <MSPerson.h>

Inheritance diagram for MSPerson:
Inheritance graph
Collaboration diagram for MSPerson:
Collaboration graph

Data Structures

class  MSPersonStage_Driving
 
class  MSPersonStage_Waiting
 
class  MSPersonStage_Walking
 

Public Types

typedef std::vector< MSTransportable::Stage * > MSTransportablePlan
 the structure holding the plan of a transportable More...
 
enum  StageType { DRIVING = 0, WAITING = 1, MOVING_WITHOUT_VEHICLE = 2 }
 

Public Member Functions

virtual SUMOReal getAngle () const
 return the current angle of the transportable More...
 
MSTransportable::StagegetCurrentStage () const
 Return the current stage. More...
 
std::string getCurrentStageDescription () const
 Returns the current stage description as a string. More...
 
StageType getCurrentStageType () const
 the current stage type of the transportable More...
 
SUMOTime getDesiredDepart () const
 Returns the desired departure time. More...
 
const MSEdgegetDestination () const
 Returns the current destination. More...
 
const MSEdgegetEdge () const
 Returns the current edge. More...
 
virtual SUMOReal getEdgePos () const
 Return the position on the edge. More...
 
const MSEdgegetFromEdge () const
 Returns the departure edge. More...
 
const std::string & getID () const
 returns the id of the transportable More...
 
const MSEdgegetNextDestination () const
 Returns the destination after the current destination. More...
 
const std::string & getNextEdge () const
 return the list of internal edges if this person is walking and the pedestrian model allows it More...
 
const MSEdgegetNextEdgePtr () const
 returns the next edge ptr if this person is walking and the pedestrian model allows it More...
 
const SUMOVehicleParametergetParameter () const
 
virtual Position getPosition () const
 Return the Network coordinate of the transportable. More...
 
virtual SUMOReal getSpeed () const
 the current speed of the transportable More...
 
SUMOVehiclegetVehicle () const
 The vehicle associated with this transportable. More...
 
const MSVehicleTypegetVehicleType () const
 
virtual SUMOReal getWaitingSeconds () const
 the time this transportable spent waiting in seconds More...
 
bool isWaiting4Vehicle () const
 Whether the transportable waits for a vehicle. More...
 
bool isWaitingFor (const std::string &line) const
 Whether the transportable waits for a vehicle of the line specified. More...
 
 MSPerson (const SUMOVehicleParameter *pars, const MSVehicleType *vtype, MSTransportable::MSTransportablePlan *plan)
 constructor More...
 
bool proceed (MSNet *net, SUMOTime time)
 
void routeOutput (OutputDevice &os) const
 Called on writing vehroute output. More...
 
void setDeparted (SUMOTime now)
 logs depart time of the current stage More...
 
void tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output. More...
 
virtual ~MSPerson ()
 destructor More...
 

Protected Attributes

const SUMOVehicleParametermyParameter
 the plan of the transportable More...
 
MSTransportablePlanmyPlan
 the plan of the transportable More...
 
MSTransportablePlan::iterator myStep
 the iterator over the route More...
 
const MSVehicleTypemyVType
 This transportable's type. (mainly used for drawing related information Note sure if it is really necessary. More...
 
bool myWriteEvents
 Whether events shall be written. More...
 

Private Member Functions

 MSPerson (const MSPerson &)
 Invalidated copy constructor. More...
 
MSPersonoperator= (const MSPerson &)
 Invalidated assignment operator. More...
 

Detailed Description

The class holds a simulated person together with her movement stages

Definition at line 70 of file MSPerson.h.

Member Typedef Documentation

the structure holding the plan of a transportable

Definition at line 196 of file MSTransportable.h.

Member Enumeration Documentation

Enumerator
DRIVING 
WAITING 
MOVING_WITHOUT_VEHICLE 

Definition at line 57 of file MSTransportable.h.

Constructor & Destructor Documentation

MSPerson::MSPerson ( const SUMOVehicleParameter pars,
const MSVehicleType vtype,
MSTransportable::MSTransportablePlan plan 
)

constructor

Definition at line 480 of file MSPerson.cpp.

MSPerson::~MSPerson ( )
virtual

destructor

Definition at line 485 of file MSPerson.cpp.

MSPerson::MSPerson ( const MSPerson )
private

Invalidated copy constructor.

Member Function Documentation

std::string MSTransportable::getCurrentStageDescription ( ) const
inlineinherited

Returns the current stage description as a string.

Definition at line 266 of file MSTransportable.h.

Referenced by GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), and MSXMLRawOut::writeTransportable().

StageType MSTransportable::getCurrentStageType ( ) const
inlineinherited
SUMOTime MSTransportable::getDesiredDepart ( ) const
inherited
const MSEdge& MSTransportable::getDestination ( ) const
inlineinherited
const MSEdge* MSTransportable::getEdge ( ) const
inlineinherited
SUMOReal MSTransportable::getEdgePos ( ) const
virtualinherited
const std::string & MSTransportable::getID ( ) const
inherited

returns the id of the transportable

Definition at line 112 of file MSTransportable.cpp.

References SUMOVehicleParameter::id, and MSTransportable::myParameter.

Referenced by MSContainerControl::abortWaiting(), MSPersonControl::abortWaiting(), MSVehicle::addContainer(), MSVehicle::addPerson(), MSPerson::MSPersonStage_Walking::beginEventOutput(), MSContainer::MSContainerStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Driving::beginEventOutput(), MSContainer::MSContainerStage_Tranship::beginEventOutput(), MSPerson::MSPersonStage_Waiting::beginEventOutput(), MSPerson::MSPersonStage_Walking::endEventOutput(), MSContainer::MSContainerStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Waiting::endEventOutput(), MSPerson::MSPersonStage_Driving::endEventOutput(), MSContainer::MSContainerStage_Tranship::endEventOutput(), MSPerson::MSPersonStage_Waiting::endEventOutput(), MSContainerControl::erase(), MSPersonControl::erase(), MSPModel_Striping::MovePedestrians::execute(), MSPModel_Striping::getNeighboringObstacles(), MSPModel_Striping::getNextLane(), MSPModel_Striping::getNextLaneObstacles(), GUIContainer::getParameterWindow(), GUIPerson::getParameterWindow(), MSPedestrianPushButton::isActiveForEdge(), MSPModel_Striping::moveInDirection(), MSPModel_Striping::moveInDirectionOnLane(), MSPModel_Striping::PState::moveToNextLane(), MSDevice_Transportable::notifyLeave(), MSPModel_Striping::by_xpos_sorter::operator()(), MSEdge::transportable_by_position_sorter::operator()(), MSContainer::MSContainerStage_Driving::proceed(), MSPerson::MSPersonStage_Driving::proceed(), MSPModel_Striping::PState::PState(), MSContainer::MSContainerStage_Driving::routeOutput(), MSContainer::MSContainerStage_Waiting::routeOutput(), MSPerson::MSPersonStage_Driving::routeOutput(), MSPerson::MSPersonStage_Waiting::routeOutput(), MSContainerControl::setTranship(), MSPersonControl::setWalking(), MSContainerControl::unsetTranship(), MSPersonControl::unsetWalking(), MSPModel_Striping::PState::walk(), MSFCDExport::writeTransportable(), and MSXMLRawOut::writeTransportable().

const MSEdge& MSTransportable::getNextDestination ( ) const
inlineinherited

Returns the destination after the current destination.

Definition at line 231 of file MSTransportable.h.

References MSTransportable::myStep.

const std::string & MSPerson::getNextEdge ( ) const

return the list of internal edges if this person is walking and the pedestrian model allows it

Definition at line 526 of file MSPerson.cpp.

References StringUtils::emptyString, Named::getID(), and getNextEdgePtr().

const MSEdge * MSPerson::getNextEdgePtr ( ) const

returns the next edge ptr if this person is walking and the pedestrian model allows it

Definition at line 544 of file MSPerson.cpp.

References MSTransportable::getCurrentStageType(), PedestrianState::getNextEdge(), MSPerson::MSPersonStage_Walking::getPedestrianState(), and MSTransportable::MOVING_WITHOUT_VEHICLE.

Referenced by getNextEdge(), and MSPedestrianPushButton::isActiveForEdge().

Position MSTransportable::getPosition ( ) const
virtualinherited
SUMOReal MSTransportable::getSpeed ( ) const
virtualinherited

the current speed of the transportable

Reimplemented in GUIPerson, and GUIContainer.

Definition at line 147 of file MSTransportable.cpp.

Referenced by GUIContainer::getSpeed(), GUIPerson::getSpeed(), TraCIServerAPI_Person::processGet(), and MSFCDExport::writeTransportable().

SUMOVehicle* MSTransportable::getVehicle ( ) const
inlineinherited

The vehicle associated with this transportable.

Definition at line 300 of file MSTransportable.h.

SUMOReal MSTransportable::getWaitingSeconds ( ) const
virtualinherited
bool MSTransportable::isWaiting4Vehicle ( ) const
inlineinherited

Whether the transportable waits for a vehicle.

Definition at line 295 of file MSTransportable.h.

Referenced by GUIContainer::drawGL(), GUIPerson::drawGL(), GUIContainer::getColorValue(), and GUIPerson::getColorValue().

bool MSTransportable::isWaitingFor ( const std::string &  line) const
inlineinherited

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

Definition at line 290 of file MSTransportable.h.

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

Invalidated assignment operator.

void MSPerson::routeOutput ( OutputDevice os) const
virtual

Called on writing vehroute output.

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

Implements MSTransportable.

Definition at line 515 of file MSPerson.cpp.

References MSTransportable::getDesiredDepart(), MSPerson::MSPersonStage_Waiting::getUntil(), MSTransportable::myPlan, and MSTransportable::WAITING.

void MSTransportable::setDeparted ( SUMOTime  now)
inherited

logs depart time of the current stage

Definition at line 122 of file MSTransportable.cpp.

References SUMOReal.

void MSTransportable::tripInfoOutput ( OutputDevice os) const
inherited

Called on writing tripinfo output.

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

Definition at line 153 of file MSTransportable.cpp.

References MSTransportable::myPlan.

Referenced by MSContainerControl::erase(), and MSPersonControl::erase().

Field Documentation

const SUMOVehicleParameter* MSTransportable::myParameter
protectedinherited
MSTransportablePlan::iterator MSTransportable::myStep
protectedinherited
const MSVehicleType* MSTransportable::myVType
protectedinherited

This transportable's type. (mainly used for drawing related information Note sure if it is really necessary.

Definition at line 310 of file MSTransportable.h.

Referenced by GUIPerson::getParameterWindow(), and MSTransportable::getVehicleType().

bool MSTransportable::myWriteEvents
protectedinherited

Whether events shall be written.

Definition at line 313 of file MSTransportable.h.


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