You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in #141 and #143 I did stuff with interruptible tasks.
Now I try to make use of the work_amount attribute of Task classes, as this would allow me an even more precise scheduling, but I am now stuck at the case of one task having more than one resource assigned.
My goal here is to adjust the busy_intervals of every worker such that the work amount is exactly covered by all workers for that specific task.
My problem is, on applying a resource constraint, I must know the constraints of all workers, since the individual task durations, i.e. busy intervals, depend on each other.
I did not see a way to solve that with the existing resource constraints, so I tried to write a ResourcesPeriodicallyInterrupted (note the plural 'Resources') constraint, which takes lists of workers and a list with lists of time intervals and so on. But that in turn forced me to take out the work amount assertion part in solver.py:
...and put it directly in ResourcesPeriodicallyInterrupted with the overlaps inserted, which kind of worked but is far from elegant.
Since I know now that this has already been done in solver.py: I really like the idea of composing all the solver assertions in solver.py instead of doing that directly on creating an object, namely a constraint, a task or a worker.
Thereby, one could respect also interdependent object assertions as in the case of work amount assertions.
The negative part is that it would require a lot of work rewriting the code - even at places where it might not be necessary at the moment (e.g. Why not setting the assertion start >= 0 for a task on creation?).
At least, I think it is worth discussing that. What do you think?
(And my apologies for this long text. I appreciate your patience.)
The text was updated successfully, but these errors were encountered:
Hi @tpaviot,
in #141 and #143 I did stuff with interruptible tasks.
Now I try to make use of the
work_amount
attribute ofTask
classes, as this would allow me an even more precise scheduling, but I am now stuck at the case of one task having more than one resource assigned.My goal here is to adjust the
busy_intervals
of every worker such that the work amount is exactly covered by all workers for that specific task.My problem is, on applying a resource constraint, I must know the constraints of all workers, since the individual task durations, i.e. busy intervals, depend on each other.
I did not see a way to solve that with the existing resource constraints, so I tried to write a
ResourcesPeriodicallyInterrupted
(note the plural 'Resources') constraint, which takes lists of workers and a list with lists of time intervals and so on. But that in turn forced me to take out the work amount assertion part insolver.py
:ProcessScheduler/processscheduler/solver.py
Lines 246 to 261 in aecdf3d
...and put it directly in
ResourcesPeriodicallyInterrupted
with the overlaps inserted, which kind of worked but is far from elegant.Since I know now that this has already been done in
solver.py
: I really like the idea of composing all the solver assertions insolver.py
instead of doing that directly on creating an object, namely a constraint, a task or a worker.Thereby, one could respect also interdependent object assertions as in the case of work amount assertions.
The negative part is that it would require a lot of work rewriting the code - even at places where it might not be necessary at the moment (e.g. Why not setting the assertion
start >= 0
for a task on creation?).At least, I think it is worth discussing that. What do you think?
(And my apologies for this long text. I appreciate your patience.)
The text was updated successfully, but these errors were encountered: