Issues on the correctness of the scheduling engine #244
Replies: 3 comments 3 replies
-
For (1), could we implement some sort of fixed point iteration that in determining when to stop implements some sort of prioritization based on goal satisfiedness? |
Beta Was this translation helpful? Give feedback.
-
Also, this is separate from the two concerns you voiced but might be relevant to overall scheduling fixes, and that's that I believe activities without a controllable duration behave somewhat unpredictably - this was something encountered when implementing AERIE-1880; not sure if that is of similar priority to what you've suggested here, though. |
Beta Was this translation helpful? Give feedback.
-
Writing as an occurrence of the first issue I wrote about almost a year ago happened in Clipper:
G1 is solved first, it successfully schedules a B ending at the start of C. |
Beta Was this translation helpful? Give feedback.
-
I have found two issues affecting the correctness of the scheduling engine. Basically, we are underestimating how flexible the behavior of an activity can be.
(1)
We go through each goal only once. Let's say G1 is a goal that has been evaluated on an empty plan and produced 2 conflicts. G1 has scheduled activity A1 that was successfully simulated. A1 starts at time 10. But G1 is not completely satisfied, it required another activity that could not be scheduled.
Then we go to goal G2 that requires us to schedule activity A2 starting at time 2. When we simulate the activity, we use incremental scheduling and stop it at the end of the last activity of the plan, that is the end of A1.
But A2 could modify the resources in a way that A1 does not execute in the same way/has its duration changed which might invalidate the satisfaction of G1 by A1. If for example, A1 was supposed to end at a specific time.
Rather than just checking if simulation executes without error, we should check that previously inserted activities (that are scheduled after the lastly inserted activity) are not impacted by the last activity we inserted. If some activities have been impacted (their parameters and/or end time have changed), we should check whether their associated goal is still satisfied and if not, reject the last insertion.
But there is a difficulty. Let’s say that A1 has its parameters or end date changed and that it indeed invalidates G1. Simply re-evaluating conflicts for G1 will not be satisfying as G1 ended up not being completely satisfied at the first iteration. When finding there are two conflicts, we will have no way of attributing the conflicts to the insertion of A2 because we do not record which conflicts were initially produced and with what activity insertions they were solved.
TODO:
(2) Edit: as of june 7 2023, the following has been fixed
There is also an oversight of the scheduling engine, the possibility that an activity spawns other activities. When simulating an activity, we do not check/record whether other sub-activities have spawned or not. In the best case, these activities might help satisfy goals. In the worst case, they might violate global constraints.
TODO:
Beta Was this translation helpful? Give feedback.
All reactions