SUMO - Simulation of Urban MObility
libsumo::Person Class Reference

#include <Person.h>

Collaboration diagram for libsumo::Person:
Collaboration graph

Static Public Member Functions

static LIBSUMO_VEHICLE_TYPE_GETTER void add (const std::string &personID, const std::string &edgeID, double pos, double depart=DEPARTFLAG_NOW, const std::string typeID="DEFAULT_PEDTYPE")
 
static void appendDrivingStage (const std::string &personID, const std::string &toEdge, const std::string &lines, const std::string &stopID="")
 
static void appendWaitingStage (const std::string &personID, double duration, const std::string &description="waiting", const std::string &stopID="")
 
static void appendWalkingStage (const std::string &personID, const std::vector< std::string > &edgeIDs, double arrivalPos, double duration=-1, double speed=-1, const std::string &stopID="")
 
static double getAngle (const std::string &personID)
 
static std::vector< std::string > getEdges (const std::string &personID, int nextStageIndex=0)
 
static int getIDCount ()
 
static std::vector< std::string > getIDList ()
 
static double getLanePosition (const std::string &personID)
 
static std::string getNextEdge (const std::string &personID)
 
static std::string getParameter (const std::string &routeID, const std::string &param)
 
static TraCIPosition getPosition (const std::string &personID, const bool includeZ=false)
 
static int getRemainingStages (const std::string &personID)
 
static std::string getRoadID (const std::string &personID)
 
static double getSpeed (const std::string &personID)
 
static int getStage (const std::string &personID, int nextStageIndex=0)
 
static std::string getTypeID (const std::string &personID)
 
static std::string getVehicle (const std::string &personID)
 
static double getWaitingTime (const std::string &personID)
 
static bool handleVariable (const std::string &objID, const int variable, VariableWrapper *wrapper)
 
static std::shared_ptr< VariableWrappermakeWrapper ()
 
static void moveTo (const std::string &personID, const std::string &edgeID, double position)
 
static void moveToXY (const std::string &personID, const std::string &edgeID, const double x, const double y, double angle, const int keepRouteFlag)
 
static void removeStage (const std::string &personID, int nextStageIndex)
 
static void rerouteTraveltime (const std::string &personID)
 
static void setParameter (const std::string &personID, const std::string &key, const std::string &value)
 
static void setSpeed (const std::string &personID, double speed)
 
static void setType (const std::string &personID, const std::string &typeID)
 
LIBSUMO_VEHICLE_TYPE_SETTER static LIBSUMO_SUBSCRIPTION_API void storeShape (const std::string &id, PositionVector &shape)
 Saves the shape of the requested object in the given container. More...
 

Private Member Functions

 Person ()=delete
 invalidated standard constructor More...
 

Static Private Member Functions

static MSPersongetPerson (const std::string &id)
 

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
 
static SubscriptionResults mySubscriptionResults
 

Detailed Description

Definition at line 50 of file Person.h.

Constructor & Destructor Documentation

◆ Person()

libsumo::Person::Person ( )
privatedelete

invalidated standard constructor

Member Function Documentation

◆ add()

◆ appendDrivingStage()

void Person::appendDrivingStage ( const std::string &  personID,
const std::string &  toEdge,
const std::string &  lines,
const std::string &  stopID = "" 
)
static

◆ appendWaitingStage()

void Person::appendWaitingStage ( const std::string &  personID,
double  duration,
const std::string &  description = "waiting",
const std::string &  stopID = "" 
)
static

◆ appendWalkingStage()

void Person::appendWalkingStage ( const std::string &  personID,
const std::vector< std::string > &  edgeIDs,
double  arrivalPos,
double  duration = -1,
double  speed = -1,
const std::string &  stopID = "" 
)
static

◆ getAngle()

double Person::getAngle ( const std::string &  personID)
static

Definition at line 81 of file Person.cpp.

References getPerson(), and GeomHelper::naviDegree().

Referenced by handleVariable().

◆ getEdges()

std::vector< std::string > Person::getEdges ( const std::string &  personID,
int  nextStageIndex = 0 
)
static

◆ getIDCount()

int Person::getIDCount ( )
static

◆ getIDList()

std::vector< std::string > Person::getIDList ( )
static

◆ getLanePosition()

◆ getNextEdge()

std::string Person::getNextEdge ( const std::string &  personID)
static

Definition at line 129 of file Person.cpp.

References MSPerson::getNextEdge(), and getPerson().

Referenced by handleVariable().

◆ getParameter()

◆ getPerson()

◆ getPosition()

TraCIPosition Person::getPosition ( const std::string &  personID,
const bool  includeZ = false 
)
static

Definition at line 75 of file Person.cpp.

References getPerson(), and libsumo::Helper::makeTraCIPosition().

Referenced by handleVariable(), and storeShape().

◆ getRemainingStages()

int Person::getRemainingStages ( const std::string &  personID)
static

Definition at line 165 of file Person.cpp.

References MSTransportable::getNumRemainingStages(), and getPerson().

Referenced by handleVariable().

◆ getRoadID()

std::string Person::getRoadID ( const std::string &  personID)
static

Definition at line 93 of file Person.cpp.

References MSTransportable::getEdge(), Named::getID(), and getPerson().

Referenced by handleVariable().

◆ getSpeed()

double Person::getSpeed ( const std::string &  personID)
static

Definition at line 87 of file Person.cpp.

References getPerson(), and MSTransportable::getSpeed().

Referenced by handleVariable().

◆ getStage()

int Person::getStage ( const std::string &  personID,
int  nextStageIndex = 0 
)
static

◆ getTypeID()

std::string Person::getTypeID ( const std::string &  personID)
static

◆ getVehicle()

std::string Person::getVehicle ( const std::string &  personID)
static

Definition at line 171 of file Person.cpp.

References SUMOVehicle::getID(), getPerson(), and MSTransportable::getVehicle().

Referenced by handleVariable().

◆ getWaitingTime()

double Person::getWaitingTime ( const std::string &  personID)
static

Definition at line 123 of file Person.cpp.

References getPerson(), and MSTransportable::getWaitingSeconds().

Referenced by handleVariable().

◆ handleVariable()

◆ makeWrapper()

std::shared_ptr< VariableWrapper > Person::makeWrapper ( )
static

Definition at line 814 of file Person.cpp.

References handleVariable(), myContextSubscriptionResults, and mySubscriptionResults.

◆ moveTo()

void Person::moveTo ( const std::string &  personID,
const std::string &  edgeID,
double  position 
)
static

◆ moveToXY()

◆ removeStage()

void Person::removeStage ( const std::string &  personID,
int  nextStageIndex 
)
static

◆ rerouteTraveltime()

◆ setParameter()

◆ setSpeed()

void Person::setSpeed ( const std::string &  personID,
double  speed 
)
static

Definition at line 307 of file Person.cpp.

References getPerson(), and MSTransportable::setSpeed().

Referenced by TraCIServerAPI_Person::processSet().

◆ setType()

void Person::setType ( const std::string &  personID,
const std::string &  typeID 
)
static

◆ storeShape()

void Person::storeShape ( const std::string &  id,
PositionVector shape 
)
static

Saves the shape of the requested object in the given container.

Parameters
idThe id of the poi to retrieve
shapeThe container to fill

Definition at line 808 of file Person.cpp.

References getPerson(), and getPosition().

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults Person::myContextSubscriptionResults
staticprivate

Definition at line 101 of file Person.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults Person::mySubscriptionResults
staticprivate

Definition at line 100 of file Person.h.

Referenced by makeWrapper().


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