Closed hana9235 closed 10 years ago
There seems to be some issues with making sure the constraints are fine to add.
For example, I can add two identical 'mandatory instructor break' constraints and no errors are thrown. I can also add a conflicting (mandatory) time preference and no errors are thrown.
I'm attempting to attach a gif to illustrate this, not sure if it will work.
Has this branch pulled from develop since the beginning of this sprint? It looks like you're several commits behind. I'd recommend pulling from dev and modifying the existing constraint checks to check the gap constraint before merging back up to dev
I was pretty sure I pulled from develop right before I started working, but I'll go ahead and double check.
Okay, all of what Preston brought up should be fixed now; my mistake, I forgot the conflict checks. Now how's it look?
Looks good to me
looks good
Looks good
When attempting to write the preference constraint conflict, I met with an issue created by using time preferences to create breaks in an instructor's day. Shade had mentioned that he wanted this in a recent sprint review, but it became apparent that using two instructor preference constraints would cause issues. ("Shade_before_10:00" and "Shade_after_14:00" could create impossible schedules, and if you were to add "CSC 450_before_12:00", the constraint becomes tricky to satisfy.)
To circumvent this, Cameron and I decided a new constraint would make more sense and be much easier to implement. This new constraint allows an instructor to specify two time slots, a start and an end, between which they do not want to teach any courses.
This pull request also adds partial credit for non-mandatory constraints, so instead of adding a full fitness score or no extra fitness, it adds a percentage of the constraint's weight based on how much of the schedule passed the constraint.