Timetabler
Public Member Functions | List of all members
ConstraintAdder Class Reference

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

Detailed Description

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.

Constructor & Destructor Documentation

ConstraintAdder::ConstraintAdder ( ConstraintEncoder encoder,
Timetabler timetabler 
)

Constructs the ConstraintAdder object.

Parameters
encoderThe encoder
timetablerThe time tabler

Member Function Documentation

void ConstraintAdder::addSingleConstraint ( PredefinedClauses  clauseType,
const Clauses clauses 
)

Adds a single predefined constraint to the solver.

Parameters
[in]clauseTypeThe PredefinedClauses member denoting the constraint type
[in]clausesThe clauses to be added

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