Gadget
|
This is the class used to associate actions with specific timesteps within the model. More...
#include <actionattimes.h>
Public Member Functions | |
ActionAtTimes () | |
This is the ActionAtTimes constructor. More... | |
~ActionAtTimes () | |
This is the ActionAtTimes destructor. More... | |
int | readFromFile (CommentStream &infile, const TimeClass *const TimeInfo) |
This is the function used to read in the action at times parameters. More... | |
void | addActions (const IntVector &years, const IntVector &steps, const TimeClass *const TimeInfo) |
This is the function used to add the action for a set of steps and years. More... | |
void | addActionsAllYears (const IntVector &steps, const TimeClass *const TimeInfo) |
This is the function used to add the action on all years for a set of steps. More... | |
void | addActionsAllSteps (const IntVector &years, const TimeClass *const TimeInfo) |
This is the function used to add the action on all steps for a set of years. More... | |
int | atCurrentTime (const TimeClass *const TimeInfo) const |
This is the function used to check whether an action takes place on the current timestep. More... | |
Protected Attributes | |
int | everyStep |
This is the flag if the action takes place on every timestep. More... | |
IntVector | TimeSteps |
This is the IntVector of the timesteps on which the action takes place. More... | |
IntVector | Years |
This is the IntVector of the years on which the action takes place. More... | |
IntVector | Steps |
This is the IntVector of the steps on which the action takes place. More... | |
This is the class used to associate actions with specific timesteps within the model.
This class is used to determine whether an action should take place on the current timestep in the model. The actions include changing the population of the stock (either by fishing from the stock or adding to the stock) calculating the score from a likelihood component or printing output from the model. This is done by storing a list of timesteps when the action takes place, and comparing it to the current timestep in the model.
|
inline |
This is the ActionAtTimes constructor.
|
inline |
This is the ActionAtTimes destructor.
int ActionAtTimes::atCurrentTime | ( | const TimeClass *const | TimeInfo | ) | const |
This is the function used to check whether an action takes place on the current timestep.
TimeInfo | is the TimeClass for the current model |
int ActionAtTimes::readFromFile | ( | CommentStream & | infile, |
const TimeClass *const | TimeInfo | ||
) |
This is the function used to read in the action at times parameters.
infile | is the CommentStream to read the actionattimes parameters from |
TimeInfo | is the TimeClass for the current model |
|
protected |
This is the flag if the action takes place on every timestep.
|
protected |
This is the IntVector of the steps on which the action takes place.
|
protected |
This is the IntVector of the timesteps on which the action takes place.
|
protected |
This is the IntVector of the years on which the action takes place.