module_forecast::ForecastBucket Class Reference
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 1116 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 1119 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 130 of file pythonforecast.cpp.
double module_forecast::ForecastBucket::getConsumed | ( | ) | const [inline] |
Returns the consumed forecast.
Definition at line 1150 of file forecast.h.
DateRange module_forecast::ForecastBucket::getDueRange | ( | ) | const [inline] |
Return the date range for this bucket.
Definition at line 1200 of file forecast.h.
ForecastBucket* module_forecast::ForecastBucket::getNextBucket | ( | ) | const [inline] |
Return a pointer to the next forecast bucket.
Definition at line 1203 of file forecast.h.
ForecastBucket* module_forecast::ForecastBucket::getPreviousBucket | ( | ) | const [inline] |
Return a pointer to the previous forecast bucket.
Definition at line 1206 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 1136 of file forecast.h.
double module_forecast::ForecastBucket::getTotal | ( | ) | const [inline] |
Returns the total, gross forecast.
Definition at line 1147 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 1134 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 1144 of file forecast.h.
void module_forecast::ForecastBucket::incConsumed | ( | double | n | ) | [inline] |
Increment the consumed forecast.
Definition at line 1179 of file forecast.h.
void module_forecast::ForecastBucket::incTotal | ( | double | n | ) | [inline] |
Increment the total, gross forecast.
Definition at line 1161 of file forecast.h.
int module_forecast::ForecastBucket::initialize | ( | ) | [static] |
Reimplemented from frepple::Demand.
Definition at line 57 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 146 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 1190 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 1212 of file forecast.h.
void module_forecast::ForecastBucket::setTotal | ( | double | n | ) | [inline] |
Update the total, gross forecast.
Definition at line 1169 of file forecast.h.
void module_forecast::ForecastBucket::setWeight | ( | double | n | ) | [inline] |
Update the weight of this forecasting bucket.
Definition at line 1153 of file forecast.h.
Member Data Documentation
const MetaClass * module_forecast::ForecastBucket::metadata [static] |
Reimplemented from frepple::Demand.
Definition at line 1135 of file forecast.h.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
