Menge
Modular Pedestrian Simulation Framework for Research and Development
|
A class which caches the state of the simulator. More...
#include <SimulatorState.h>
Public Member Functions | |
SimulatorState () | |
Constructor. | |
void | setAgentState (size_t id, const std::string &stateName) |
Sets the state for the given agent. More... | |
const std::string | getAgentState (size_t id) const |
Reports the state name for the given agent. More... | |
Protected Attributes | |
HASH_MAP< size_t, std::string > | _agentStates |
A mapping from agent id to state name. | |
A class which caches the state of the simulator.
This version of the class is, as yet, incomplete. Ultimately, it will store all critical parameters of the simulator such that the simulation can be restarted from this state.
This version is currently used to determine agent's starting state.
const std::string Menge::Agents::SimulatorState::getAgentState | ( | size_t | id | ) | const |
Reports the state name for the given agent.
id | The identifier of the agent. |
void Menge::Agents::SimulatorState::setAgentState | ( | size_t | id, |
const std::string & | stateName | ||
) |
Sets the state for the given agent.
id | The identifier of the agent. |
stateName | The name of the state to which the agent belongs. |