Menge
Modular Pedestrian Simulation Framework for Research and Development
|
Defines the simulator operating on ORCA::Agent. More...
#include <PedVOSimulator.h>
Public Member Functions | |
Simulator () | |
Constructor. | |
Public Member Functions inherited from Menge::Agents::SimulatorBase< Agent > | |
SimulatorBase () | |
Constructs a simulator instance. | |
~SimulatorBase () | |
Destorys a simulator instance. | |
void | doStep () |
Lets the simulator perform a simulation step and updates the two-dimensional _p and two-dimensional velocity of each agent. | |
virtual bool | initSpatialQuery () |
Initalize spatial query structure. | |
virtual void | finalize () |
After all agents and all obstacles have been added to the scene does the work to finish preparing the simulation to be run. More... | |
virtual BaseAgent * | getAgent (size_t agentNo) |
Accessor for agents. More... | |
virtual const BaseAgent * | getAgent (size_t agentNo) const |
Const accessor for agents. More... | |
virtual BaseAgent * | addAgent (const Vector2 &pos, AgentInitializer *agentInit) |
Add an agent with specified position to the simulator whose properties are defined by the given agent initializer. More... | |
virtual size_t | getNumAgents () const |
Returns the count of agents in the simulation. More... | |
virtual bool | hasExpTarget () |
Reports if there are non-common Experiment parameters that this simulator requires in the XML file. More... | |
virtual bool | isExpTarget (const std::string &tagName) |
Reports if the given Experiment attribute tag name belongs to this simulator. More... | |
virtual bool | setExpParam (const std::string ¶mName, const std::string &value) throw ( XMLParamException ) |
Given an Experiment parameter name and value, sets the appropriate simulator parameter. More... | |
Public Member Functions inherited from Menge::Agents::SimulatorInterface | |
SimulatorInterface () | |
Default constructor. | |
virtual | ~SimulatorInterface () |
Destructor. | |
float | getGlobalTime () const |
Returns the global time of the simulation. More... | |
void | setTimeStep (float timeStep) |
Sets the time step of the simulation. More... | |
void | setSubSteps (size_t subSteps) |
Sets the number of intermediate computation sub steps to take. More... | |
float | getTimeStep () const |
Returns the logical time step of the simulation. More... | |
float | getElevation (const BaseAgent *agent) const |
Returns the elevation of the given agent. More... | |
float | getElevation (const Vector2 &point) const |
Returns the elevation of the x-z position. More... | |
void | setElevationInstance (Elevation *elevation) |
Set the elevation instance of the simulator. More... | |
Elevation * | getElevationInstance () |
Set the elevation instance of the simulator. More... | |
bool | hasElevation () const |
Reports if the elevation has been set. More... | |
void | setSpatialQuery (SpatialQuery *spatialQuery) |
Sets the spatial query instance of the simulator. More... | |
SpatialQuery * | getSpatialQuery () |
get the spatial query instance of the simulator. More... | |
bool | hasSpatialQuery () const |
Reports if the spatial query has been set. More... | |
bool | queryVisibility (const Vector2 &point1, const Vector2 &point2, float radius=0.0f) const |
Performs a visibility query between the two specified points with respect to the obstacles. More... | |
size_t | getSubSteps () const |
Reports the number of simulation substeps to take. More... | |
Public Member Functions inherited from Menge::Agents::XMLSimulatorBase | |
XMLSimulatorBase () | |
Constructor. | |
~XMLSimulatorBase () | |
Destructor. | |
SimulatorState * | getInitialState () |
Returns a pointer to the simulator's initial state. More... | |
Static Protected Attributes | |
static float | COS_OBST_TURN = 1.f |
The cosine of the threshold angle beyond which the constraints should be tilted. If the dot product between the preferred direction and the constraint's normal is greater than or equal then this threshhold, the obstacle is tilted. More... | |
static float | SIN_OBST_TURN = 0.f |
The sine of the threshold angle beyond which the constraints should be tilted. Used in conjunction with COS_OBST_TURN to perform the minmum tilt. | |
Static Protected Attributes inherited from Menge::Agents::SimulatorInterface | |
static float | LOGICAL_TIME_STEP = 0.1f |
The logical simulation time step. The simulation's state is communicated to the outside world at this time step. In practice, sub-steps can decrease the effective time step. | |
static float | TIME_STEP = 0.1f |
The effective simulation time step - takes into account time step and computation sub-steps. | |
static size_t | SUB_STEPS = 0 |
The number of intermediate steps taken between subsequent simulation time steps. | |
Friends | |
class | Agent |
Additional Inherited Members | |
Protected Member Functions inherited from Menge::Agents::SimulatorBase< Agent > | |
void | computeNeighbors (Agent *agent) |
Computes the neighbors for the given agent. More... | |
Protected Member Functions inherited from Menge::Agents::SimulatorInterface | |
void | updateEffTimeStep () |
Updates the effective time step – how large an actual simulation time step is due to computation sub-steps. | |
Protected Attributes inherited from Menge::Agents::SimulatorBase< Agent > | |
std::vector< Agent > | _agents |
The collection of agents in the simulation. | |
Protected Attributes inherited from Menge::Agents::SimulatorInterface | |
float | _globalTime |
The total accumulated simulation time. | |
Elevation * | _elevation |
Data structure for reporting the elevation data of agents. This allows the simulation to be more than 2D (and more than topologically planar.) | |
SpatialQuery * | _spatialQuery |
The data structure used to perform spatial queries. | |
Protected Attributes inherited from Menge::Agents::XMLSimulatorBase | |
SimulatorState * | _initState |
The initial state of the simulator. | |
Defines the simulator operating on ORCA::Agent.
|
staticprotected |
The cosine of the threshold angle beyond which the constraints should be tilted. If the dot product between the preferred direction and the constraint's normal is greater than or equal then this threshhold, the obstacle is tilted.
This is also used to perform the minimum rotation.