Question about ValueRangeProvider when using PlanningListVaraible
I am using Timefold to model a relay-task planning system. I had modeled out my problem when using a single @PlanningVariable
. The high level workflow is I get tasking, and it runs through a couple services to provide times a possible relay can happen. Giving me a collection of TimeSlots of when a relay can occur. So my @PlanningEntity
is the Task. The Task has a @ValueRangeProvider
of getPossibleTimeSlots()
which is the getter for the collection of possible TimeSlots
I received in a request. Then I use an over constrained design to weight these possible TimeSlots against each other to get a selectedTimeSlot
which is my @PlanningVariable
on the task entity.
Timefold consecutive collectors constraint
I’m trying to learn how to use the different types of building blocks used for constraint streams in Timefold. To do this, I’m using the Employee Scheduling example as a base and modifying it. I want to add a constraint that limits the number of consecutive days an employee can work, i.e. be assigned to a shift, considering that a shift belongs to the day in which its start time is located. The limit of consecutive working days is set to 4.
How to iterate through an array inside the TimeFold constraint stream
We have a day setting class as follows:
Best way to modelize a tournament pairing problem
I recently developped a prototype to manage the pairing during a tournament. Here is the problem :
There is N tables, on which on each round, 2 players confront themselves. At the end of each round, every player get points which are added to their global score. The aim here is to minimize the score difference of every set of 2 players to ensure each player to have a suitable opponent and to have a decent ranking at the end of the tournament.
Why after TimeFold upgrade, guiScoreDirector.getIndictmentMap() return null
public SolutionOutput exportSolution() { guiScoreDirector.calculateScore(); Solution_ solution = guiScoreDirector.getWorkingSolution(); return exporter.exportSolution(solution, guiScoreDirector.getIndictmentMap()); } I have upgraded the code from optaplanner to TimeFold, now I am getting a null value on call the method guiScoreDirector.getIndictmentMap() java timefold