Menge Plugin Examples
A Collection of Example Plugins for the Menge Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Classes | Public Member Functions | Protected Attributes | Friends | List of all members
FDModifier::FDModifier Class Reference

Velocity modifier that adapts preferred velocity to account for local density. This produces a density-dependent behavior which can conform to the fundamental diagram (depending on the settings.) More...

#include <FundamentalDiagramModifier.h>

Inheritance diagram for FDModifier::FDModifier:

Classes

struct  FDParam
 Defines the parameters which define the density-aware behavior. More...
 

Public Member Functions

 FDModifier ()
 Constructor.
 
 FDModifier (FloatGenerator *buffer, FloatGenerator *factor, float sigmaAgent, float sigmaObstacle)
 Constructor. More...
 
BFSM::VelModifier * copy () const
 Copy method for this velocity modifier.
 
void adaptPrefVelocity (const Agents::BaseAgent *agent, Agents::PrefVelocity &pVel)
 Adapts the given agent's preferred velocity to adhere to the fundamental diagram. More...
 
void setBuffer (FloatGenerator *buffer)
 Sets the stride buffer. More...
 
void setFactor (FloatGenerator *factor)
 Sets the stride factor. More...
 
void setSigmaAgent (float sigma)
 Sets the agent sigma. More...
 
void setSigmaObstacle (float sigma)
 Sets the agent sigma. More...
 

Protected Attributes

SimpleLock _paramLock
 The readers-writer lock to preserve thread-safety on _strideParams.
 
HASH_MAP< size_t, FDParam_strideParams
 The per-agent parameters.
 
FloatGenerator * _bufferGen
 The Stride buffer value generator.
 
FloatGenerator * _factorGen
 The Stride factor value generator.
 
float _sigmaAgent
 Agent sigma for density calculation.
 
float _sigmaObstacle
 Sigma for obstacle density estimation.
 

Friends

class FDModifierFactory
 

Detailed Description

Velocity modifier that adapts preferred velocity to account for local density. This produces a density-dependent behavior which can conform to the fundamental diagram (depending on the settings.)

Constructor & Destructor Documentation

FDModifier::FDModifier::FDModifier ( FloatGenerator *  buffer,
FloatGenerator *  factor,
float  sigmaAgent,
float  sigmaObstacle 
)

Constructor.

Parameters
bufferThe stride buffer gemerator. This modifier takes ownership of the provided generator.
factorThe stride factor gemerator. This modifier takes ownership of the provided generator.
sigmaAgentSigma for agent density estimation
sigmaObstacleSigma for obstacle density estimation

Member Function Documentation

void FDModifier::FDModifier::adaptPrefVelocity ( const Agents::BaseAgent *  agent,
Agents::PrefVelocity &  pVel 
)

Adapts the given agent's preferred velocity to adhere to the fundamental diagram.

Parameters
agentThe agent on whom we are operating.
pVelThe input preferred velocity of the agent.
void FDModifier::FDModifier::setBuffer ( FloatGenerator *  buffer)
inline

Sets the stride buffer.

Parameters
bufferThe stride buffer for the adherence model
void FDModifier::FDModifier::setFactor ( FloatGenerator *  factor)
inline

Sets the stride factor.

Parameters
factorThe stride factor for the adherence model
void FDModifier::FDModifier::setSigmaAgent ( float  sigma)
inline

Sets the agent sigma.

Parameters
sigmaSigma for agent density estimation
void FDModifier::FDModifier::setSigmaObstacle ( float  sigma)
inline

Sets the agent sigma.

Parameters
sigmaObstacle sigma for Probability Density Estimation

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