-
Notifications
You must be signed in to change notification settings - Fork 33
Refactor and update Cumulative and NoOverlap constraints #694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
7b52275
make end variables optional in cumulative
IgnaceBleukx 901189f
test cumulative constraint without ends
IgnaceBleukx 2c7e8cd
update choco interface
IgnaceBleukx 0f0dc13
update cpo interface
IgnaceBleukx f37cbf2
update minizinc interface
IgnaceBleukx 8f190f5
update ortools interface
IgnaceBleukx 71b4315
make end in nooverlap optional
IgnaceBleukx 053baee
update tests
IgnaceBleukx e46bbbc
undo whoops
IgnaceBleukx bec36c0
set bounds for end of intervals
IgnaceBleukx 34eb52e
add nooverlap to supported
IgnaceBleukx 8678655
remove redundant check
IgnaceBleukx 812247b
Merge remote-tracking branch 'origin/master' into no_end_cumulative
IgnaceBleukx 19c8509
allow for negative duration in interface
IgnaceBleukx 6339037
merge with negative_duration branch
IgnaceBleukx 11ab221
refactor end is None
IgnaceBleukx cd3b04f
update solver interfaces
IgnaceBleukx 2d1b516
update tests (failing)
IgnaceBleukx c09bbda
update minizinc interface
IgnaceBleukx fd96cc2
update cpo interface
IgnaceBleukx d8d0891
update tests
IgnaceBleukx 05ccd20
update docs
IgnaceBleukx 4e0bf81
update choco interface
IgnaceBleukx bae7173
add test with negative demands
IgnaceBleukx 63af96c
update cpo interface
IgnaceBleukx 4bac809
update mzn interface
IgnaceBleukx e760171
add doc
IgnaceBleukx 8394413
update value in cumulative
IgnaceBleukx b1e7984
update choco interface
IgnaceBleukx ca82b5b
exclude test for pindakaas
IgnaceBleukx 890c68e
move assert to if-case
IgnaceBleukx 74d70ed
Merge branch 'master' into no_end_cumulative
Dimosts 4adaee2
Merge remote-tracking branch 'origin/master' into no_end_cumulative
IgnaceBleukx 724beb9
match style of value check to decomp
IgnaceBleukx 2e8b8b6
add task decomposition for Cumulative
IgnaceBleukx 42312b2
update tests
IgnaceBleukx dcd46ce
Merge remote-tracking branch 'origin/master' into no_end_cumulative
IgnaceBleukx 4cff2c4
cumulative arguments can be expressions in cpo
IgnaceBleukx 4d55c1a
Merge remote-tracking branch 'origin/master' into no_end_cumulative
IgnaceBleukx fe09fe2
brackets in decomp selection
IgnaceBleukx 5d09a83
doc of cumulative decompose
IgnaceBleukx 590f4a1
update task_decomp
IgnaceBleukx c2a88c1
cleaner time decomp
IgnaceBleukx 92b2f50
No demand in nooverlap constraint
IgnaceBleukx 273ce32
fix time decomp
IgnaceBleukx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what should be done here, but I am not really a fan of giving them a default value (making them optional) and then not allowing the optional value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I also agree it is quite annoying... For now this is the best I could come up with, as you cannot make an argument in the middle optional...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am still troubled by this. So, someone either has to actually use the end var after all, or has to use kwargs to define demand and capacity, which are optional but not that optional after all.
Both minizinc (https://docs.minizinc.dev/en/stable/predicates.html) and essence (https://arxiv.org/pdf/2201.03472) actually do not accept end variables at all, and create them for solvers that need them. Should we stick to having them after all?
The question is what if the user needs the end variables for something else I guess; In this case, if the users define themselves the end = start + duration constraints, it is ok. Common subexpression elimination should capture it during the decomposition if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah, but removing it all together will break every CPMpy model currently out there that uses a Cumulative constraint...
I don't really have too much of an opinion on whether we want to keep the end variables or not, but if we decide to remove them, we should wait a couple of releases and raise a deprecation warning here