TimefoldAI / TimefoldAI/timefold-solver

Feat: Dynamic Constraint Weight in constraint factory

Open
#1,172 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Constraint Weight can be configured at runtime/dynamically using ConstraintWeightOverrides but it's a bit tedious to configure.

Could it be possible to configure them dynamically/lazily using the constraintFactory ? Example:

constraintFactory.forEach(MyValue::class.java)
   .join(ConstraintDefinition::class, // ...
   .penalize( { constraintDef, _ -> constraintDef.level } ) { constraintDef, value -> constraintDef.score(value) }

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.

Research direction

Start by tracing the existing ConstraintWeightOverrides and constraintFactory APIs to understand how constraint weights are currently configured. Compare that path with the proposed lazy configuration example and identify the relevant API and test entry points. Done means dynamic constraint weights can be configured through the factory and are covered by tests, but the issue does not name specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.