|
Gadget
|
This is the class used to store information about the timesteps used for the current model. More...
#include <areatime.h>

Public Member Functions | |
| TimeClass (CommentStream &infile, double maxratio) | |
| This is the TimeClass constructor. More... | |
| ~TimeClass () | |
| This is the TimeClass destructor. More... | |
| int | getSubStep () const |
| This will return the current substep of the model simulation. More... | |
| int | getStep () const |
| This will return the current step of the model simulation. More... | |
| int | getYear () const |
| This will return the current year of the model simulation. More... | |
| int | getTime () const |
| This will return the total number of timesteps that have taken place in the simulation from the start of the model simulation until the current timestep. More... | |
| int | getFirstStep () const |
| This will return the first step of the model simulation. More... | |
| int | getFirstYear () const |
| This will return the first year of the model simulation. More... | |
| int | getLastStep () const |
| This will return the last step of the model simulation. More... | |
| int | getLastYear () const |
| This will return the last year of the model simulation. More... | |
| double | getTimeStepSize () const |
| This will return the length of the current step of the model simulation as a proportion of the whole year. More... | |
| double | getTimeStepLength () const |
| This will return the length of the current step of the model simulation. More... | |
| int | calcSteps (int year, int step) const |
| This will return the total number of timesteps that have taken place in the simulation from the start of the model simulation until a specifed year and step. More... | |
| int | numTotalSteps () const |
| This will return the total number of timesteps in the model simulation. More... | |
| int | numSteps () const |
| This will return the number of steps in each year of the model simulation. More... | |
| void | IncrementTime () |
| This is the function that increases the timestep for the model simulation. More... | |
| int | isWithinPeriod (int year, int step) const |
| This is the function that will check to see if specified year and step are within the time period covered by the model simulation. More... | |
| void | Reset () |
| This is the function that resets the timestep to the beginning of the model simulation. More... | |
| int | numSubSteps () const |
| This will return the number of substeps in the current timestep of the model simulation. More... | |
| void | IncrementSubstep () |
| This is the function that increases the substep within the current timestep. More... | |
| int | didStepSizeChange () const |
| This is the function that will check to see if the length of the current timestep has changed from the previous timestep. More... | |
| double | getMaxRatioConsumed () const |
| This function will return the maximum ratio of any stock that can be consumed on the current substep. More... | |
Protected Attributes | |
| int | currentstep |
| This is the current step of the model simulation. More... | |
| int | currentyear |
| This is the current year of the model simulation. More... | |
| int | firstyear |
| This is the first year in the model simulation. More... | |
| int | firststep |
| This is the first step in the model simulation. More... | |
| int | lastyear |
| This is the last year in the model simulation. More... | |
| int | laststep |
| This is the last step in the model simulation. More... | |
| int | numtimesteps |
| This is the number of steps in a year in the model simulation. More... | |
| double | lengthofyear |
| This is the length of a year in the model simulation (should be 12) More... | |
| double | maxratioconsumed |
| This is the maximum ratio of stock that can be consumed in any given timestep. More... | |
| DoubleVector | timesteps |
| This is the DoubleVector of timesteps in each year. More... | |
| IntVector | numsubsteps |
| This is the IntVector of substeps in each step. More... | |
| int | currentsubstep |
| This is the current substep of the model simulation. More... | |
This is the class used to store information about the timesteps used for the current model.
This class keeps an index of the timesteps in the model. A step is a subdivision of a year, and is usually defined in terms of months, and is the same in each year of the model. A check is made to ensure that the total length of all the steps adds up to 12.
| TimeClass::TimeClass | ( | CommentStream & | infile, |
| double | maxratio | ||
| ) |
This is the TimeClass constructor.
| infile | is the CommentStream to read the time data from |
| maxratio | is the maximum ratio of a stock that will be consumed on any given timestep |
|
inline |
This is the TimeClass destructor.
|
inline |
This will return the total number of timesteps that have taken place in the simulation from the start of the model simulation until a specifed year and step.
| year | is the specified year |
| step | is the specified step |
| int TimeClass::didStepSizeChange | ( | ) | const |
This is the function that will check to see if the length of the current timestep has changed from the previous timestep.
|
inline |
This will return the first step of the model simulation.
|
inline |
This will return the first year of the model simulation.
|
inline |
This will return the last step of the model simulation.
|
inline |
This will return the last year of the model simulation.
| double TimeClass::getMaxRatioConsumed | ( | ) | const |
This function will return the maximum ratio of any stock that can be consumed on the current substep.
|
inline |
This will return the current step of the model simulation.
|
inline |
This will return the current substep of the model simulation.
|
inline |
This will return the total number of timesteps that have taken place in the simulation from the start of the model simulation until the current timestep.
|
inline |
This will return the length of the current step of the model simulation.
|
inline |
This will return the length of the current step of the model simulation as a proportion of the whole year.
|
inline |
This will return the current year of the model simulation.
|
inline |
This is the function that increases the substep within the current timestep.
| void TimeClass::IncrementTime | ( | ) |
This is the function that increases the timestep for the model simulation.
| int TimeClass::isWithinPeriod | ( | int | year, |
| int | step | ||
| ) | const |
This is the function that will check to see if specified year and step are within the time period covered by the model simulation.
| year | is the specified year |
| step | is the specified step |
|
inline |
This will return the number of steps in each year of the model simulation.
|
inline |
This will return the number of substeps in the current timestep of the model simulation.
|
inline |
This will return the total number of timesteps in the model simulation.
| void TimeClass::Reset | ( | ) |
This is the function that resets the timestep to the beginning of the model simulation.
|
protected |
This is the current step of the model simulation.
|
protected |
This is the current substep of the model simulation.
|
protected |
This is the current year of the model simulation.
|
protected |
This is the first step in the model simulation.
|
protected |
This is the first year in the model simulation.
|
protected |
This is the last step in the model simulation.
|
protected |
This is the last year in the model simulation.
|
protected |
This is the length of a year in the model simulation (should be 12)
|
protected |
This is the maximum ratio of stock that can be consumed in any given timestep.
|
protected |
This is the number of steps in a year in the model simulation.
|
protected |
This is the DoubleVector of timesteps in each year.