This class allows upstream and downstream navigation through the plan. More...

#include <model.h>

Inheritance diagram for frepple::PeggingIterator:

List of all members.

Classes

struct  state

Public Member Functions

virtual void endElement (XMLInput &i, const Attribute &a, const DataElement &d)
BuffergetBuffer () const
Date getConsumingDate () const
OperationPlangetConsumingOperationplan () const
double getFactor () const
short getLevel () const
bool getPegged () const
Date getProducingDate () const
OperationPlangetProducingOperationplan () const
double getQuantityBuffer () const
double getQuantityDemand () const
size_t getSize () const
virtual const MetaClassgetType () const
bool isDownstream ()
 operator bool () const
bool operator!= (const PeggingIterator &x) const
PeggingIteratoroperator++ ()
PeggingIterator operator++ (int)
PeggingIteratoroperator-- ()
PeggingIterator operator-- (int)
bool operator== (const PeggingIterator &x) const
 PeggingIterator (const Demand *e)
 PeggingIterator (const FlowPlan *e, bool b=true)
void updateStack (short, double, double, const FlowPlan *, const FlowPlan *, bool=true)
- Public Member Functions inherited from frepple::utils::Object
virtual void beginElement (XMLInput &, const Attribute &)
virtual bool getHidden () const
 Object ()
virtual void setHidden (bool b)
virtual void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
virtual ~Object ()
- Public Member Functions inherited from frepple::utils::PythonExtensionBase
virtual PyObject * call (const PythonObject &args, const PythonObject &kwds)
virtual int compare (const PyObject *other) const
Py_ssize_t getReferenceCount () const
void initType (const MetaClass *t)
void initType (PyTypeObject *t)
 PythonExtensionBase ()
void resetReferenceCount ()
virtual int setattro (const Attribute &attr, const PythonObject &field)
virtual PyObject * str () const
virtual ~PythonExtensionBase ()

Static Public Member Functions

static int initialize ()
- Static Public Member Functions inherited from frepple::utils::Object
template<class T >
static PyObject * create (PyTypeObject *pytype, PyObject *args, PyObject *kwds)
template<class T >
static ObjectcreateDefault ()
template<class T >
static ObjectcreateString (const string &n)
static PyObject * toXML (PyObject *, PyObject *)

Static Public Attributes

static const MetaCategorymetadata

Detailed Description

This class allows upstream and downstream navigation through the plan.

Downstream navigation follows the material flow from raw materials towards the produced end item.
Upstream navigation traces back the material flow from the end item up to the consumed raw materials.
The class is implemented as an STL-like iterator.

Definition at line 5533 of file model.h.


Constructor & Destructor Documentation

frepple::PeggingIterator::PeggingIterator ( const Demand e)

Constructor.

Definition at line 46 of file pegging.cpp.

frepple::PeggingIterator::PeggingIterator ( const FlowPlan e,
bool  b = true 
)
inline

Constructor.

Definition at line 5540 of file model.h.


Member Function Documentation

virtual void frepple::PeggingIterator::endElement ( XMLInput ,
const Attribute ,
const DataElement  
)
inlinevirtual

Called while restoring the model from an XML-file.
This is called when the corresponding close element tag is encountered, and the Data() member of pElement is valid.

Implements frepple::utils::Object.

Definition at line 5659 of file model.h.

Buffer* frepple::PeggingIterator::getBuffer ( ) const
inline

Return the material buffer through which we are pegging.

Definition at line 5559 of file model.h.

Date frepple::PeggingIterator::getConsumingDate ( ) const
inline

Return the date when the material is consumed.

Definition at line 5574 of file model.h.

OperationPlan* frepple::PeggingIterator::getConsumingOperationplan ( ) const
inline

Return the operationplan consuming the material.

Definition at line 5552 of file model.h.

double frepple::PeggingIterator::getFactor ( ) const
inline

Returns which portion of the current flowplan is fed/supplied by the original flowplan.

Definition at line 5611 of file model.h.

short frepple::PeggingIterator::getLevel ( ) const
inline

Returns the recursion depth of the iterator.
The original flowplan is at level 0, and each level (either upstream or downstream) increments the value by 1.

Definition at line 5591 of file model.h.

bool frepple::PeggingIterator::getPegged ( ) const
inline

Returns false if the flowplan remained unpegged, i.e. it wasn't -either completely or paritally- unconsumed at the next level.

Definition at line 5616 of file model.h.

Date frepple::PeggingIterator::getProducingDate ( ) const
inline

Return the date when the material is produced.

Definition at line 5581 of file model.h.

OperationPlan* frepple::PeggingIterator::getProducingOperationplan ( ) const
inline

Return the operationplan producing the material.

Definition at line 5567 of file model.h.

double frepple::PeggingIterator::getQuantityBuffer ( ) const
inline

Returns the quantity of the buffer flowplans that is linked to this pegging record.

Definition at line 5601 of file model.h.

double frepple::PeggingIterator::getQuantityDemand ( ) const
inline

Returns the quantity of the demand that is linked to this pegging record.

Definition at line 5596 of file model.h.

size_t frepple::PeggingIterator::getSize ( ) const
inlinevirtual

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Definition at line 5665 of file model.h.

virtual const MetaClass& frepple::PeggingIterator::getType ( ) const
inlinevirtual

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

Implements frepple::utils::Object.

Definition at line 5663 of file model.h.

int frepple::PeggingIterator::initialize ( )
static

Initialize the class.

Definition at line 30 of file pegging.cpp.

bool frepple::PeggingIterator::isDownstream ( )
inline

Returns true if this is a downstream iterator.

Definition at line 5654 of file model.h.

frepple::PeggingIterator::operator bool ( ) const
inline

Conversion operator to a boolean value. The return value is true when the iterator still has next elements to explore. Returns false when the iteration is finished.

Definition at line 5648 of file model.h.

bool frepple::PeggingIterator::operator!= ( const PeggingIterator x) const
inline

Inequality operator.

Definition at line 5642 of file model.h.

PeggingIterator & frepple::PeggingIterator::operator++ ( )

Move the iterator foward to the next downstream flowplan.

Definition at line 84 of file pegging.cpp.

PeggingIterator frepple::PeggingIterator::operator++ ( int  )
inline

Move the iterator foward to the next downstream flowplan.
This post-increment operator is less efficient than the pre-increment operator.

Definition at line 5625 of file model.h.

PeggingIterator & frepple::PeggingIterator::operator-- ( )

Move the iterator foward to the next upstream flowplan.

Definition at line 115 of file pegging.cpp.

PeggingIterator frepple::PeggingIterator::operator-- ( int  )
inline

Move the iterator foward to the next upstream flowplan.
This post-increment operator is less efficient than the pre-decrement operator.

Definition at line 5635 of file model.h.

bool frepple::PeggingIterator::operator== ( const PeggingIterator x) const
inline

Comparison operator.

Definition at line 5639 of file model.h.

void frepple::PeggingIterator::updateStack ( short  l,
double  q,
double  f,
const FlowPlan fc,
const FlowPlan fp,
bool  p = true 
)

Update the stack.

Definition at line 61 of file pegging.cpp.


Member Data Documentation

const MetaCategory * frepple::PeggingIterator::metadata
static

Definition at line 5664 of file model.h.


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