timnon / pyschedule

pyschedule - resource scheduling in python
Apache License 2.0
295 stars 61 forks source link

Assign Task to any couple of Resources #105

Open Kastakin opened 3 years ago

Kastakin commented 3 years ago

I'm trying to use pyschedule to plan an assembly-line worker (Resources) assignment to different jobs (Tasks).

Some Tasks can be completed by a single Resource but some require two Resources to be working at the Task at the same time. Is is possible to give such a constraint without having to decide first which of the two workers are bound to the task?

I've tried passing the possible combinations without repetition of available workers obtained from itertools.combination() as I would with single resources T += alt(list_of_possible_combinations) but I get an error telling me that it's not possible to have an or operator between two lists.

I've also thought about about giving the task a custom attribute of require_res while giving the constrain S += task.resources >= task["req_res]" but I'm pretty sure this would make the problem unsolvable due to the fact that you can't have all and at most the required number of workers working on the same task unless the number of required workers is equal to the number of total workers.

Am I doing something wrong or is a problem that can't be tackled with the current implementation of Pyschedule?

Thanks in advance for any tips I might receive

tpaviot commented 3 years ago

Hi @Kastakin , feel free to post to the ProcessScheduler issue tracker if ever you don't get any answer, that's something we could achieve. See https://github.com/tpaviot/ProcessScheduler