donnell74 / CSC-450-Scheduler

MIT License
1 stars 1 forks source link

Partial credit and Instructor Break constraint #32

Closed hana9235 closed 10 years ago

hana9235 commented 10 years ago

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.

prichey commented 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.

scheduler

prichey commented 10 years ago

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

hana9235 commented 10 years ago

I was pretty sure I pulled from develop right before I started working, but I'll go ahead and double check.

hana9235 commented 10 years ago

Okay, all of what Preston brought up should be fixed now; my mistake, I forgot the conflict checks. Now how's it look?

prichey commented 10 years ago

Looks good to me

donnell74 commented 10 years ago

looks good

CameronHKIng commented 10 years ago

Looks good