TimefoldAI / TimefoldAI/timefold-solver
feat: allow sourcing of declarative variables on values inside @PlanningListVariable and @InverseRelationShadowVariable
Open
@Christopher-Chianelli is already working on this.
Since Jan 9, 2026.
- Dominant language
- Java
- Stars
- 1.8k
- Forks
- 228
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 46
Description
Is your feature request related to a problem? Please describe.
Currently the following is invalid to do since a variable cannot be used as a group source:
@PlanningListVariable
List<Value> values;
@ShadowSources("values[].declarativeVariable")
public Integer maxDeclarativeVariableSupplier() {
return values.stream().map(Value::getDeclarativeVariable).max(Comparator.naturalOrder()).orElse(null);
}
Describe the solution you'd like
@PlanningListVariable and @InverseRelationShadowVariable should be able to be used as a group source.
Describe alternatives you've considered
Calling the method inside a constraint (although that loses caching).
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.