Use precedence constraints to enrich timelag constraints and vice versa #491
Merged
Conversation
618ed13 to
7f5a562
Compare
- normalization of timelag constraints: with negative offsets it is
possible to express the same constraints with time lag in min or max
list. Moreover duplicates or implied constraints can exist => we
normalize the constraints via `get_consolidated_time_lags()`.
Thus we update cpsat-auto
- how it finds equality timelags, and avoid adding two equivalent
equality constraints
- avoid adding start_to_end timelags constraints, already encompassed
by end_to_start timelags constraints
- precedence constraints can be seen as end to start min time lags
constraints => we add them to consolidated time lags, and we stop
adding precedence constraints in cpsat auto to avoid duplicate
constraints.
We use that normalization in rcpsp/rcpsp_ms when constructing graph
- conversely, time lag constraints imply precedence constraints and thus
should be taken into account into the precedence graph =>
`get_consolidated_precedence_constraints()`
In the meantime
- we fix timelag constraints implementation in rcpsp/rcpsp_ms which were
modifying the original list of timelags given in constructor.
- we rename SpecialConstraintsDescription.start_at_end_plus_offset
into start_after_end_plus_offset to emphasize that this is an
inequality rather than an equality between end+offset and start.
7f5a562 to
da62125
Compare
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.
Normalization of timelag constraints: with negative offsets it is possible to express the same constraints with time lag in min or max list. Moreover duplicates or implied constraints can exist => we normalize the constraints via
get_consolidated_time_lags(). Thus we update cpsat-auto:Precedence constraints can be seen as end to start min time lags constraints => we add them to consolidated time lags, and we stop adding precedence constraints in cpsat auto to avoid duplicate constraints. We use that normalization in rcpsp/rcpsp_ms when constructing graph
Conversely, time lag constraints imply precedence constraints and thus should be taken into account into the precedence graph =>
get_consolidated_precedence_constraints()In the meantime
modifying the original list of timelags given in constructor.
relax_the_start_at_endparameter used in rcpsp(_ms) satisfy