This class is used to represent a matrix defining the changeover times between setups. More...

#include <model.h>

Inheritance diagram for frepple::SetupMatrix:

List of all members.

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
RulecalculateSetup (const string, const string) const
RulecreateRule (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 MetaClassgetType () 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 MetaCategorymetadata

Detailed Description

This class is used to represent a matrix defining the changeover times between setups.

Definition at line 3771 of file model.h.


Constructor & Destructor Documentation

frepple::SetupMatrix::SetupMatrix ( const string &  n) [inline]

Default constructor.

Definition at line 3887 of file model.h.

frepple::SetupMatrix::~SetupMatrix ( )

Destructor.

Definition at line 82 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 217 of file setupmatrix.cpp.

void frepple::SetupMatrix::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 120 of file setupmatrix.cpp.

RuleIterator frepple::SetupMatrix::beginRules ( ) const [inline]

Returns an iterator to go through the list of buckets.

Definition at line 3919 of file model.h.

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 419 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 129 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 191 of file setupmatrix.cpp.

RuleIterator frepple::SetupMatrix::endRules ( ) const [inline]

Returns an iterator to go through the list of buckets.

Definition at line 3922 of file model.h.

size_t frepple::SetupMatrix::extrasize ( ) const [inline]

Definition at line 3916 of file model.h.

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 197 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.

Definition at line 3908 of file model.h.

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.

Definition at line 3905 of file model.h.

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

Reimplemented in frepple::SetupMatrixDefault.

Definition at line 40 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 207 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 94 of file setupmatrix.cpp.


Member Data Documentation

Reimplemented in frepple::SetupMatrixDefault.

Definition at line 3906 of file model.h.


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

Documentation generated for frePPLe by  doxygen