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

#include <MSPerson.h>

Data Structures

class  MSPersonStage
class  MSPersonStage_Driving
class  MSPersonStage_Waiting
class  MSPersonStage_Walking

Public Types

typedef std::vector
< MSPersonStage * > 
MSPersonPlan
 the structure holding the plan of a person

Public Member Functions

SUMOTime getDesiredDepart () const
 Returns the desired departure time.
const MSEdgegetDestination () const
 Returns the current destination.
const std::string & getID () const
 returns the person id
bool isWaitingFor (const std::string &line) const
 Whether the person waits for a vehicle of the line specified.
 MSPerson (const SUMOVehicleParameter *pars, MSPersonPlan *plan)
 constructor
void proceed (MSNet *net, SUMOTime time)
 proceeds to the next step of the route
void setDeparted (SUMOTime now)
 logs end of the step
void tripInfoOutput (OutputDevice &os) const
 Called on writing tripinfo output.
 ~MSPerson ()
 destructor

Private Member Functions

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

Private Attributes

const SUMOVehicleParametermyParameter
 the plan of the person
MSPersonPlanmyPlan
 the plan of the person
MSPersonPlan::iterator myStep
 the iterator over the route

Detailed Description

The class holds a simulated person together with her movement stages

Definition at line 60 of file MSPerson.h.

Member Typedef Documentation

typedef std::vector<MSPersonStage*> MSPerson::MSPersonPlan

the structure holding the plan of a person

Definition at line 230 of file MSPerson.h.

Constructor & Destructor Documentation

MSPerson::MSPerson ( const SUMOVehicleParameter pars,
MSPersonPlan plan 
)

constructor

Definition at line 196 of file MSPerson.cpp.

References myPlan, and myStep.

MSPerson::~MSPerson ( )

destructor

Definition at line 202 of file MSPerson.cpp.

References myParameter, and myPlan.

MSPerson::MSPerson ( const MSPerson )
private

Invalidated copy constructor.

Member Function Documentation

SUMOTime MSPerson::getDesiredDepart ( ) const

Returns the desired departure time.

Definition at line 231 of file MSPerson.cpp.

References SUMOVehicleParameter::depart, and myParameter.

Referenced by MSPersonControl::erase().

const MSEdge & MSPerson::getDestination ( ) const

Returns the current destination.

Definition at line 243 of file MSPerson.cpp.

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

returns the person id

Definition at line 212 of file MSPerson.cpp.

References SUMOVehicleParameter::id, and myParameter.

Referenced by MSPersonControl::erase().

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

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

Definition at line 257 of file MSPerson.cpp.

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

Invalidated assignment operator.

void MSPerson::proceed ( MSNet net,
SUMOTime  time 
)

proceeds to the next step of the route

Definition at line 218 of file MSPerson.cpp.

References MSPersonControl::erase(), MSNet::getPersonControl(), myPlan, and myStep.

void MSPerson::setDeparted ( SUMOTime  now)

logs end of the step

Definition at line 237 of file MSPerson.cpp.

void MSPerson::tripInfoOutput ( OutputDevice os) const

Called on writing tripinfo output.

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

Definition at line 249 of file MSPerson.cpp.

References myPlan.

Referenced by MSPersonControl::erase().

Field Documentation

const SUMOVehicleParameter* MSPerson::myParameter
private

the plan of the person

Definition at line 234 of file MSPerson.h.

Referenced by getDesiredDepart(), getID(), and ~MSPerson().

MSPersonPlan* MSPerson::myPlan
private

the plan of the person

Definition at line 237 of file MSPerson.h.

Referenced by MSPerson(), proceed(), tripInfoOutput(), and ~MSPerson().

MSPersonPlan::iterator MSPerson::myStep
private

the iterator over the route

Definition at line 240 of file MSPerson.h.

Referenced by MSPerson(), and proceed().


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