0

first of all, for my score calculation I use the Java EasyScoreCalculator interface and create my solver also with the Java API (as I have/had problems loading the configuration/constraints from xml or drl file inside a Java OSGI Plugin)

My Problem:

I want to solve, a multi skilled worker task scheduling problem.

I do have a set of tasks, each requires a single skill, which can be executed only by one worker who has the required skill (worker can have more than one skill). Also the worker can only work on one task at a time, so one after the other.

The tasks start and end date should be planned between a given date range.

Solution: I want to optimize the overall workload (min) of all workers.

Currently I do have three planning variables:

  • assigned worker
  • start date
  • end date

As I want to minimize the workload, the start and/or end date can't be calculated as shadow var using the estimated work time of a task, as it should be possible to work overtime on a day.

For that I have created a shadow variable tasksToWork (List of Taks) for which a task will be added when a resource is assigned to the planning variable assigned worker.

In my Java Score class I loop through the list and calculate for each task (which have a start and end date - not null) the working time of the worker on each day based on available time. Working time less then available time is ok, above available time will result in softScore and above max working time of a day in a hardScore.

It's really annoying calculate inside the score class, as the planning variables can be null, so I do have to check first if the planning variable is null and continue this step and otherwise it can calculate.

Also I think that no time scheduling design pattern can be used for my problem (Correct me if you think different)

So maybe one can tell me,

  • whether it is possible to calculate a score only when all planning variables are set?
  • any better implementation of the scheduling start and end date?
  • or calculation of working time with possible overtime?
  • a way to calculate a shadow variable (working time each day for worker) only if two depended planning variables (start and end date of task) are set?

Thank you

eldorado
  • 1
  • 3

1 Answers1

0

1) Any score calculator must be able to calculate the score of a semi-initialized solution. Otherwise the CH would be blind until everything is assigned - so that's basically random initialization (= bad).

2) & 3) I just read it diagonally, so I don't grok the details, but do look at the 2 examples: project job scheduling and task assignement. Both use the chained through time pattern.

4) Yes, that's possible. Suppose C depends on A and B. If either A or B is null, then C is null.

Geoffrey De Smet
  • 26,223
  • 11
  • 73
  • 120