FET - How to add new types of constraints
-----------------------------------------

TIME CONSTRAINTS:
-----------------

To implement new constraints (into the sources of FET), you will have to think
at these aspects:

- First of all, all the constraints are derived from the class TimeConstraint,
which has some pure virtual functions which you must inherit and implement.
This means that I could have added a kind of plug-ins, but for the moment
I preferred the easier solution.

- There are constraints refering to teachers. You can use the table "teachersMatrix"
for this purpose. This is an array a[MAX_TEACHERS][MAX_DAYS_PER_WEEK][MAX_HOURS_PER_DAY].
It is already calculated when you enter the constraint, so do not bother to
think how to compute it. Each location in this array has a value. If it is 0,
then you have no activity at that time. If it is 1, then you have a biweekly activity
scheduled. If it is 2, you have a weekly activity scheduled then. If it is greater
than 2, then you have more than 2 activities (so, a basic compulsory constraints conflict)
(for instance, 3 means one weekly activity and a biweekly one or 3 biweekly activities).
Now, you can manipulate information in this matrix to return an integer value, which is
the number of conflicts. The best way is to provide an evolutionary path for your
objective (for instance, if you want a teacher to have 4 weekly activities on Monday,
the best way would be to return the modulus of 8 (4*2) minus the sum of the column
for Monday.

- There are constraints referring to students. Please treat them identically with
those referring to teachers.

- There are constraints referring to subjects - TODO
	- You have here the ConstraintSubjectRequiresRoom - please see that as an example.

- There are constraints referring to the activities. You can work on the matrices
teachersMatrix and studentsMatrix or you can use directly the array times of the
candidate solution (chromosome). This array is named times[MAX_ACTIVITIES] and each
location contains the starting time of the corresponding activity (times[i] contains
the starting time of activity i, which is the i-th activity in the list of
activities). Starting time means nDaysPerWeek*hour+day, so you can obtain
the hour and day by a divide and modulo operation. Having the starting time
of each activity, it is easy to write a procedure to handle any kind of constraint.
You are advised to respect the same principle of evolution, that is, as the candidate
solution is getting closer to a global solution, the conflicts factor must decrease
(gradually).

- The places you will have to look over and modify are:
	engine:
	- timeconstraint.h and timeconstraint.cpp
	- rules.cpp, function "read"
	- rules.cpp - when erasing activities, teachers, students or rooms referring to your
	constraint, you must take care to erase also your constraint or a part of it.
	- rules.cpp - when renaming teachers etc.
	- there are some special kinds of constraints, which hopefully you can avoid.
	For instance, compulsory ConstraintActivitiesSameTime and ConstraintActivityPreferredTime
	work by repairing.

	interface:
	- you will have to modify fetmainform_template.ui, fetmainform.h and fetmainform.cpp 
	and add some new files,	named correspondigly (e-mail me if uncertain).
	- you will have to modify alltimeconstraintsform.cpp.


SPACE CONSTRAINTS:
------------------
TODO
