Timetabler
|
Class for constraint adder. More...
#include <constraint_adder.h>
Public Member Functions | |
ConstraintAdder (ConstraintEncoder *, Timetabler *) | |
Constructs the ConstraintAdder object. More... | |
void | addConstraints () |
Adds all the constraints with their respective weights using the Timetabler object to the solver. | |
void | addSingleConstraint (PredefinedClauses, const Clauses &) |
Adds a single predefined constraint to the solver. More... | |
Class for constraint adder.
This class is responsible for interpreting each constraint at a high level and creating clauses to represent them. This class contains functions each which represents a high level constraint. In the function, courses are iterated over and calls are made to an object of ConstraintEncoder to get Clauses corresponding to lower level constraints for a given course, which are then joined together using the defined operations. It also contains functions to add these predefined constraints with their prescribed weights to the Timetabler, which then adds it to the solver.
ConstraintAdder::ConstraintAdder | ( | ConstraintEncoder * | encoder, |
Timetabler * | timetabler | ||
) |
Constructs the ConstraintAdder object.
encoder | The encoder |
timetabler | The time tabler |
void ConstraintAdder::addSingleConstraint | ( | PredefinedClauses | clauseType, |
const Clauses & | clauses | ||
) |
Adds a single predefined constraint to the solver.
[in] | clauseType | The PredefinedClauses member denoting the constraint type |
[in] | clauses | The clauses to be added |