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) | |
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) |
void | setConsumed (double n) |
void | setTotal (double n) |
void | setWeight (double n) |
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 729 of file forecast.h.
module_forecast::ForecastBucket::ForecastBucket | ( | Forecast * | f, | |
Date | d, | |||
Date | e, | |||
double | w, | |||
ForecastBucket * | p | |||
) | [inline] |
Definition at line 732 of file forecast.h.
double module_forecast::ForecastBucket::getConsumed | ( | ) | const [inline] |
Returns the consumed forecast.
Definition at line 762 of file forecast.h.
DateRange module_forecast::ForecastBucket::getDueRange | ( | ) | const [inline] |
Return the date range for this bucket.
Definition at line 812 of file forecast.h.
ForecastBucket* module_forecast::ForecastBucket::getNextBucket | ( | ) | const [inline] |
Return a pointer to the next forecast bucket.
Definition at line 815 of file forecast.h.
ForecastBucket* module_forecast::ForecastBucket::getPreviousBucket | ( | ) | const [inline] |
Return a pointer to the previous forecast bucket.
Definition at line 818 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 748 of file forecast.h.
double module_forecast::ForecastBucket::getTotal | ( | ) | const [inline] |
Returns the total, gross forecast.
Definition at line 759 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 746 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 756 of file forecast.h.
void module_forecast::ForecastBucket::incConsumed | ( | double | n | ) | [inline] |
Increment the consumed forecast.
Definition at line 791 of file forecast.h.
void module_forecast::ForecastBucket::incTotal | ( | double | n | ) | [inline] |
Increment the total, gross forecast.
Definition at line 773 of file forecast.h.
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 802 of file forecast.h.
void module_forecast::ForecastBucket::setTotal | ( | double | n | ) | [inline] |
Update the total, gross forecast.
Definition at line 781 of file forecast.h.
void module_forecast::ForecastBucket::setWeight | ( | double | n | ) | [inline] |
Update the weight of this forecasting bucket.
Definition at line 765 of file forecast.h.
const MetaClass * module_forecast::ForecastBucket::metadata [static] |
Reimplemented from frepple::Demand.
Definition at line 747 of file forecast.h.