SimDriver  0.1
Classes | Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
agent_model::StopHorizon Class Reference

Classes

struct  _StopPoint
 
struct  StopPoint
 a struct to store a stop point More...
 

Public Member Functions

void init (double s)
 
bool addStopPoint (unsigned long id, double sStop, double standingTime)
 
bool stopped (unsigned long id, double actualTime)
 
void update (double actualPosition, double actualTime)
 
StopPoint getNextStop ()
 

Protected Attributes

double _sActual = 0.0
 
std::map< unsigned long, _StopPoint_elements {}
 

Static Protected Attributes

static constexpr const double DELETE_AFTER_DISTANCE = 10.0
 Distance after which the stop point is deleted from the list.
 

Member Function Documentation

◆ addStopPoint()

bool agent_model::StopHorizon::addStopPoint ( unsigned long  id,
double  sStop,
double  standingTime 
)
inline

Adds a stop point to the list if it doesn't exist already

Parameters
idID of the stop
sStopAbsolute position of the stop
standingTimeThe time the vehicle shall stand at the given stop (inf: until reset)
Returns
Flag to indicate if the stop point was added

◆ getNextStop()

StopPoint agent_model::StopHorizon::getNextStop ( )
inline

Returns the next stop point

Returns

◆ init()

void agent_model::StopHorizon::init ( double  s)
inline

Inits the stop horizon

Parameters
sInitial distance

◆ stopped()

bool agent_model::StopHorizon::stopped ( unsigned long  id,
double  actualTime 
)
inline

Marks the given stop as stopped

Parameters
idID of the stop
actualTimeThe actual simulation time
Returns
Returns a flag whether the time was set or not

◆ update()

void agent_model::StopHorizon::update ( double  actualPosition,
double  actualTime 
)
inline

Updates the actual position

Parameters
actualPositionActual position
actualTimeActual simulation time

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