44 #ifndef __SIMULATOR_INTERFACE_H__
45 #define __SIMULATOR_INTERFACE_H__
83 virtual size_t getNumAgents()
const = 0;
94 virtual BaseAgent * getAgent(
size_t agentNo ) = 0;
105 virtual const BaseAgent * getAgent(
size_t agentNo )
const = 0;
112 virtual void doStep() = 0;
124 virtual void finalize();
139 inline void setTimeStep(
float timeStep) { LOGICAL_TIME_STEP = timeStep; updateEffTimeStep(); }
150 inline void setSubSteps(
size_t subSteps) { SUB_STEPS = subSteps; updateEffTimeStep(); }
165 float getElevation(
const BaseAgent * agent )
const;
173 float getElevation(
const Vector2 & point )
const;
180 void setElevationInstance(
Elevation * elevation );
235 bool queryVisibility(
const Vector2& point1,
const Vector2& point2,
float radius = 0.0f)
const;
291 #endif // __SIMULATOR_INTERFACE_H__
static size_t SUB_STEPS
The number of intermediate steps taken between subsequent simulation time steps.
Definition: SimulatorInterface.h:270
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
SpatialQuery * getSpatialQuery()
get the spatial query instance of the simulator.
Definition: SimulatorInterface.h:208
Sets up the proper compiler directives for platform and dll export/import.
float SIM_TIME_STEP
The simulation time step.
Definition: Core.cpp:49
float getGlobalTime() const
Returns the global time of the simulation.
Definition: SimulatorInterface.h:131
bool hasElevation() const
Reports if the elevation has been set.
Definition: SimulatorInterface.h:194
static float LOGICAL_TIME_STEP
The logical simulation time step. The simulation's state is communicated to the outside world at this...
Definition: SimulatorInterface.h:258
void setSubSteps(size_t subSteps)
Sets the number of intermediate computation sub steps to take.
Definition: SimulatorInterface.h:150
The basic simulator interface required by the fsm.
Definition: SimulatorInterface.h:66
bool hasSpatialQuery() const
Reports if the spatial query has been set.
Definition: SimulatorInterface.h:215
static float TIME_STEP
The effective simulation time step - takes into account time step and computation sub-steps...
Definition: SimulatorInterface.h:264
Definition: AgentGenerator.h:52
float _globalTime
The total accumulated simulation time.
Definition: SimulatorInterface.h:275
Definition of a vector in R2.
size_t getSubSteps() const
Reports the number of simulation substeps to take.
Definition: SimulatorInterface.h:242
void updateEffTimeStep()
Updates the effective time step – how large an actual simulation time step is due to computation sub...
Definition: SimulatorInterface.h:251
The set of operations used by SimXMLLoader to apply XML-parsed experiment specification to a simulato...
The base class for determining an agent's elevation.
Definition: Elevation.h:107
SpatialQuery * _spatialQuery
The data structure used to perform spatial queries.
Definition: SimulatorInterface.h:287
float getTimeStep() const
Returns the logical time step of the simulation.
Definition: SimulatorInterface.h:157
The base class for performing spatial queries.
Definition: SpatialQuery.h:114
Elevation * getElevationInstance()
Set the elevation instance of the simulator.
Definition: SimulatorInterface.h:187
Defines the basic agent properties and functionality that all simulation agents share.
Definition: BaseAgent.h:123
The base class for extracting simulator settings from the XML specification.
Definition: XMLSimulatorBase.h:126
The namespace that contains the basic simulation mechanisms.
A set of global variables for use by the entire finite state machine.
Elevation * _elevation
Data structure for reporting the elevation data of agents. This allows the simulation to be more than...
Definition: SimulatorInterface.h:282
void setTimeStep(float timeStep)
Sets the time step of the simulation.
Definition: SimulatorInterface.h:139