TimefoldAI / TimefoldAI/timefold-solver

Feat: CH examines entity difficulty

Open
#1,307 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

To use the FIRST_FIT_DECREASING CH, the model developer has to implement a DifficultyComparator, providing an estimate how difficult the entity is to plan.

That is easy when there is a clear demand for resources, like in the Cloud Computing example. Sometimes, the difficulty depends on how many specific resources (values) there are in the dataset.

Example: a shift that requires a rare skill is more difficult to plan than a shift that requires a common skill.

Sometimes, dependencies between entities impact the difficulty.

In these cases, the DifficultyComparator would have to introduce the logic of a subset of hard constraints.

Proposal: utilize all the constraints to assess entity's difficulty

  • before the CH phase, for each entity, try every single placement in an empty plan in an isolation (similarly to recommendations)
  • sum up the score impacts per entity across all its placements
  • the worse the sum is, the more difficult is the entity to plan, as there are fewer good options for its placement

Additionally, CH could replace the StrengthComparator by the same feature, in the same pass, by grouping the score impacts by values instead of by entities.

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 reading the CH flow and the DifficultyComparator and StrengthComparator concepts named in the issue, then compare them with the recommendation behavior it references. Done means the solver can assess entity difficulty from score impacts across isolated placements and can optionally replace StrengthComparator using grouped value impacts, with the behavior validated by relevant project tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
ai
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.