The Key part of using a CSP solver is making sure the constraints are set correctly, below is a list of all the constraints, the code used to set them and an explanation of what it does.
Student Exam Constraints
Core modules are fixed at students cannot have more than one exam on this day (In red on timetable)
Other modules are fixed in date and time (In yellow on timetable )
Avoid scheduling an exam in slots with no exams such as bank holidays
No more than three exams in two days
No more than four exams in five consecutive days (Monday to Friday)
Module leaders can’t have more than one exam in the third week
Students who have more than 50% extra time shouldn't have more than one exam a day
Ideally students who have 25% extra time shouldn't have more than one exam a day (soft)
Spread out module leaders exams (soft)
Have no exams on Tuesday and Wednesday morning in week 3 (soft)
How to minimize soft constraints
Room constraints - check
Enough capacity to take everyone
No room is being used in the same slot twice
PC exams must be in a PC room
Minimise amount of rooms used for each exam and ensure each exam has at least one room