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

#include <Person.h>

Collaboration diagram for libsumo::Person:

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 appendStage (const TraCIStage &stage, const std::string &personID)
 
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 TraCIPosition getPosition3D (const std::string &personID)
 
static int getRemainingStages (const std::string &personID)
 
static std::string getRoadID (const std::string &personID)
 
static double getSlope (const std::string &personID)
 
static double getSpeed (const std::string &personID)
 
static TraCIStage 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=INVALID_DOUBLE_VALUE, const int keepRoute=1)
 
static void removeStage (const std::string &personID, int nextStageIndex)
 
static void replaceStage (const std::string &personID, const int stageIndex, const TraCIStage &stage)
 
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 MSTransportable::StageconvertTraCIStage (const TraCIStage &stage, const std::string personID)
 
static MSPersongetPerson (const std::string &id)
 

Static Private Attributes

static ContextSubscriptionResults myContextSubscriptionResults
 
static SubscriptionResults mySubscriptionResults
 

Detailed Description

Definition at line 51 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

◆ appendStage()

void Person::appendStage ( const TraCIStage stage,
const std::string &  personID 
)
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

◆ convertTraCIStage()

◆ getAngle()

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

Definition at line 87 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()

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

Definition at line 118 of file Person.cpp.

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

Referenced by handleVariable().

◆ getNextEdge()

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

Definition at line 148 of file Person.cpp.

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

Referenced by handleVariable().

◆ getParameter()

std::string Person::getParameter ( const std::string &  routeID,
const std::string &  param 
)
static

◆ 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 getPosition3D(), handleVariable(), and storeShape().

◆ getPosition3D()

TraCIPosition Person::getPosition3D ( const std::string &  personID)
static

Definition at line 81 of file Person.cpp.

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

◆ getRemainingStages()

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

Definition at line 232 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 112 of file Person.cpp.

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

Referenced by handleVariable().

◆ getSlope()

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

◆ getSpeed()

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

Definition at line 106 of file Person.cpp.

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

Referenced by handleVariable().

◆ getStage()

◆ getTypeID()

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

◆ getVehicle()

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

Definition at line 238 of file Person.cpp.

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

Referenced by handleVariable().

◆ getWaitingTime()

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

Definition at line 142 of file Person.cpp.

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

Referenced by handleVariable().

◆ handleVariable()

◆ makeWrapper()

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

◆ 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

◆ replaceStage()

void Person::replaceStage ( const std::string &  personID,
const int  stageIndex,
const TraCIStage stage 
)
static

◆ rerouteTraveltime()

◆ setParameter()

void Person::setParameter ( const std::string &  personID,
const std::string &  key,
const std::string &  value 
)
static

untested setter functions which alter the person's vtype

Definition at line 834 of file Person.cpp.

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

Referenced by TraCIServerAPI_Person::processSet().

◆ setSpeed()

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

Definition at line 378 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 976 of file Person.cpp.

References getPerson(), and getPosition().

Referenced by libsumo::Helper::findObjectShape().

Field Documentation

◆ myContextSubscriptionResults

ContextSubscriptionResults Person::myContextSubscriptionResults
staticprivate

Definition at line 107 of file Person.h.

Referenced by makeWrapper().

◆ mySubscriptionResults

SubscriptionResults Person::mySubscriptionResults
staticprivate

Definition at line 106 of file Person.h.

Referenced by makeWrapper().


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