Back to index

fet  5.18.0
Classes | Typedefs | Functions | Variables
timeconstraint.h File Reference
#include <QCoreApplication>
#include "timetable_defs.h"
#include <QString>
#include <QList>
#include <QStringList>

Go to the source code of this file.

Classes

class  TimeConstraint
 This class represents a time constraint. More...
class  ConstraintBasicCompulsoryTime
 This class comprises all the basic compulsory constraints (constraints which must be fulfilled for any timetable) - the time allocation part. More...
class  ConstraintTeacherNotAvailableTimes
class  ConstraintStudentsSetNotAvailableTimes
class  ConstraintActivitiesSameStartingTime
class  ConstraintActivitiesNotOverlapping
 This is a constraint. More...
class  ConstraintMinDaysBetweenActivities
 This is a constraint. More...
class  ConstraintMaxDaysBetweenActivities
class  ConstraintMinGapsBetweenActivities
class  ConstraintTeachersMaxHoursDaily
 This is a constraint, aimed at obtaining timetables which do not allow more than X hours in a day for any teacher. More...
class  ConstraintTeacherMaxHoursDaily
class  ConstraintTeachersMaxHoursContinuously
 This is a constraint, aimed at obtaining timetables which do not allow more than X hours in a row for any teacher. More...
class  ConstraintTeacherMaxHoursContinuously
class  ConstraintTeachersActivityTagMaxHoursContinuously
class  ConstraintTeacherActivityTagMaxHoursContinuously
class  ConstraintTeacherMaxDaysPerWeek
 This is a constraint. More...
class  ConstraintTeachersMaxDaysPerWeek
class  ConstraintTeacherMinDaysPerWeek
class  ConstraintTeachersMinDaysPerWeek
class  ConstraintBreakTimes
 This is a constraint. More...
class  ConstraintStudentsMaxGapsPerWeek
 This is a constraint. More...
class  ConstraintStudentsSetMaxGapsPerWeek
 This is a constraint. More...
class  ConstraintTeachersMaxGapsPerWeek
class  ConstraintTeacherMaxGapsPerWeek
class  ConstraintTeachersMaxGapsPerDay
class  ConstraintTeacherMaxGapsPerDay
class  ConstraintStudentsEarlyMaxBeginningsAtSecondHour
 This is a constraint. More...
class  ConstraintStudentsSetEarlyMaxBeginningsAtSecondHour
class  ConstraintStudentsMaxHoursDaily
class  ConstraintStudentsSetMaxHoursDaily
class  ConstraintStudentsMaxHoursContinuously
class  ConstraintStudentsSetMaxHoursContinuously
class  ConstraintStudentsActivityTagMaxHoursContinuously
class  ConstraintStudentsSetActivityTagMaxHoursContinuously
class  ConstraintStudentsMinHoursDaily
class  ConstraintStudentsSetMinHoursDaily
class  ConstraintActivityPreferredStartingTime
 This is a constraint. More...
class  ConstraintActivityPreferredTimeSlots
 This is a constraint. More...
class  ConstraintActivityPreferredStartingTimes
class  ConstraintActivitiesPreferredTimeSlots
 This is a constraint. More...
class  ConstraintSubactivitiesPreferredTimeSlots
class  ConstraintActivitiesPreferredStartingTimes
class  ConstraintSubactivitiesPreferredStartingTimes
class  ConstraintActivitiesSameStartingHour
class  ConstraintActivitiesSameStartingDay
class  ConstraintTwoActivitiesConsecutive
class  ConstraintTwoActivitiesGrouped
class  ConstraintThreeActivitiesGrouped
class  ConstraintTwoActivitiesOrdered
class  ConstraintActivityEndsStudentsDay
class  ConstraintTeachersMinHoursDaily
class  ConstraintTeacherMinHoursDaily
class  ConstraintTeacherIntervalMaxDaysPerWeek
class  ConstraintTeachersIntervalMaxDaysPerWeek
class  ConstraintStudentsSetIntervalMaxDaysPerWeek
class  ConstraintStudentsIntervalMaxDaysPerWeek
class  ConstraintActivitiesEndStudentsDay
class  ConstraintTeachersActivityTagMaxHoursDaily
class  ConstraintTeacherActivityTagMaxHoursDaily
class  ConstraintStudentsActivityTagMaxHoursDaily
class  ConstraintStudentsSetActivityTagMaxHoursDaily
class  ConstraintStudentsMaxGapsPerDay
class  ConstraintStudentsSetMaxGapsPerDay
class  ConstraintActivitiesOccupyMaxTimeSlotsFromSelection
class  ConstraintActivitiesMaxSimultaneousInSelectedTimeSlots

Typedefs

typedef QList< TimeConstraint * > TimeConstraintsList

Functions

QString getActivityDetailedDescription (Rules &r, int id)

Variables

const int CONSTRAINT_GENERIC_TIME = 0
const int CONSTRAINT_BASIC_COMPULSORY_TIME = 1
const int CONSTRAINT_BREAK_TIMES = 2
const int CONSTRAINT_TEACHER_NOT_AVAILABLE_TIMES = 3
const int CONSTRAINT_TEACHERS_MAX_HOURS_DAILY = 4
const int CONSTRAINT_TEACHER_MAX_DAYS_PER_WEEK = 5
const int CONSTRAINT_TEACHERS_MAX_GAPS_PER_WEEK = 6
const int CONSTRAINT_TEACHER_MAX_GAPS_PER_WEEK = 7
const int CONSTRAINT_TEACHER_MAX_HOURS_DAILY = 8
const int CONSTRAINT_TEACHERS_MAX_HOURS_CONTINUOUSLY = 9
const int CONSTRAINT_TEACHER_MAX_HOURS_CONTINUOUSLY = 10
const int CONSTRAINT_TEACHERS_MIN_HOURS_DAILY = 11
const int CONSTRAINT_TEACHER_MIN_HOURS_DAILY = 12
const int CONSTRAINT_TEACHERS_MAX_GAPS_PER_DAY = 13
const int CONSTRAINT_TEACHER_MAX_GAPS_PER_DAY = 14
const int CONSTRAINT_STUDENTS_EARLY_MAX_BEGINNINGS_AT_SECOND_HOUR = 15
const int CONSTRAINT_STUDENTS_SET_EARLY_MAX_BEGINNINGS_AT_SECOND_HOUR = 16
const int CONSTRAINT_STUDENTS_SET_NOT_AVAILABLE_TIMES = 17
const int CONSTRAINT_STUDENTS_MAX_GAPS_PER_WEEK = 18
const int CONSTRAINT_STUDENTS_SET_MAX_GAPS_PER_WEEK = 19
const int CONSTRAINT_STUDENTS_MAX_HOURS_DAILY = 20
const int CONSTRAINT_STUDENTS_SET_MAX_HOURS_DAILY = 21
const int CONSTRAINT_STUDENTS_MAX_HOURS_CONTINUOUSLY = 22
const int CONSTRAINT_STUDENTS_SET_MAX_HOURS_CONTINUOUSLY = 23
const int CONSTRAINT_STUDENTS_MIN_HOURS_DAILY = 24
const int CONSTRAINT_STUDENTS_SET_MIN_HOURS_DAILY = 25
const int CONSTRAINT_ACTIVITY_ENDS_STUDENTS_DAY = 26
const int CONSTRAINT_ACTIVITY_PREFERRED_STARTING_TIME = 27
const int CONSTRAINT_ACTIVITIES_SAME_STARTING_TIME = 28
const int CONSTRAINT_ACTIVITIES_NOT_OVERLAPPING = 29
const int CONSTRAINT_MIN_DAYS_BETWEEN_ACTIVITIES = 30
const int CONSTRAINT_ACTIVITY_PREFERRED_TIME_SLOTS = 31
const int CONSTRAINT_ACTIVITIES_PREFERRED_TIME_SLOTS = 32
const int CONSTRAINT_ACTIVITY_PREFERRED_STARTING_TIMES = 33
const int CONSTRAINT_ACTIVITIES_PREFERRED_STARTING_TIMES = 34
const int CONSTRAINT_ACTIVITIES_SAME_STARTING_HOUR = 35
const int CONSTRAINT_ACTIVITIES_SAME_STARTING_DAY = 36
const int CONSTRAINT_TWO_ACTIVITIES_CONSECUTIVE = 37
const int CONSTRAINT_TWO_ACTIVITIES_ORDERED = 38
const int CONSTRAINT_MIN_GAPS_BETWEEN_ACTIVITIES = 39
const int CONSTRAINT_SUBACTIVITIES_PREFERRED_TIME_SLOTS = 40
const int CONSTRAINT_SUBACTIVITIES_PREFERRED_STARTING_TIMES = 41
const int CONSTRAINT_TEACHER_INTERVAL_MAX_DAYS_PER_WEEK = 42
const int CONSTRAINT_TEACHERS_INTERVAL_MAX_DAYS_PER_WEEK = 43
const int CONSTRAINT_STUDENTS_SET_INTERVAL_MAX_DAYS_PER_WEEK = 44
const int CONSTRAINT_STUDENTS_INTERVAL_MAX_DAYS_PER_WEEK = 45
const int CONSTRAINT_ACTIVITIES_END_STUDENTS_DAY = 46
const int CONSTRAINT_TWO_ACTIVITIES_GROUPED = 47
const int CONSTRAINT_TEACHERS_ACTIVITY_TAG_MAX_HOURS_CONTINUOUSLY = 48
const int CONSTRAINT_TEACHER_ACTIVITY_TAG_MAX_HOURS_CONTINUOUSLY = 49
const int CONSTRAINT_STUDENTS_ACTIVITY_TAG_MAX_HOURS_CONTINUOUSLY = 50
const int CONSTRAINT_STUDENTS_SET_ACTIVITY_TAG_MAX_HOURS_CONTINUOUSLY = 51
const int CONSTRAINT_TEACHERS_MAX_DAYS_PER_WEEK = 52
const int CONSTRAINT_THREE_ACTIVITIES_GROUPED = 53
const int CONSTRAINT_MAX_DAYS_BETWEEN_ACTIVITIES = 54
const int CONSTRAINT_TEACHERS_MIN_DAYS_PER_WEEK = 55
const int CONSTRAINT_TEACHER_MIN_DAYS_PER_WEEK = 56
const int CONSTRAINT_TEACHERS_ACTIVITY_TAG_MAX_HOURS_DAILY = 57
const int CONSTRAINT_TEACHER_ACTIVITY_TAG_MAX_HOURS_DAILY = 58
const int CONSTRAINT_STUDENTS_ACTIVITY_TAG_MAX_HOURS_DAILY = 59
const int CONSTRAINT_STUDENTS_SET_ACTIVITY_TAG_MAX_HOURS_DAILY = 60
const int CONSTRAINT_STUDENTS_MAX_GAPS_PER_DAY = 61
const int CONSTRAINT_STUDENTS_SET_MAX_GAPS_PER_DAY = 62
const int CONSTRAINT_ACTIVITIES_OCCUPY_MAX_TIME_SLOTS_FROM_SELECTION = 63
const int CONSTRAINT_ACTIVITIES_MAX_SIMULTANEOUS_IN_SELECTED_TIME_SLOTS = 64

Typedef Documentation

Definition at line 45 of file timeconstraint.h.


Function Documentation

QString getActivityDetailedDescription ( Rules r,
int  id 
)

Definition at line 85 of file timeconstraint.cpp.

                                                        {
       QString s;

       int ai;
       for(ai=0; ai<r.activitiesList.size(); ai++)
              if(r.activitiesList[ai]->id==id)
                     break;
       
       if(ai==r.activitiesList.size()){
              s+=QCoreApplication::translate("Activity", "Invalid (inexistent) id for activity");
              return s;
       }
       assert(ai<r.activitiesList.size());
       
       Activity* act=r.activitiesList.at(ai);
       
       if(act->activityTagsNames.count()>0){
              s+=QCoreApplication::translate("Activity", "T:%1, S:%2, AT:%3, St:%4", "This is an important translation for an activity's detailed description, please take care (it appears in many places in constraints)."
               "The abbreviations are: Teachers, Subject, Activity tags, Students. This variant includes activity tags").arg(act->teachersNames.join(",")).arg(act->subjectName).arg(act->activityTagsNames.join(",")).arg(act->studentsNames.join(","));
       }
       else{
              s+=QCoreApplication::translate("Activity", "T:%1, S:%2, St:%3", "This is an important translation for an activity's detailed description, please take care (it appears in many places in constraints)."
               "The abbreviations are: Teachers, Subject, Students. There are no activity tags here").arg(act->teachersNames.join(",")).arg(act->subjectName).arg(act->studentsNames.join(","));
       }
       return s;
}

