UniTime / unitime

Comprehensive University Timetabling System
http://www.unitime.org
Apache License 2.0
274 stars 162 forks source link

Student exam constrain #172

Closed Animeakihabara closed 3 months ago

Animeakihabara commented 3 months ago

Is there any way to limit the max student can have exam per day or max student can have exam per exam period?

tomas-muller commented 3 months ago

It is currently not possible to limit the number of students who will have exams during a particular period or on a particular day.

The constraints are per student, namely:

Animeakihabara commented 3 months ago

how can i setting up these constraints, about the name, the value, ... of these constraints in unitime?

tomas-muller commented 3 months ago

The direct student conflicts, more than two exams on a day student conflicts, and back-to-back (distance) student conflicts are configured automatically. You can modify the solver weights for a particular solver configuration on the Administration > Solver > Configuration page. Together with the weights on the periods, rooms, and soft distribution preferences.

Animeakihabara commented 3 months ago

That mean, when i want minimizing more than two exams on a day I just need increase the value higher than the value of others constraints

tomas-muller commented 3 months ago

The objective function the solver tries to minimize is a weighted sum of the various criteria. So, yes, putting a higher weight on a particular criterion (such as more than two exams on a day student conflicts) will make the solver concentrate on the criterion more.

shaftain commented 3 months ago

I have question related to this discussion, @tomas-muller, you mentioned in your reply:

  • optionally, there is a variant minimizing two or more exams on a day

How to enable this option? Is there any Property that needs to be entered in Application Settings?

tomas-muller commented 3 months ago

The more than one examination on a day is implemented as an additional criterion StudentMoreThan1ADayConflicts. The class name needs to be added to the additional criteria for the solver (which contains a semicolon-separated list of additional criteria that are to be used).

This can be done on the Administration > Solver > Parameters page, select Examinations: General Parameters, and edit the Exams.AdditionalCriteria parameter so that it contains

org.cpsolver.exam.criteria.additional.DistanceToStronglyPreferredRoom;org.cpsolver.exam.criteria.additional.StudentMoreThan1ADayConflicts

as the default value (or just the org.cpsolver.exam.criteria.additional.StudentMoreThan1ADayConflicts).

Screenshot 2024-06-05 at 15 16 40