actionsΒΆ
This page describes the directory actions
The directory actions
contains classes pertaining to agent actions.
Action.h
for code that should be executed at the various phases of the simulation:virtual preLoop()
Code to be executed before the loop starts
virtual initialize(float fTime)
Code to be executed at the beginning of each simulation step
virtual int execute(int iAgentIndex, float fT)
Code for the action itself. This method must be implemented with care, because it will run in parallel for all agents.
virtual int finalize()
Code to be executed at the end of the simulations step, i.e. after the call to
execute()
.virtual int postLoop()
Code to be executed at the end of the simulation.
There are various other methods that can be implemented (see Action)
An action can have an arbitrary number of attributes (numeric values, arrays, or strings), such as birth-rates, onset of fertility, or altitude preferences. The attributes for an action are passed to QHG by means of an XML-file.
Action Base Class
Movement
Birth & Death
Nourishment and growth
Evaluators
Various