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::utils::PythonExtensionBase 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)
FlowgetAlternate () const
BuffergetBuffer () const
virtual Date getFlowplanDate (const FlowPlan *) const
virtual double getFlowplanQuantity (const FlowPlan *) const
virtual bool getHidden () const
OperationgetOperation () const
int getPriority () 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 (const string &n)
void setAlternate (Flow *)
void setBuffer (Buffer *b)
void setOperation (Operation *o)
void setPriority (int i)
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 ()

Static Public Member Functions

static int initialize ()
static void writer (const MetaCategory *, XMLOutput *)

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


Constructor & Destructor Documentation

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

Destructor.

Definition at line 147 of file flow.cpp.

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

Constructor.

Definition at line 3314 of file model.h.

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

Default constructor.

Definition at line 3411 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 284 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 293 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 3369 of file model.h.

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

Returns the buffer.

Definition at line 3349 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 3579 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 3571 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 3385 of file model.h.

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

Returns the operation.

Definition at line 3324 of file model.h.

int frepple::Flow::getPriority (  )  const [inline]

Return the priority of a flow.

Definition at line 3361 of file model.h.

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

Returns the material flow PER UNIT of the operationplan.

Definition at line 3339 of file model.h.

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

Return the search mode.

Definition at line 3378 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 3407 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 3405 of file model.h.

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

Returns true if there are alternates for this flow.

Definition at line 3364 of file model.h.

int frepple::Flow::initialize (  )  [static]

Definition at line 38 of file flow.cpp.

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

Returns true if this flow consumes material from the buffer.

Definition at line 3333 of file model.h.

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

Returns true if this flow produces material into the buffer.

Definition at line 3336 of file model.h.

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

Define the flow of which this one is an alternate.

Definition at line 236 of file flow.cpp.

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

Define the flow of which this one is an alternate.

Definition at line 220 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 3355 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 3330 of file model.h.

void frepple::Flow::setPriority ( int  i  )  [inline]

Update the priority of a flow.

Definition at line 3358 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 3346 of file model.h.

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

Update the search mode.

Definition at line 3381 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::FlowStart, and frepple::FlowEnd.

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

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

Definition at line 61 of file flow.cpp.


Member Data Documentation

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

Definition at line 3406 of file model.h.


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

Generated on 16 Apr 2010 for frePPLe by  doxygen 1.6.1