Open dreinon opened 3 years ago
Ok that's something possible I guess, I looked at the current implementation of the Workload
constraint only a few lines need to be added (see https://github.com/tpaviot/ProcessScheduler/blob/master/processscheduler/resource_constraint.py#L124). However this has to be strongly unit tested
I agree
With the current API of the
Workload
constraint of aResource
, we can only set a generalkind
for all time periods.In my problem, I wanted to express that for a specific time period, the
min
number of tasks that the resource could be scheduled wasm
and themax
number of tasks wasm+n
( wheren > 0
). I used two workload constraints with the same period but one formin
and one formax
, but I don't know if they are designed to work well together and might not be the best notation.I propose that the time periods
dict
acquires the following structure:There would have to be a validation check in the beginning of the constraint that checks that for each time period list either there's only an
exact
subdict, or there aremin
and/ormax
subdicts, but not both at the same time because it doesn't make sense.What do you think?