UniTime / cpsolver

Local-search based solver of Constraint Satisfaction and Optimization Problems
http://www.cpsolver.org
GNU Lesser General Public License v3.0
60 stars 35 forks source link

Information about course timetabling #22

Closed davide-dv closed 2 years ago

davide-dv commented 2 years ago

I have a question related to this issue https://github.com/UniTime/cpsolver/issues/7 . Have there been any updates since the closure of this issue or has the logic remained the same?

If I divide a class into several subparts, can I use the same class id several times to use a unique id for the constraints? Also, if I define a child class to a parent class and use the id of the parent class in the constraints, will the child class be affected by the same constraints?

Thank you in advance.

tomas-muller commented 2 years ago

The possible times of a class are still modeled the same. That is, each placement can take only a single time location (one combination of start time, length, days of the week, and date pattern). Allowing for more would make the domains way too big and impractical for the solver to work with. There are also no plans to change this in the future -- if a class needs to meet at two different times during a week, it should really be two classes.

No, class id must be unique. The distribution/group constraints only apply to the classes they are listed on -- they will not get automatically applied to all children classes. The CPSolver only uses the parent-child relation between classes for student sectioning (assignment of students to individual classes). While there can be additional distribution constraints devised from the course structure, this happens outside of the CPSolver -- e.g., when the data are loaded into the solver in UniTime.