This class defines a material flow to/from a buffer, linked with an operation. This default implementation plans the material flow at the start of the operation. More...

#include <model.h>

Inheritance diagram for frepple::Flow:

Public Member Functions

void beginElement (XMLInput &, const Attribute &)
 
void endElement (XMLInput &, const Attribute &, const DataElement &)
 
 Flow (Operation *o, Buffer *b, double q)
 
 Flow (Operation *o, Buffer *b, double q, DateRange e)
 
FlowgetAlternate () const
 
BuffergetBuffer () const
 
virtual Date getFlowplanDate (const FlowPlan *) const
 
virtual double getFlowplanQuantity (const FlowPlan *) const
 
virtual bool getHidden () const
 
OperationgetOperation () const
 
double getQuantity () const
 
SearchMode getSearch () const
 
virtual size_t getSize () const
 
virtual const MetaClassgetType () const
 
bool hasAlternates () const
 
bool isConsumer () const
 
bool isProducer () const
 
void setAlternate (Flow *)
 
void setAlternate (const string &n)
 
void setBuffer (Buffer *b)
 
void setOperation (Operation *o)
 
void setQuantity (double f)
 
void setSearch (const string a)
 
virtual void solve (Solver &s, void *v=NULL) const
 
virtual void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
 
virtual ~Flow ()
 
- Public Member Functions inherited from frepple::utils::Object
 Object ()
 
virtual void setHidden (bool b)
 
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)
 
virtual PyObject * iternext ()
 
 PythonExtensionBase ()
 
void resetReferenceCount ()
 
virtual PyObject * str () const
 
virtual ~PythonExtensionBase ()
 
- Public Member Functions inherited from frepple::utils::Association< A, B, C >::Node
DateRange getEffective () const
 
const string & getName () const
 
int getPriority () const
 
A * getPtrA () const
 
B * getPtrB () const
 
 Node ()
 
 Node (A *a, B *b, const ListA &al, const ListB &bl)
 
void setEffective (DateRange dr)
 
void setEffectiveEnd (Date d)
 
void setEffectiveStart (Date d)
 
void setName (const string x)
 
void setPriority (int i)
 
void setPtrA (A *a, const ListA &al)
 
void setPtrAB (A *a, B *b, const ListA &al, const ListB &bl)
 
void setPtrB (B *b, const ListB &bl)
 
- Public Member Functions inherited from frepple::Solvable
virtual ~Solvable ()
 

Static Public Member Functions

static int initialize ()
 
static void writer (const MetaCategory *, XMLOutput *)
 
- 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
 

Protected Member Functions

 Flow ()
 

Additional Inherited Members

- Public Attributes inherited from frepple::utils::Association< A, B, C >::Node
DateRange effectivity
 
string name
 
C * nextA
 
C * nextB
 
int priority
 
A * ptrA
 
B * ptrB
 
- Static Protected Member Functions inherited from frepple::utils::PythonExtensionBase
static PythonTyperegisterPythonType (int, const type_info *)
 
- Static Protected Attributes inherited from frepple::utils::PythonExtensionBase
static vector< PythonType * > table
 

Detailed Description

This class defines a material flow to/from a buffer, linked with an operation. This default implementation plans the material flow at the start of the operation.

Definition at line 3186 of file model.h.

Constructor & Destructor Documentation

frepple::Flow::~Flow ( )
virtual

Destructor.

Definition at line 138 of file flow.cpp.

frepple::Flow::Flow ( Operation o,
Buffer b,
double  q 
)
inlineexplicit

Constructor.

Definition at line 3194 of file model.h.

frepple::Flow::Flow ( Operation o,
Buffer b,
double  q,
DateRange  e 
)
inlineexplicit

Constructor.

Definition at line 3211 of file model.h.

frepple::Flow::Flow ( )
inlineexplicitprotected

Default constructor.

Definition at line 3310 of file model.h.

Member Function Documentation

void frepple::Flow::beginElement ( XMLInput ,
const Attribute  
)
virtual

Called while restoring the model from an XML-file.
This is called for each element within the "this" element, for which the "this" element is immediate parent.
It is called when the open element tag is encountered.

Reimplemented from frepple::utils::Object.

Definition at line 275 of file flow.cpp.

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

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 284 of file flow.cpp.

Flow* frepple::Flow::getAlternate ( ) const
inline

Returns the flow of which this one is an alternate.
NULL is return where there is none.

Definition at line 3268 of file model.h.

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

Returns the buffer.

Definition at line 3254 of file model.h.

