frepple::utils::TimeLine< type >::Event Class Reference

Base class for nodes in the timeline. More...

#include <timeline.h>

Inheritance diagram for frepple::utils::TimeLine< type >::Event:
frepple::utils::NonCopyable frepple::utils::TimeLine< type >::EventChangeOnhand frepple::utils::TimeLine< type >::EventMaxQuantity frepple::utils::TimeLine< type >::EventMinQuantity frepple::FlowPlan frepple::LoadPlan

List of all members.

Public Member Functions

double getCumulativeConsumed () const
double getCumulativeProduced () const
const DategetDate () 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
Eventnext
double oh
Eventprev

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 59 of file timeline.h.


Constructor & Destructor Documentation

template<class type>
frepple::utils::TimeLine< type >::Event::Event (  )  [inline, protected]

Definition at line 70 of file timeline.h.

template<class type>
virtual frepple::utils::TimeLine< type >::Event::~Event (  )  [inline, virtual]

Definition at line 73 of file timeline.h.


Member Function Documentation

template<class type>
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.

template<class type>
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.

template<class type>
const Date& frepple::utils::TimeLine< type >::Event::getDate (  )  const [inline]

Return the date of the event.

Definition at line 86 of file timeline.h.

template<class type>
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.

template<class type>
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.

template<class type>
double frepple::utils::TimeLine< type >::Event::getOnhand (  )  const [inline]

Return the current onhand value.

Definition at line 77 of file timeline.h.

template<class type>
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.

template<class type>
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.

template<class type>
virtual unsigned short frepple::utils::TimeLine< type >::Event::getType (  )  const [pure virtual]
template<class type>
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.


Friends And Related Function Documentation

template<class type>
friend class const_iterator [friend]

Definition at line 62 of file timeline.h.

template<class type>
friend class iterator [friend]

Definition at line 63 of file timeline.h.

template<class type>
friend class TimeLine< type > [friend]

Member Data Documentation

template<class type>
double frepple::utils::TimeLine< type >::Event::cum_prod [protected]

Definition at line 67 of file timeline.h.

template<class type>
Date frepple::utils::TimeLine< type >::Event::dt [protected]

Definition at line 65 of file timeline.h.

template<class type>
Event* frepple::utils::TimeLine< type >::Event::next [protected]

Definition at line 68 of file timeline.h.

template<class type>
double frepple::utils::TimeLine< type >::Event::oh [protected]

Definition at line 66 of file timeline.h.

template<class type>
Event* frepple::utils::TimeLine< type >::Event::prev [protected]

Definition at line 69 of file timeline.h.


The documentation for this class was generated from the following file:

Generated on 25 Sep 2009 for frePPLe by  doxygen 1.6.1