TimefoldAI / TimefoldAI/timefold-solver

Feat: Native support for non-disruptive replanning

Open
#1,484 0 comments 3 reactions 1 assignee View on GitHub

@zepfred is already working on this.

Since Apr 1, 2025.

Dominant language
Java
Stars
1.8k
Forks
228
Avg merge
1d 13h
Merged PRs (30d)
46

Description

The current design pattern for non-disruptive replanning is for the user to remember the original value of a variable, and to penalize every difference. This is a lot of boilerplate, and there is technically nothing preventing the solver from doing the heavy lifting.

Idea:

  • New embedded shadow variable, values true/false.
  • Needs to work on both genuine entities (basic vars) and shadow entities (list var).
  • When a working solution is reset, starting values are remembered by the solver.
  • When a variable differs from the starting value, the shadow variable is set to true, otherwise it is false.

Things to pay extra attention to:

  • Multi-threaded solving and entity/value lookups.
  • Entities need to be compared by identity, facts by equality (think LocalDateTime).

Questions:

  • Should another embedded shadow var be introduced, for the previous version of the variable?
  • If so, how should it handle multi-var situations?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.