This class represents a forecast value in a time bucket. More...
#include <forecast.h>

Public Member Functions | |
ForecastBucket (Forecast *f, Date d, Date e, double w, ForecastBucket *p) | |
virtual PyObject * | getattro (const Attribute &) |
double | getConsumed () const |
DateRange | getDueRange () const |
ForecastBucket * | getNextBucket () const |
ForecastBucket * | getPreviousBucket () const |
virtual size_t | getSize () const |
double | getTotal () const |
virtual const MetaClass & | getType () const |
double | getWeight () const |
void | incConsumed (double n) |
void | incTotal (double n) |
virtual int | setattro (const Attribute &, const PythonObject &) |
void | setConsumed (double n) |
void | setTotal (double n) |
void | setWeight (double n) |
Static Public Member Functions | |
static int | initialize () |
static void | setDueAtEndOfBucket (bool b) |
Static Public Attributes | |
static const MetaClass * | metadata |
Detailed Description
This class represents a forecast value in a time bucket.
A forecast bucket is never manipulated or created directly. Instead, the owning forecast manages the buckets.
Definition at line 1124 of file forecast.h.
Constructor & Destructor Documentation
module_forecast::ForecastBucket::ForecastBucket | ( | Forecast * | f, |
Date | d, | ||
Date | e, | ||
double | w, | ||
ForecastBucket * | p | ||
) | [inline] |
Definition at line 1127 of file forecast.h.
Member Function Documentation
PyObject * module_forecast::ForecastBucket::getattro | ( | const Attribute & | attr | ) | [virtual] |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::Demand.
Definition at line 160 of file pythonforecast.cpp.
double module_forecast::ForecastBucket::getConsumed | ( | ) | const [inline] |
Returns the consumed forecast.
Definition at line 1158 of file forecast.h.
DateRange module_forecast::ForecastBucket::getDueRange | ( | ) | const [inline] |
Return the date range for this bucket.
Definition at line 1208 of file forecast.h.
ForecastBucket* module_forecast::ForecastBucket::getNextBucket | ( | ) | const [inline] |
Return a pointer to the next forecast bucket.
Definition at line 1211 of file forecast.h.
ForecastBucket* module_forecast::ForecastBucket::getPreviousBucket | ( | ) | const [inline] |
Return a pointer to the previous forecast bucket.
Definition at line 1214 of file forecast.h.
virtual size_t module_forecast::ForecastBucket::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
Definition at line 1144 of file forecast.h.
double module_forecast::ForecastBucket::getTotal | ( | ) | const [inline] |
Returns the total, gross forecast.
Definition at line 1155 of file forecast.h.
virtual const MetaClass& module_forecast::ForecastBucket::getType | ( | ) | const [inline, virtual] |
This returns the type information on the object, a bit similar to the standard type_info information.
Reimplemented from frepple::Demand.
Definition at line 1142 of file forecast.h.
double module_forecast::ForecastBucket::getWeight | ( | ) | const [inline] |
Returns the relative weight of this forecast bucket when distributing forecast over different buckets.
Definition at line 1152 of file forecast.h.
void module_forecast::ForecastBucket::incConsumed | ( | double | n | ) | [inline] |
Increment the consumed forecast.
Definition at line 1187 of file forecast.h.
void module_forecast::ForecastBucket::incTotal | ( | double | n | ) | [inline] |
Increment the total, gross forecast.
Definition at line 1169 of file forecast.h.
int module_forecast::ForecastBucket::initialize | ( | ) | [static] |
Reimplemented from frepple::Demand.
Definition at line 59 of file forecast.cpp.
int module_forecast::ForecastBucket::setattro | ( | const Attribute & | attr, |
const PythonObject & | field | ||
) | [virtual] |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::Demand.
Definition at line 176 of file pythonforecast.cpp.
void module_forecast::ForecastBucket::setConsumed | ( | double | n | ) | [inline] |
Update the consumed forecast.
This field is normally updated through the forecast netting solver, but you can use this method to update it directly.
Definition at line 1198 of file forecast.h.
static void module_forecast::ForecastBucket::setDueAtEndOfBucket | ( | bool | b | ) | [inline, static] |
A flag to mark whether forecast is due at the start or at the end of a bucket.
The default is false, ie due at the start of the bucket.
Definition at line 1220 of file forecast.h.
void module_forecast::ForecastBucket::setTotal | ( | double | n | ) | [inline] |
Update the total, gross forecast.
Definition at line 1177 of file forecast.h.
void module_forecast::ForecastBucket::setWeight | ( | double | n | ) | [inline] |
Update the weight of this forecasting bucket.
Definition at line 1161 of file forecast.h.
Member Data Documentation
const MetaClass * module_forecast::ForecastBucket::metadata [static] |
Reimplemented from frepple::Demand.
Definition at line 1143 of file forecast.h.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
