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 Public Attributes | |
static const MetaClass * | metadata |
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 735 of file forecast.h.
module_forecast::ForecastBucket::ForecastBucket | ( | Forecast * | f, | |
Date | d, | |||
Date | e, | |||
double | w, | |||
ForecastBucket * | p | |||
) | [inline] |
Definition at line 738 of file forecast.h.
PyObject * module_forecast::ForecastBucket::getattro | ( | const Attribute & | attr | ) | [virtual] |
Reimplemented from frepple::Demand.
Definition at line 129 of file pythonforecast.cpp.
double module_forecast::ForecastBucket::getConsumed | ( | ) | const [inline] |
Returns the consumed forecast.
Definition at line 769 of file forecast.h.
DateRange module_forecast::ForecastBucket::getDueRange | ( | ) | const [inline] |
Return the date range for this bucket.
Definition at line 819 of file forecast.h.
ForecastBucket* module_forecast::ForecastBucket::getNextBucket | ( | ) | const [inline] |
Return a pointer to the next forecast bucket.
Definition at line 822 of file forecast.h.
ForecastBucket* module_forecast::ForecastBucket::getPreviousBucket | ( | ) | const [inline] |
Return a pointer to the previous forecast bucket.
Definition at line 825 of file forecast.h.
virtual size_t module_forecast::ForecastBucket::getSize | ( | ) | const [inline, virtual] |
Definition at line 755 of file forecast.h.
double module_forecast::ForecastBucket::getTotal | ( | ) | const [inline] |
Returns the total, gross forecast.
Definition at line 766 of file forecast.h.
virtual const MetaClass& module_forecast::ForecastBucket::getType | ( | ) | const [inline, virtual] |
Reimplemented from frepple::Demand.
Definition at line 753 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 763 of file forecast.h.
void module_forecast::ForecastBucket::incConsumed | ( | double | n | ) | [inline] |
Increment the consumed forecast.
Definition at line 798 of file forecast.h.
void module_forecast::ForecastBucket::incTotal | ( | double | n | ) | [inline] |
Increment the total, gross forecast.
Definition at line 780 of file forecast.h.
int module_forecast::ForecastBucket::initialize | ( | ) | [static] |
Reimplemented from frepple::Demand.
Definition at line 54 of file forecast.cpp.
int module_forecast::ForecastBucket::setattro | ( | const Attribute & | attr, | |
const PythonObject & | field | |||
) | [virtual] |
Reimplemented from frepple::Demand.
Definition at line 145 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 809 of file forecast.h.
void module_forecast::ForecastBucket::setTotal | ( | double | n | ) | [inline] |
Update the total, gross forecast.
Definition at line 788 of file forecast.h.
void module_forecast::ForecastBucket::setWeight | ( | double | n | ) | [inline] |
Update the weight of this forecasting bucket.
Definition at line 772 of file forecast.h.
const MetaClass * module_forecast::ForecastBucket::metadata [static] |
Reimplemented from frepple::Demand.
Definition at line 754 of file forecast.h.