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< (Event const &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 > |
Base class for nodes in the timeline.
Definition at line 59 of file timeline.h.
frepple::utils::TimeLine< type >::Event::Event | ( | ) | [inline, protected] |
Definition at line 70 of file timeline.h.
virtual frepple::utils::TimeLine< type >::Event::~Event | ( | ) | [inline, virtual] |
Definition at line 73 of file timeline.h.
double frepple::utils::TimeLine< type >::Event::getCumulativeConsumed | ( | ) | const [inline] |
Return the total consumed quantity till the current date.
Definition at line 83 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 80 of file timeline.h.
const Date& frepple::utils::TimeLine< type >::Event::getDate | ( | ) | const [inline] |
Return the date of the event.
Definition at line 86 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 105 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 93 of file timeline.h.
double frepple::utils::TimeLine< type >::Event::getOnhand | ( | ) | const [inline] |
Return the current onhand value.
Definition at line 77 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 74 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 89 of file timeline.h.
virtual unsigned short frepple::utils::TimeLine< type >::Event::getType | ( | ) | const [pure virtual] |
bool frepple::utils::TimeLine< type >::Event::operator< | ( | Event const & | 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 125 of file timeline.h.
friend class const_iterator [friend] |
Definition at line 62 of file timeline.h.
friend class iterator [friend] |
Definition at line 63 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 61 of file timeline.h.
double frepple::utils::TimeLine< type >::Event::cum_prod [protected] |
Definition at line 67 of file timeline.h.
Date frepple::utils::TimeLine< type >::Event::dt [protected] |
Definition at line 65 of file timeline.h.
Event* frepple::utils::TimeLine< type >::Event::next [protected] |
Definition at line 68 of file timeline.h.
double frepple::utils::TimeLine< type >::Event::oh [protected] |
Definition at line 66 of file timeline.h.
Event* frepple::utils::TimeLine< type >::Event::prev [protected] |
Definition at line 69 of file timeline.h.