Indian Ocean Skipjack
Public Member Functions | List of all members
IOSKJ::Lagger Class Reference

#include <procedures.hpp>

Inheritance diagram for IOSKJ::Lagger:

Public Member Functions

void set (int lag)
 
double push_pop (double current)
 

Detailed Description

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.

Member Function Documentation

double IOSKJ::Lagger::push_pop ( double  current)
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.

void IOSKJ::Lagger::set ( int  lag)
inline

Set the number of years in lag


The documentation for this class was generated from the following file: