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>
Public Member Functions | |
void | beginElement (XMLInput &, const Attribute &) |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
Flow (Operation *o, Buffer *b, double q) | |
Buffer * | getBuffer () const |
virtual Date | getFlowplanDate (const FlowPlan *) const |
virtual double | getFlowplanQuantity (const FlowPlan *) const |
virtual bool | getHidden () const |
Operation * | getOperation () const |
double | getQuantity () const |
virtual size_t | getSize () const |
virtual const MetaClass & | getType () 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 MetaCategory * | metadata |
Protected Member Functions | |
Flow () |
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.
frepple::Flow::Flow | ( | ) | [inline, explicit, protected] |
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.
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.
Buffer* frepple::Flow::getBuffer | ( | ) | const [inline] |
This method holds the logic the compute the date of a flowplan.
Reimplemented in frepple::FlowEnd.
double frepple::Flow::getFlowplanQuantity | ( | const FlowPlan * | fl | ) | const [inline, virtual] |
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.
Operation* frepple::Flow::getOperation | ( | ) | const [inline] |
double frepple::Flow::getQuantity | ( | ) | const [inline] |
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.
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.
bool frepple::Flow::isConsumer | ( | ) | const [inline] |
bool frepple::Flow::isProducer | ( | ) | const [inline] |
void frepple::Flow::setBuffer | ( | Buffer * | b | ) | [inline] |
void frepple::Flow::setOperation | ( | Operation * | o | ) | [inline] |
void frepple::Flow::setQuantity | ( | double | f | ) | [inline] |
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.
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.
const MetaCategory * frepple::Flow::metadata [static] |
Reimplemented in frepple::FlowStart, and frepple::FlowEnd.