Date frepple::Flow::getFlowplanDate ( const FlowPlan fl) const
inlinevirtual

This method holds the logic the compute the date of a flowplan.

Reimplemented in frepple::FlowEnd.

Definition at line 3568 of file model.h.

double frepple::Flow::getFlowplanQuantity ( const FlowPlan fl) const
inlinevirtual

This method holds the logic the compute the quantity of a flowplan.

Reimplemented in frepple::FlowFixedStart, and frepple::FlowFixedEnd.

Definition at line 3544 of file model.h.

virtual bool frepple::Flow::getHidden ( ) const
inlinevirtual

A flow is considered hidden when either its buffer or operation are hidden.

Reimplemented from frepple::utils::Object.

Definition at line 3284 of file model.h.

Operation* frepple::Flow::getOperation ( ) const
inline

Returns the operation.

Definition at line 3229 of file model.h.

double frepple::Flow::getQuantity ( ) const
inline

Returns the material flow PER UNIT of the operationplan.

Definition at line 3244 of file model.h.

SearchMode frepple::Flow::getSearch ( ) const
inline

Return the search mode.

Definition at line 3277 of file model.h.

virtual size_t frepple::Flow::getSize ( ) const
inlinevirtual

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

Reimplemented in frepple::FlowFixedStart, frepple::FlowFixedEnd, frepple::FlowEnd, and frepple::FlowStart.

Definition at line 3306 of file model.h.

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

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

Implements frepple::utils::Object.

Reimplemented in frepple::FlowFixedStart, frepple::FlowFixedEnd, frepple::FlowEnd, and frepple::FlowStart.

Definition at line 3304 of file model.h.

bool frepple::Flow::hasAlternates ( ) const
inline

Returns true if there are alternates for this flow.

Definition at line 3263 of file model.h.

int frepple::Flow::initialize ( )
static

Definition at line 33 of file flow.cpp.

bool frepple::Flow::isConsumer ( ) const
inline

Returns true if this flow consumes material from the buffer.

Definition at line 3238 of file model.h.

bool frepple::Flow::isProducer ( ) const
inline

Returns true if this flow produces material into the buffer.

Definition at line 3241 of file model.h.

void frepple::Flow::setAlternate ( Flow f)

Define the flow of which this one is an alternate.

Definition at line 211 of file flow.cpp.

void frepple::Flow::setAlternate ( const string &  n)

Define the flow of which this one is an alternate.

Definition at line 227 of file flow.cpp.

void frepple::Flow::setBuffer ( Buffer b)
inline

Updates the buffer of this flow. This method can be called only ONCE for each flow. In case that doesn't suit you, delete the existing flow and create a new one.

Definition at line 3260 of file model.h.

void frepple::Flow::setOperation ( Operation o)
inline

Updates the operation of this flow. This method can be called only ONCE for each flow. In case that doesn't suit you, delete the existing flow and create a new one.

Definition at line 3235 of file model.h.

void frepple::Flow::setQuantity ( double  f)
inline

Updates the material flow PER UNIT of the operationplan. Existing flowplans are NOT updated to take the new quantity in effect. Only new operationplans and updates to existing ones will use the new quantity value.

Definition at line 3251 of file model.h.

void frepple::Flow::setSearch ( const string  a)
inline

Update the search mode.

Definition at line 3280 of file model.h.

virtual void frepple::Flow::solve ( Solver s,
void *  v = NULL 
) const
inlinevirtual

This method is called by solver classes. The implementation of this class simply calls the solve method on the solver class. Using the polymorphism the solver can implement seperate methods for different plannable subclasses.

Reimplemented from frepple::Solvable.

Reimplemented in frepple::FlowFixedStart, frepple::FlowFixedEnd, frepple::FlowEnd, and frepple::FlowStart.

Definition at line 3302 of file model.h.

void frepple::Flow::writeElement ( XMLOutput ,
const Keyword ,
mode  = DEFAULT 
) const
virtual

Called while writing the model into an XML-file. The user class should write itself out, using the IOutStream members for its "simple" members and calling writeElement recursively for any contained objects. Not all classes are expected to implement this method. In instances of such a class can be created but can't be persisted. E.g. Command

Reimplemented from frepple::utils::Object.

Reimplemented in frepple::FlowEnd.

Definition at line 237 of file flow.cpp.

void frepple::Flow::writer ( const MetaCategory c,
XMLOutput o 
)
static

Definition at line 60 of file flow.cpp.

Member Data Documentation

const MetaCategory * frepple::Flow::metadata
static

Definition at line 3305 of file model.h.


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