Variable Documentation

Definition at line 104 of file timeconstraint.h.

Definition at line 130 of file timeconstraint.h.

Definition at line 85 of file timeconstraint.h.

Definition at line 129 of file timeconstraint.h.

Definition at line 90 of file timeconstraint.h.

Definition at line 88 of file timeconstraint.h.

Definition at line 92 of file timeconstraint.h.

Definition at line 91 of file timeconstraint.h.

Definition at line 84 of file timeconstraint.h.

Definition at line 82 of file timeconstraint.h.

Definition at line 83 of file timeconstraint.h.

Definition at line 89 of file timeconstraint.h.

Definition at line 87 of file timeconstraint.h.

Definition at line 51 of file timeconstraint.h.

const int CONSTRAINT_BREAK_TIMES = 2

Definition at line 52 of file timeconstraint.h.

const int CONSTRAINT_GENERIC_TIME = 0

Definition at line 49 of file timeconstraint.h.

Definition at line 116 of file timeconstraint.h.

Definition at line 86 of file timeconstraint.h.

Definition at line 95 of file timeconstraint.h.

Definition at line 110 of file timeconstraint.h.

Definition at line 123 of file timeconstraint.h.

Definition at line 68 of file timeconstraint.h.

Definition at line 102 of file timeconstraint.h.

Definition at line 126 of file timeconstraint.h.

Definition at line 71 of file timeconstraint.h.

Definition at line 76 of file timeconstraint.h.

Definition at line 74 of file timeconstraint.h.

Definition at line 79 of file timeconstraint.h.

Definition at line 111 of file timeconstraint.h.

Definition at line 124 of file timeconstraint.h.

Definition at line 69 of file timeconstraint.h.

Definition at line 101 of file timeconstraint.h.

Definition at line 127 of file timeconstraint.h.

Definition at line 72 of file timeconstraint.h.

Definition at line 77 of file timeconstraint.h.

Definition at line 75 of file timeconstraint.h.

Definition at line 80 of file timeconstraint.h.

Definition at line 70 of file timeconstraint.h.

Definition at line 97 of file timeconstraint.h.

Definition at line 96 of file timeconstraint.h.

Definition at line 109 of file timeconstraint.h.

Definition at line 122 of file timeconstraint.h.

Definition at line 99 of file timeconstraint.h.

Definition at line 56 of file timeconstraint.h.

Definition at line 66 of file timeconstraint.h.

Definition at line 58 of file timeconstraint.h.

Definition at line 61 of file timeconstraint.h.

Definition at line 59 of file timeconstraint.h.

Definition at line 119 of file timeconstraint.h.

Definition at line 64 of file timeconstraint.h.

Definition at line 54 of file timeconstraint.h.

Definition at line 108 of file timeconstraint.h.

Definition at line 121 of file timeconstraint.h.

Definition at line 100 of file timeconstraint.h.

Definition at line 113 of file timeconstraint.h.

Definition at line 65 of file timeconstraint.h.

Definition at line 57 of file timeconstraint.h.

Definition at line 60 of file timeconstraint.h.

Definition at line 55 of file timeconstraint.h.

Definition at line 118 of file timeconstraint.h.

Definition at line 63 of file timeconstraint.h.

Definition at line 115 of file timeconstraint.h.

Definition at line 93 of file timeconstraint.h.

Definition at line 106 of file timeconstraint.h.

Definition at line 94 of file timeconstraint.h.