![]() |
Indian Ocean Skipjack
|
#include <procedures.hpp>
Public Member Functions | |
void | set (int lag) |
double | push_pop (double current) |
Class for lagging management control as in the real world
e.g. usually outputs need be be lagged by two years from data: data from year
, MP operated in year+1
, to set management control in year+2
Because the procedure is operated in year
, before the model is updated, it is using "data" (ie. model state) from year-1
, so an actual three year lag is represented here using using a queue of length 2.
|
inline |
Push a new value on to the lag queue and pop one off. This should be called in every year and will return NAN
for first lag
years.
|
inline |
Set the number of years in lag