Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The weighted goal selector selects a goal from a goal set with weighted probability (i.e., it uses the user-specified goal weights). More...
#include <GoalSelectorWeighted.h>
Public Member Functions | |
virtual Goal * | getGoal (const Agents::BaseAgent *agent) const |
Interface function for acquiring per-agent goals. More... | |
Public Member Functions inherited from Menge::BFSM::SetGoalSelector | |
SetGoalSelector () | |
Default constructor. | |
void | setGoalSet (std::map< size_t, GoalSet * > &goalSets) |
Gives the instance the opportunity to set the goal set. More... | |
void | setGoalSetID (size_t id) |
Sets the goal set identifier. More... | |
Public Member Functions inherited from Menge::BFSM::GoalSelector | |
GoalSelector () | |
Default constructor. | |
Goal * | assignGoal (const Agents::BaseAgent *agent) |
Uses the goal selector to assign a goal to the given agent. More... | |
void | freeGoal (const Agents::BaseAgent *agent, Goal *goal) |
Informs the goal selector that the agent is done with the goal. More... | |
void | setPersistence (bool state) |
Sets the persistence of the goal. More... | |
bool | getPersistence () const |
Reports the persistence of the goal. More... | |
Public Member Functions inherited from Menge::Element | |
void | destroy () |
This supplants the destructor. More... | |
virtual BFSM::Task * | getTask () |
Return an optional task associated with this element. More... | |
virtual SceneGraph::GLNode * | getSGNode () |
Returns an optional visualization element associated with the element. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Menge::BFSM::SetGoalSelector | |
virtual void | lockResources () |
Allows the goal selector to lock any resources it requires. More... | |
virtual void | releaseResources () |
Allows the goal selector to release previously locked resources. More... | |
Protected Member Functions inherited from Menge::BFSM::GoalSelector | |
virtual | ~GoalSelector () |
Default virtual destructor. | |
Protected Attributes inherited from Menge::BFSM::SetGoalSelector | |
union { | |
size_t _goalSetID | |
The identifier for the goal set. | |
GoalSet * _goalSet | |
The pointer to the goal set. | |
}; | |
The goal set associated with this goal selector. During parsing, it contains the id of the goal set. After FSM construction, it contains a pointer to the actual goal set. | |
Protected Attributes inherited from Menge::BFSM::GoalSelector | |
bool | _persistent |
Determines if the GoalSelector maintains persistent goals. More... | |
HASH_MAP< size_t, Goal * > | _assignedGoals |
A mapping from agent id to assigned goals. This will only contain meaningful values in one of two cases: More... | |
ReadersWriterLock | _lock |
The lock to maintain readers-writer access to the _assignedGoals. | |
The weighted goal selector selects a goal from a goal set with weighted probability (i.e., it uses the user-specified goal weights).
|
virtual |
Interface function for acquiring per-agent goals.
agent | The agent for whom a goal is extracted. |
Implements Menge::BFSM::GoalSelector.