Bug Fix: Check to avoid partial bookings of multiple persistent mandatory resources with alternatives#321
Open
DT-one wants to merge 1 commit intotaskjuggler:masterfrom
Open
Bug Fix: Check to avoid partial bookings of multiple persistent mandatory resources with alternatives#321DT-one wants to merge 1 commit intotaskjuggler:masterfrom
DT-one wants to merge 1 commit intotaskjuggler:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found a bug while trying to make a schedule with a pool of material resources like rooms (resources with an efficiency = 0.0) and a pool of normal resources like teachers, which relies heavily on the constraints 'persistent' and 'mandatory'
A teacher should be scheduled to teach an entire class in a room.
I found that the section of TaskScenario that checks whether all mandatory resources are available sometimes passes when one of the current persistent resources is not available. It seems to occur when the current persitent resource is not included in the list of alternatives that is given to the mandatory check.
The result is bookResource() fails on one or more persistent mandatory resources, but books the rest of the persistent resources that are available. This can result in a teacher scheduled for a class bit with no room.
In the supplied example it can be seen that Class 3 and Class 2 are both scheduled to be conducted in room 1.

After making my commit, this conflict no longer occurs
