module_forecast::ForecastBucket Class Reference

This class represents a forecast value in a time bucket. More...

#include <forecast.h>

Inheritance diagram for module_forecast::ForecastBucket:
frepple::Demand frepple::utils::HasHierarchy< Demand > frepple::Plannable frepple::utils::HasDescription frepple::utils::HasName< Demand > frepple::HasProblems frepple::Solvable frepple::utils::NonCopyable frepple::utils::Tree::TreeNode frepple::utils::Object frepple::utils::PythonExtensionBase

List of all members.

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
ForecastBucketgetNextBucket () const
ForecastBucketgetPreviousBucket () const
virtual size_t getSize () const
double getTotal () const
virtual const MetaClassgetType () 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 MetaClassmetadata

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 735 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 738 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 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]

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

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]

This returns the type information on the object, a bit similar to the standard type_info information.

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]

Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.

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.


Member Data Documentation

Reimplemented from frepple::Demand.

Definition at line 754 of file forecast.h.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.2-20100208