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 () | |
![]() | |
int | compare (const PyObject *other) const |
HasName (const string &n) | |
HasName (const char *n) | |
void | setName (const string &newname) |
virtual PyObject * | str () const |
~HasName () | |
![]() | |
TreeNode * | decrement () const |
const string & | getName () const |
TreeNode * | increment () const |
bool | operator< (const TreeNode &o) |
TreeNode (const string &n) | |
virtual | ~TreeNode () |
![]() | |
virtual bool | getHidden () const |
Object () | |
virtual void | setHidden (bool b) |
virtual | ~Object () |
![]() | |
virtual PyObject * | call (const PythonObject &args, const PythonObject &kwds) |
Py_ssize_t | getReferenceCount () const |
void | initType (const MetaClass *t) |
void | initType (PyTypeObject *t) |
virtual PyObject * | iternext () |
PythonExtensionBase () | |
void | resetReferenceCount () |
virtual | ~PythonExtensionBase () |
Static Public Member Functions | |
static PyObject * | addPythonRule (PyObject *, PyObject *, PyObject *) |
static int | initialize () |
![]() | |
static SetupMatrix * | add (const string &k, const MetaClass &cls) |
static SetupMatrix * | add (SetupMatrix *t) |
static SetupMatrix * | add (SetupMatrix *t, SetupMatrix *hint) |
static iterator | begin () |
static void | clear () |
static bool | empty () |
static iterator | end () |
static SetupMatrix * | find (const string &k) |
static SetupMatrix * | findLowerBound (const string &k, bool *f=NULL) |
static Object * | reader (const MetaClass *cat, const AttributeList &in) |
static size_t | size () |
static void | verify () |
static void | writer (const MetaCategory *c, XMLOutput *o) |
![]() | |
template<class T > | |
static PyObject * | create (PyTypeObject *pytype, PyObject *args, PyObject *kwds) |
template<class T > | |
static Object * | createDefault () |
template<class T > | |
static Object * | createString (const string &n) |
static PyObject * | toXML (PyObject *, PyObject *) |
Static Public Attributes | |
static const MetaCategory * | metadata |
This class is used to represent a matrix defining the changeover times between setups.
|
inline |
frepple::SetupMatrix::~SetupMatrix | ( | ) |
Destructor.
Definition at line 76 of file setupmatrix.cpp.
|
static |
Python interface to add a new rule.
Definition at line 211 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 114 of file setupmatrix.cpp.
|
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:
Definition at line 415 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 123 of file setupmatrix.cpp.
|
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 185 of file setupmatrix.cpp.
|
inline |
|
virtual |
Default getattro method.
Subclasses are expected to implement an override if the type supports gettattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 191 of file setupmatrix.cpp.
|
inlinevirtual |
Return the memory size of the object in bytes.
Implements frepple::utils::Object.
Reimplemented in frepple::SetupMatrixDefault.
|
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::SetupMatrixDefault.
|
static |
Reimplemented in frepple::SetupMatrixDefault.
Definition at line 33 of file setupmatrix.cpp.
|
virtual |
Default setattro method.
Subclasses are expected to implement an override if the type supports settattro.
Reimplemented from frepple::utils::PythonExtensionBase.
Definition at line 201 of file setupmatrix.cpp.
|
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 88 of file setupmatrix.cpp.
|
static |
Reimplemented in frepple::SetupMatrixDefault.