This class is used to represent a matrix defining the changeover times between setups. More...
#include <model.h>

Classes | |
class | Rule |
An specific changeover rule in a setup matrix. More... | |
class | RuleIterator |
An iterator class to go through all rules of a setup matrix. More... | |
Public Member Functions | |
void | beginElement (XMLInput &, const Attribute &) |
RuleIterator | beginRules () const |
Rule * | calculateSetup (const string, const string) const |
Rule * | createRule (const AttributeList &) |
void | endElement (XMLInput &, const Attribute &, const DataElement &) |
RuleIterator | endRules () const |
size_t | extrasize () const |
virtual PyObject * | getattro (const Attribute &) |
virtual size_t | getSize () const |
virtual const MetaClass & | getType () const |
virtual int | setattro (const Attribute &, const PythonObject &) |
SetupMatrix (const string &n) | |
virtual void | writeElement (XMLOutput *, const Keyword &, mode=DEFAULT) const |
~SetupMatrix () | |
Static Public Member Functions | |
static PyObject * | addPythonRule (PyObject *, PyObject *, PyObject *) |
static int | initialize () |
Static Public Attributes | |
static const MetaCategory * | metadata |
Detailed Description
This class is used to represent a matrix defining the changeover times between setups.
Constructor & Destructor Documentation
frepple::SetupMatrix::SetupMatrix | ( | const string & | n | ) | [inline] |
frepple::SetupMatrix::~SetupMatrix | ( | ) |
Destructor.
Definition at line 81 of file setupmatrix.cpp.
Member Function Documentation
PyObject * frepple::SetupMatrix::addPythonRule | ( | PyObject * | self, |
PyObject * | args, | ||
PyObject * | kwdict | ||
) | [static] |
Python interface to add a new rule.
Definition at line 216 of file setupmatrix.cpp.
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 119 of file setupmatrix.cpp.
RuleIterator frepple::SetupMatrix::beginRules | ( | ) | const [inline] |
SetupMatrix::Rule * frepple::SetupMatrix::calculateSetup | ( | const string | oldsetup, |
const string | newsetup | ||
) | const |
Computes the changeover time and cost between 2 setup values.
To compute the time of a changeover the algorithm will evaluate all rules in sequence (in order of priority).
For a rule to match the changeover between the original setup X to a new setup Y, two conditions need to be fulfilled:
- The original setup X must match with the fromsetup of the rule.
If the fromsetup field is empty, it is considered a match. - The new setup Y must match with the tosetup of the rule.
If the tosetup field is empty, it is considered a match. The wildcard characters * and ? can be used in the fromsetup and tosetup fields.
As soon as a matching rule is found, it is applied and subsequent rules are not evaluated.
If no matching rule is found, the changeover is not allowed: a NULL pointer is returned.
Definition at line 420 of file setupmatrix.cpp.
SetupMatrix::Rule * frepple::SetupMatrix::createRule | ( | const AttributeList & | atts | ) |
This is a factory method that creates a new rule
This method is intended to be used to create objects when reading XML input data.
Definition at line 128 of file setupmatrix.cpp.
void frepple::SetupMatrix::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.
Reimplemented from frepple::utils::HasName< SetupMatrix >.
Definition at line 190 of file setupmatrix.cpp.
RuleIterator frepple::SetupMatrix::endRules | ( | ) | const [inline] |
PyObject * frepple::SetupMatrix::getattro | ( | const Attribute & | attr | ) | [virtual] |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 196 of file setupmatrix.cpp.
virtual size_t frepple::SetupMatrix::getSize | ( | ) | const [inline, virtual] |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
Reimplemented in frepple::SetupMatrixDefault.
virtual const MetaClass& frepple::SetupMatrix::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::SetupMatrixDefault.
int frepple::SetupMatrix::initialize | ( | ) | [static] |
Reimplemented in frepple::SetupMatrixDefault.
Definition at line 39 of file setupmatrix.cpp.
int frepple::SetupMatrix::setattro | ( | const Attribute & | attr, |
const PythonObject & | field | ||
) | [virtual] |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 206 of file setupmatrix.cpp.
void frepple::SetupMatrix::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.
Definition at line 93 of file setupmatrix.cpp.
Member Data Documentation
const MetaCategory * frepple::SetupMatrix::metadata [static] |
Reimplemented in frepple::SetupMatrixDefault.
The documentation for this class was generated from the following files:
Documentation generated for frePPLe by
