frepple::Flow Class Reference

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:
frepple::utils::Object frepple::utils::Association< A, B, C >::Node frepple::Solvable frepple::FlowEnd frepple::FlowStart

List of all members.

Public Member Functions

void beginElement (XMLInput &, const Attribute &)
void endElement (XMLInput &, const Attribute &, const DataElement &)
 Flow (Operation *o, Buffer *b, double q)
BuffergetBuffer () const
virtual Date getFlowplanDate (const FlowPlan *) const
virtual double getFlowplanQuantity (const FlowPlan *) const
virtual bool getHidden () const
OperationgetOperation () const
double getQuantity () const
virtual size_t getSize () const
virtual const MetaClassgetType () const
bool isConsumer () const
bool isProducer () const
void setBuffer (Buffer *b)
void setOperation (Operation *o)
void setQuantity (double f)
virtual void solve (Solver &s, void *v=NULL) const
virtual void writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const
virtual ~Flow ()

Static Public Attributes

static const MetaCategorymetadata

Protected Member Functions

 Flow ()

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 3149 of file model.h.


Constructor & Destructor Documentation

frepple::Flow::~Flow (  )  [virtual]

Destructor.

Definition at line 100 of file flow.cpp.

frepple::Flow::Flow ( Operation o,
Buffer b,
double  q 
) [inline, explicit]

Constructor.

Definition at line 3157 of file model.h.

frepple::Flow::Flow (  )  [inline, explicit, protected]

Default constructor.

Definition at line 3224 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 156 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 165 of file flow.cpp.

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

Returns the buffer.

Definition at line 3190 of file model.h.

Date frepple::Flow::getFlowplanDate ( const FlowPlan fl  )  const [inline, virtual]

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

Reimplemented in frepple::FlowEnd.

Definition at line 3359 of file model.h.

double frepple::Flow::getFlowplanQuantity ( const FlowPlan fl  )  const [inline, virtual]

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

Definition at line 3351 of file model.h.

virtual bool frepple::Flow::getHidden (  )  const [inline, virtual]

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

Reimplemented from frepple::utils::Object.

Definition at line 3200 of file model.h.

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

Returns the operation.

Definition at line 3165 of file model.h.

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

Returns the material flow PER UNIT of the operationplan.

Definition at line 3180 of file model.h.

virtual size_t frepple::Flow::getSize (  )  const [inline, virtual]

Return the memory size of the object in bytes.

Implements frepple::utils::Object.

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

Definition at line 3220 of file model.h.

virtual const MetaClass& frepple::Flow::getType (  )  const [inline, virtual]

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

Implements frepple::utils::Object.

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

Definition at line 3218 of file model.h.

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

Returns true if this flow consumes material from the buffer.

Definition at line 3174 of file model.h.

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

Returns true if this flow produces material into the buffer.

Definition at line 3177 of file model.h.

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 3196 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 3171 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 3187 of file model.h.

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

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::FlowEnd.

Definition at line 3216 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 122 of file flow.cpp.


Member Data Documentation

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

Definition at line 3219 of file model.h.


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

Generated on 25 Feb 2010 for frePPLe by  doxygen 1.6.1