GetOld¶
This page describes the class GetOld
The class GetOld
is derived from Action
and simply calculates the age of the agent at each step, based on the agent’s birth time.
As it is, this action has no attributes besides its name.
- Code:
|
“GetOld” |
action name |
Public Methods¶
constructor
¶
GetOld(SPopulation<T> *pPop, SCellGrid *pCG, std::string sID, WELL512 **apWELL);
pPop
A pointer to the SPopulation object performing this action.
pCG
A pointer to the SCellGrid object on which the simulation runs.
sID
An ID for this action.
apWELL
A pointer to an array of WELL512 random number generators (one for each thread).
destructor
¶
virtual ~GetOld();
The destructor does nothing.
execute
¶
virtual int execute(int iAgentIndex, float fT);
iAgentIndex
Current agent’s index.
fT
Current simulation step.
This method is called for all agents (in parallel).
The age of each agent is increased by 1 year.
virtual bool isEqual(Action<T> *pAction, bool bStrict);
pAction
Pointer to an action object to compare with this.
bStrict
Strictness of comparisons (ignored here).
pAction
is equal to this
, if it is an GetOld
action.