Feat: planning variables outside of the value range should be allowed for pinned planning entities
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
Start in core/src/main/java/ai/timefold/solver/core/impl/score/director/AbstractScoreDirector.java around lines 880-884 and trace how pinned planning entities and value ranges are represented. Check existing tests for planning-variable range validation, then verify that pinned entities with out-of-range values are accepted while the current validation remains for unpinned entities.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem? Please describe.
Our use case involves the following:
- Initial planning done by a Timefold-based service
- Manual adjustment by human planners
- Automatic re-planning done with the same Timefold service when conditions are different than expected (e.g. supply disruptions). In this case almost all planning entities are frozen, except for those whose values need to be adjusted.
A different value range is used in step 3 than in step 1, and it is also possible for the human planners to have adjusted planning variables to be outside the original range.
Currently, when these (pinned) planning entities with planning variables outside of the set range are sent to the service, the following error is thrown:
File core\src\main\java\ai\timefold\solver\core\impl\score\director\AbstractScoreDirector.java, line 880-884.
if (!valueRange.contains(value)) {
throw new IllegalStateException(
"The value (%s) from the planning variable (%s) has been assigned to the entity (%s), but it is outside of the related value range %s."
.formatted(value, variableDescriptor.getVariableName(), entity, valueRange));
}
Describe the solution you'd like
I would like to add the following condition to the following lines, to allow planning variables outside the range when the planning entity is pinned (I know the below code probably doesn't meet your standards):
if (!valueRange.contains(value) && !entity.isPinned()) {
...
Describe alternatives you've considered
Currently I work around this by not adding these planning entities to the @PlanningEntityCollectionProperty collection. In our case this works, but the above solution would be neater.
Additional context
I don't really know the code base, so I'm unsure how much work this would be beyond just updating the if-condition above.
- Lingua principale
- Java
- Stelle
- 1.8k
- Fork
- 239
- Merge medio
- 3g 2h
- PR unite (30g)
- 51
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TimefoldAI/timefold-solver
-
component/docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
TimefoldAI/timefold-solver#2671 ·
I maintainer di solito rispondono entro 1 giorno
-
process/needs triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
TimefoldAI/timefold-solver#2763 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Docs: Add keywords for search.Forse già presa @TomCools l’ha presa 9 giorni fa. Apertacomponent/docs
TimefoldAI/timefold-solver#2762 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
SDK: Waypoints class has not OpenAPI Spec annotations.Forse già presa @TomCools l’ha presa 10 giorni fa. Apertacomponent/service
TimefoldAI/timefold-solver#2759 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
process/needs triage
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
TimefoldAI/timefold-solver#2755 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TimefoldAI/timefold-solver
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
521xueweihan/HelloGitHub#4105 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
code-maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
krizaka/krizaka-notifications#32 ·
I maintainer di solito rispondono entro 1 giorno