![]() |
MineLink
|
Defines the base class for all constraints. More...
#include <constraint.h>
Public Member Functions | |
Constraint (const string &name) | |
Creates a constraint with given name. More... | |
virtual | ~Constraint () |
Destructor. More... | |
virtual bool | Check (const delphos::Schedule &sch) const |
Checks if the given schedule satisfies the constraint. More... | |
virtual bool | Check (const delphos::FractionalSchedule &fsch) const |
Checks if the given fractional schedule satisfies the constraint. More... | |
virtual string | ToXML (const unsigned int identation_level=0) const |
A XML string describing the constraint. More... | |
const char * | TypeName () const |
a char string used a identifier in the XML representation of the constraint. | |
Defines the base class for all constraints.
A constraint is a condition that must be fulfilled by a schedule 'solving' a scheduling instance.
This class provides dummy implementations of the base methods, which are expected to be defined by sub-classes.
The class also provides utility functions to create XML representations of the constraints.
delphos::Constraint::Constraint | ( | const string & | name | ) |
Creates a constraint with given name.
name | A name describing the constraint. |
Creates a new constraint with given name.
|
virtual |
Destructor.
Destructor.
|
virtual |
Checks if the given schedule satisfies the constraint.
sch | The schedule to be checked. |
This method checks if the given schedule satisfies the constraint (returning true) or not (return false).
For this class, a dummy version that always return false.
Reimplemented in delphos::GeometricConstraint, delphos::BlockSelectionPrecedenceConstraint, delphos::PrecedenceConstraint, delphos::AttributeAvgConstraint, delphos::AttributeSumConstraint, delphos::MinExtractPeriodConstraint, delphos::DoNotSendToConstraint, delphos::DoNotMineBeforeConstraint, and delphos::ForceMiningByConstraint.
|
virtual |
Checks if the given fractional schedule satisfies the constraint.
fsch | The fractional schedule to be checked. |
This method checks if the given schedule satisfies the constraint (returning true) or not (return false).
For this class, a dummy version that always return false.
Reimplemented in delphos::GeometricConstraint, delphos::BlockSelectionPrecedenceConstraint, delphos::PrecedenceConstraint, delphos::AttributeAvgConstraint, delphos::AttributeSumConstraint, delphos::DoNotSendToConstraint, delphos::DoNotMineBeforeConstraint, and delphos::ForceMiningByConstraint.
|
virtual |
A XML string describing the constraint.
identation_level | Identation level of the XML produced. |
Constructs a XML string describing the constraint's name and potential attributes.