Timetabler
|
Class for data. More...
#include <data.h>
Public Member Functions | |
Data () | |
Constructs the Data object. More... | |
Public Attributes | |
std::vector< Course > | courses |
std::vector< Instructor > | instructors |
std::vector< Classroom > | classrooms |
std::vector< Program > | programs |
std::vector< Segment > | segments |
std::vector< Slot > | slots |
std::vector< IsMinor > | isMinors |
std::vector< std::vector< std::vector< Var > > > | fieldValueVars |
std::vector< std::vector< Var > > | highLevelVars |
std::vector< std::vector< Var > > | predefinedConstraintVars |
std::vector< Var > | customConstraintVars |
std::vector< std::vector< std::vector< lbool > > > | existingAssignmentVars |
std::vector< int > | highLevelVarWeights |
std::vector< int > | existingAssignmentWeights |
std::vector< int > | predefinedClausesWeights |
std::map< int, unsigned > | customMap |
Class for data.
This represents all the data taken from the input. This contains the list of all the allowed field values for each FieldType, the variables for each (Course, FieldType, field value), the high level variables used for providing reasons if a time table could not be created, the existing assignments given in the input, and the weights of every constraint and exisiting assignment. Most of this data is populated by the Parser after parsing fields and inputs.
Data::Data | ( | ) |
Constructs the Data object.
This fills in the default weight values for all the clauses. Other members are left uninitialized and are filled in by the Parser.
Definition at line 11 of file data.cpp.
References existingAssignmentWeights, Global::FIELD_COUNT, highLevelVarWeights, Global::PREDEFINED_CLAUSES_COUNT, and predefinedClausesWeights.
std::vector<Classroom> Data::classrooms |
Stores objects for each possible Classroom
Definition at line 44 of file data.h.
Referenced by Parser::addVars().
std::vector<Course> Data::courses |
Stores objects for each Course in the input
Definition at line 36 of file data.h.
Referenced by Parser::addVars(), ConstraintAdder::ConstraintAdder(), and Parser::verify().
std::vector<Var> Data::customConstraintVars |
std::map<int, unsigned> Data::customMap |
std::vector<std::vector<std::vector<lbool> > > Data::existingAssignmentVars |
Stores the existing assignments for every Course and FieldType as given in the input. This is of the form (Course, FieldType, field value), where if assigned true, the element is assigned l_True, and if false, is assigned l_False. If no assignment is given, such as for a Classroom or a Slot, the assigned value is l_Undef.
Definition at line 98 of file data.h.
Referenced by Parser::parseInput().
std::vector<int> Data::existingAssignmentWeights |
Stores the weights for the existing assignments given by the user in the input. This represents the weight that must be given in the soft clauses that ask that the value assigned be the value that the user gave as input. Negative weights imply the clause is hard, and a zero weight implies that the input can be ignored completely.
Definition at line 116 of file data.h.
Referenced by Data().
std::vector<std::vector<std::vector<Var> > > Data::fieldValueVars |
Stores the primary variables used in the solver. The variables are in a 3D vector form. They can be represented as a 3-tuple, (Course, FieldType, field value), where the first two dimensions represent the Course and the FieldType the variable represents, and the third dimension represents which field value of the given FieldType, out of the allowed field values, the variable corresponds to. These variables are added to the solver by the Parser.
Definition at line 73 of file data.h.
Referenced by ConstraintEncoder::ConstraintEncoder().
std::vector<std::vector<Var> > Data::highLevelVars |
std::vector<int> Data::highLevelVarWeights |
Stores the weights for the high level variables of each FieldType. This represents the weight that must be given to soft clauses which ensure that a value is found for each FieldType for every Course. Negative weights imply the clause is hard, and a zero weight implies that the input can be ignored completely.
Definition at line 107 of file data.h.
Referenced by Data().
std::vector<Instructor> Data::instructors |
Stores objects for each possible Instructor
std::vector<IsMinor> Data::isMinors |
std::vector<int> Data::predefinedClausesWeights |
Stores the weights for the predefined clauses for the time tabling problem. These have default values -1 for the default hard constraints, and 1 for the soft constraints. Changing these can be used to toggle between hard and soft or to disable certain constraints.
Definition at line 124 of file data.h.
Referenced by ConstraintAdder::addConstraints(), ConstraintAdder::addSingleConstraint(), Data(), and Parser::verify().
std::vector<std::vector<Var> > Data::predefinedConstraintVars |
Stores the high level variables associated with the predefined constraints.
Definition at line 85 of file data.h.
Referenced by ConstraintAdder::addSingleConstraint().
std::vector<Program> Data::programs |
std::vector<Segment> Data::segments |
std::vector<Slot> Data::slots |
Stores objects for each possible Slot
Definition at line 56 of file data.h.
Referenced by Parser::verify().