frepple::utils::TimeLine< type >::Event Class Reference
Base class for nodes in the timeline. More...
#include <timeline.h>

Public Member Functions | |
double | getCumulativeConsumed () const |
double | getCumulativeProduced () const |
const Date & | getDate () const |
virtual double | getMax (bool inclusive=true) const |
virtual double | getMin (bool inclusive=true) const |
double | getOnhand () const |
virtual double | getQuantity () const |
virtual TimeLine< type > * | getTimeLine () const |
virtual unsigned short | getType () const =0 |
bool | operator< (const Event &fl2) const |
virtual | ~Event () |
Protected Member Functions | |
Event () | |
Protected Attributes | |
double | cum_prod |
Date | dt |
Event * | next |
double | oh |
Event * | prev |
Friends | |
class | const_iterator |
class | iterator |
class | TimeLine< type > |
Detailed Description
template<class type>
class frepple::utils::TimeLine< type >::Event
Base class for nodes in the timeline.
Definition at line 61 of file timeline.h.
Constructor & Destructor Documentation
frepple::utils::TimeLine< type >::Event::Event | ( | ) | [inline, protected] |
Definition at line 72 of file timeline.h.
virtual frepple::utils::TimeLine< type >::Event::~Event | ( | ) | [inline, virtual] |
Definition at line 75 of file timeline.h.
Member Function Documentation
double frepple::utils::TimeLine< type >::Event::getCumulativeConsumed | ( | ) | const [inline] |
Return the total consumed quantity till the current date.
Definition at line 85 of file timeline.h.
double frepple::utils::TimeLine< type >::Event::getCumulativeProduced | ( | ) | const [inline] |
Return the total produced quantity till the current date.
Definition at line 82 of file timeline.h.
const Date& frepple::utils::TimeLine< type >::Event::getDate | ( | ) | const [inline] |
Return the date of the event.
Definition at line 88 of file timeline.h.
virtual double frepple::utils::TimeLine< type >::Event::getMax | ( | bool | inclusive = true |
) | const [inline, virtual] |
This functions returns the maximum boundary valid at the time of this event.
Reimplemented in frepple::utils::TimeLine< type >::EventMaxQuantity.
Definition at line 108 of file timeline.h.
virtual double frepple::utils::TimeLine< type >::Event::getMin | ( | bool | inclusive = true |
) | const [inline, virtual] |
This functions returns the mimimum boundary valid at the time of this event.
Reimplemented in frepple::utils::TimeLine< type >::EventMinQuantity.
Definition at line 95 of file timeline.h.
double frepple::utils::TimeLine< type >::Event::getOnhand | ( | ) | const [inline] |
Return the current onhand value.
Definition at line 79 of file timeline.h.
virtual double frepple::utils::TimeLine< type >::Event::getQuantity | ( | ) | const [inline, virtual] |
Reimplemented in frepple::utils::TimeLine< type >::EventChangeOnhand.
Definition at line 76 of file timeline.h.
virtual TimeLine<type>* frepple::utils::TimeLine< type >::Event::getTimeLine | ( | ) | const [inline, virtual] |
Return a pointer to the owning timeline.
Reimplemented in frepple::FlowPlan, and frepple::LoadPlan.
Definition at line 91 of file timeline.h.
virtual unsigned short frepple::utils::TimeLine< type >::Event::getType | ( | ) | const [pure virtual] |
bool frepple::utils::TimeLine< type >::Event::operator< | ( | const Event & | fl2 | ) | const [inline] |
First criterion is date: earlier dates come first.
Second criterion is the size: big events come first.
As a third tie-breaking criterion, we use a pointer comparison.
This garantuees us a fixed and unambiguous ordering.
As a side effect, this makes sure that producers come before consumers. This feature is required to avoid zero-time material shortages.
Definition at line 129 of file timeline.h.
Friends And Related Function Documentation
friend class const_iterator [friend] |
Definition at line 64 of file timeline.h.
friend class iterator [friend] |
Definition at line 65 of file timeline.h.
friend class TimeLine< type > [friend] |
Reimplemented in frepple::utils::TimeLine< type >::EventChangeOnhand, frepple::utils::TimeLine< type >::EventMinQuantity, and frepple::utils::TimeLine< type >::EventMaxQuantity.
Definition at line 63 of file timeline.h.
Member Data Documentation
double frepple::utils::TimeLine< type >::Event::cum_prod [protected] |
Definition at line 69 of file timeline.h.
Date frepple::utils::TimeLine< type >::Event::dt [protected] |
Definition at line 67 of file timeline.h.
Event* frepple::utils::TimeLine< type >::Event::next [protected] |
Definition at line 70 of file timeline.h.
double frepple::utils::TimeLine< type >::Event::oh [protected] |
Definition at line 68 of file timeline.h.
Event* frepple::utils::TimeLine< type >::Event::prev [protected] |
Definition at line 71 of file timeline.h.
The documentation for this class was generated from the following file:
Documentation generated for frePPLe by
