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

Online class restriction #15

Closed KarthikRv93 closed 5 years ago

KarthikRv93 commented 5 years ago

@tomas-muller, I had some query regarding the solver report. In the Instructor solver, I see that there is a perturbation percentage report. What does the perturbation percentage indicate? How does it affect the solver result?

Continuation of this question : https://github.com/UniTime/unitime/issues/48#issuecomment-476748856 I have added a hard constraint of the online classes, but the perturbation percentage went up from 0.34% to 70%.

tomas-muller commented 5 years ago

When the solver is in the MPP (Minimal Perturbation Problem) mode, it is desired to minimize the number of changes in the solution. In the case of the instructor assignment problem, this is done using the OriginalInstructor criterion.

The "Perturbation variables" parameter counts the number of variables (teaching assignments) that either do not have an initial assignment (instructor) or the initial assignment is different from the current assignment.

You can influence how much the solver tries to stick with the inital assignments by changing the weight of the OriginalInstructor criterion (Weight.OriginalInstructor parameter, defaults to 100).

KarthikRv93 commented 5 years ago

@Thanks for your reply:) I was able to restrict the online classes using the hard constraints in InstructorConstraints.java.