Typically, and especially in the context of lookahead, a chain of tasks may be broken if a higher priority task appears in a separate chain. Eg. consider the flow (1 > 2 > 3) + (4 > 5 > 6), where all tasks share one common resource. It could be the case that the tasks inside the brackets must happen one after another without interruption, but due to priority of tasks the second chain could start before the 1st finishes. In this example this is easily solved by making 1,2,3 High priority and 4,5,6 Medium priority, but there exist more complex scenarios where adjusting the priority like this is not possible.
A second motivation is where one may wish to have tasks of low priority followed by tasks of high priority. For example a surgery which is not urgent (a low priority task), but as soon as the surgery is completed a follow-up treatment must begin as soon as possible (a high priority task). Currently if we were to express this with priorities only, it could be the case that some other chain of tasks has taken up the resources in such a way that the surgery could start but the treatment would be blocked, and our system has no way of knowing that these tasks must happen directly one after another.
I think a good solution to this challenge is to introduce composite tasks:
A task could be marked as being part of a certain composition, and all tasks in this composition must run together. This means that for lookahead, all tasks in a composition are considered before any single task is registered, and once the first task is registered then all of the tasks in the composition should be registered before the next task is picked up from the sorted set.
This system could allow for complex amalgamations of tasks which use different resources at different times but must happen all together, like a complex shape on the resource timeline that cannot change shape, or like a puzzle-piece; Right now we can "draw" rectangles on the timeline by saying a task uses x,y,z resources, but with this feature we could describe more complex shapes by composing multiple tasks.
Coming back to the above examples, tasks 1,2,3 would be part of composite 1, and tasks 3,4,5 would be in composite 2. For second example, the surgery and the follow-up treatment would be part of the same composition.
This wouldn't work without lookahead since two tasks at the start of two separate compositions could be scheduled, but the compositions could overlap once time progresses. With lookahead this can be avoided, so the entire composite can be guaranteed to run all the way through without disruption.
Typically, and especially in the context of lookahead, a chain of tasks may be broken if a higher priority task appears in a separate chain. Eg. consider the flow (1 > 2 > 3) + (4 > 5 > 6), where all tasks share one common resource. It could be the case that the tasks inside the brackets must happen one after another without interruption, but due to priority of tasks the second chain could start before the 1st finishes. In this example this is easily solved by making 1,2,3 High priority and 4,5,6 Medium priority, but there exist more complex scenarios where adjusting the priority like this is not possible.
A second motivation is where one may wish to have tasks of low priority followed by tasks of high priority. For example a surgery which is not urgent (a low priority task), but as soon as the surgery is completed a follow-up treatment must begin as soon as possible (a high priority task). Currently if we were to express this with priorities only, it could be the case that some other chain of tasks has taken up the resources in such a way that the surgery could start but the treatment would be blocked, and our system has no way of knowing that these tasks must happen directly one after another.
I think a good solution to this challenge is to introduce composite tasks: A task could be marked as being part of a certain composition, and all tasks in this composition must run together. This means that for lookahead, all tasks in a composition are considered before any single task is registered, and once the first task is registered then all of the tasks in the composition should be registered before the next task is picked up from the sorted set. This system could allow for complex amalgamations of tasks which use different resources at different times but must happen all together, like a complex shape on the resource timeline that cannot change shape, or like a puzzle-piece; Right now we can "draw" rectangles on the timeline by saying a task uses x,y,z resources, but with this feature we could describe more complex shapes by composing multiple tasks.
Coming back to the above examples, tasks 1,2,3 would be part of composite 1, and tasks 3,4,5 would be in composite 2. For second example, the surgery and the follow-up treatment would be part of the same composition.
This wouldn't work without lookahead since two tasks at the start of two separate compositions could be scheduled, but the compositions could overlap once time progresses. With lookahead this can be avoided, so the entire composite can be guaranteed to run all the way through without disruption.