Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Feat: planning variables outside of the value range should be allowed for pinned planning entities

Aperta
#2,143 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

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

process/needs triage

Is your feature request related to a problem? Please describe.

Our use case involves the following:

  1. Initial planning done by a Timefold-based service
  2. Manual adjustment by human planners
  3. 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TimefoldAI/timefold-solver

Tutte le issue di TimefoldAI/timefold-solver

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.