Simulates the anticipatory behavior of an agent. More...
#include <Agent.h>
Inherits TTC::ProximityDatabaseItem.
Public Member Functions | |
Agent functionality | |
bool | isAgent () |
Returns true if the object is an agent, false if not. | |
bool | enabled () const |
Returns true if the agent is active. | |
Vector2D | position () const |
Returns the position of the agent. | |
Vector2D | velocity () const |
Returns the velocity of the agent. | |
Vector2D | goal () const |
Returns the goals of the agent. | |
Vector2D | vPref () const |
Returns the preferred velocity of the agent. | |
float | prefSpeed () const |
Returns the preferred speed of the agent. | |
float | maxAccel () const |
Returns the maximum acceleration of the agent. | |
float | radius () const |
Returns the radius of the agent. | |
int | id () const |
Returns the id of the agent. | |
void | setPreferredVelocity (const Vector2D &vPref) |
Sets the preferred velocity of the agent to a specific value. More... | |
![]() | |
virtual | ~ProximityDatabaseItem () |
Destructor. | |
Protected Member Functions | |
void | computeNeighbors () |
Computes the neighbors which will be considered for computing the anticipatory forces. | |
void | computeForces () |
Computes the forces exerted on the agent at each simulation step. More... | |
void | destroy () |
Destroy the agent. | |
Protected Attributes | |
Vector2D | _vPref |
the preferred velocity of the character | |
bool | _enabled |
Determine whether the charater is enabled;. | |
Vector2D | _position |
The position of the character. | |
Vector2D | _goal |
The goal of the character. | |
Vector2D | _velocity |
The velocity of the character. | |
float | _radius |
The radius of the character. | |
int | _id |
The id of the character. | |
float | _prefSpeed |
The preferred speed of the character. | |
float | _maxAccel |
The maximum acceleration of the character. | |
float | _goalRadiusSq |
The goal radius of the character. | |
ProximityToken * | _proximityToken |
a pointer to this interface object for the proximity database | |
std::vector < ProximityDatabaseItem * > | _proximityNeighbors |
The proximity neighbors. | |
float | _neighborDist |
The maximum distance from the agent at which an object will be considered. | |
Vector2D | _F |
The final force acting on the agent. | |
float | _k |
The scaling constant k of the anticipatory law. | |
float | _t0 |
The exponential cutoff term tau_0. | |
float | _m |
The exponent of the power law (m = 2 in our analysis) | |
float | _ksi |
Relaxation time for the driving force. | |
Simulates the anticipatory behavior of an agent.
|
inlineprotected |
Computes the forces exerted on the agent at each simulation step.
Our simulation model includes the following three forces:
|
inline |
Sets the preferred velocity of the agent to a specific value.
vpref | The new preferred velocity of the agent |