A class to store the internal horizon.
More...
#include <VelocityHorizon.h>
A class to store the internal horizon.
◆ getIndexAfter()
unsigned int agent_model::VelocityHorizon::getIndexAfter |
( |
double |
s | ) |
|
|
inline |
Returns the index of the end point of the interval in which the position is
- Parameters
-
- Returns
- Index of the interval
◆ getIndexBefore()
unsigned int agent_model::VelocityHorizon::getIndexBefore |
( |
double |
s | ) |
|
|
inline |
Returns the index of the start point of the interval in which the position is
- Parameters
-
- Returns
- Index of the interval
◆ getSpeedAt()
double agent_model::VelocityHorizon::getSpeedAt |
( |
unsigned int |
i | ) |
|
|
inlineprotected |
Returns the minimum of the speed at the given index
- Parameters
-
- Returns
- Minimum speed
◆ init()
void agent_model::VelocityHorizon::init |
( |
double |
offset, |
|
|
unsigned int |
noOfElements |
|
) |
| |
|
inline |
Initializes the points container
- Parameters
-
offset | Position offset of the horizon |
noOfElements | Number of elements to be stored |
◆ mean()
double agent_model::VelocityHorizon::mean |
( |
double |
s0, |
|
|
double |
s1, |
|
|
double |
delta = 1.0 |
|
) |
| |
|
inline |
Calculates the mean speed within the given interval
- Parameters
-
s0 | Start of the interval |
s1 | End of the interval |
delta | A factor shifting the influence over the interval |
- Returns
- The mean value
◆ newPoint()
Creates a new point with the given index at the given position
- Parameters
-
- Returns
- The new point
◆ resetSpeedRule()
void agent_model::VelocityHorizon::resetSpeedRule |
( |
| ) |
|
|
inline |
Resets the set speed rules
◆ setMaxVelocity()
void agent_model::VelocityHorizon::setMaxVelocity |
( |
double |
v | ) |
|
|
inline |
Updates the maximum total velocity
- Parameters
-
◆ update()
void agent_model::VelocityHorizon::update |
( |
double |
s | ) |
|
|
inline |
Updates the horizon to the new reference position Removes all elements with a distance smaller than zero, except of the first one smaller than zero.
- Parameters
-
◆ updateContinuousPoint()
void agent_model::VelocityHorizon::updateContinuousPoint |
( |
double |
s, |
|
|
double |
v |
|
) |
| |
|
inline |
Updates the continuous velocity profile at the given point
- Parameters
-
s | Point to be set |
v | Velocity to be set |
◆ updateSpeedRuleInInterval()
void agent_model::VelocityHorizon::updateSpeedRuleInInterval |
( |
double |
s0, |
|
|
double |
s1, |
|
|
double |
v |
|
) |
| |
|
inline |
Updates the speed in the given interval if the speed is smaller than the already set speed
- Parameters
-
s0 | Start of the interval |
s1 | End of the interval |
v | Velocity to be set |
The documentation for this class was generated from the following file: