TimefoldAI / TimefoldAI/timefold-solver
Feat: Native support for non-disruptive replanning
Open
@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 isfalse.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.