tpaviot / ProcessScheduler

A Python package for automatic and optimized resource scheduling
https://processscheduler.github.io/
GNU General Public License v3.0
58 stars 17 forks source link

Handling workers with variable productivity indices #108

Open gtnunes1956 opened 2 years ago

gtnunes1956 commented 2 years ago

I haven't found a way to satisfactorily handle a situation where a worker's productivity is dependent upon the task it is assigned to (say, a bottle filling line may fill 5000 250ml bottles in a hour, but only 3000 1500ml bottles in the same period).

An obvious first attempt would be to create two different workers, each with a specific capability and productivity (say, worker1 fills 250ml bottles only, and worker2 fills 1500ml bottles only).

Unfortunately these two workers are "views" of the same physical production line, and this will cause problems when they are assigned to multiple tasks (say, task1 uses worker1, and task2 uses worker2 - task1 and task2 cannot overlap).

A straight-forward solution would be to use the 'TasksDontOverlap' constraint. The problem is scalability: I am currently working with a scheduling problem having 68 tasks and 3 physical production lines mapped to 8 "virtual" workers. The number of 'TaskDontOverlap' constraints has gone over 1200 (yes, twelve hundred), and a solution is no longer obtainable.

Any thoughts?

tpaviot commented 2 years ago

Currently the productivity property of a Worker is an integer. It could be changed as a variable that can be constrained by an if/then/else clause, which certainly is more elegant than the TaskDontOverlap workaround. I'll try to make an example.