1

I may be misusing "scheduling" in this context, but here it goes:

I'm trying to build a simple calendar scheduling algorithm/routine, the purpose of which is to determine if a particular Time-Span is long enough to execute a number of scheduled events, each of which having a pre-determined duration.

I.e.

  • Task A, Duration: 1 day, Pre-Req: None
  • Task B, Duration: 1.5 Days, Pre-Req: Task A
  • Task C, Duration 0.5 Days, Pre-Req: Task B

Example use case is a set of "Lesson Plans". Each plan takes X units of time to execute, and the previous lesson plan is a pre-requisite to the next lesson plan (or perhaps each plan has a "Next Plan" pointer).

The instructor may insert or remove lesson plans at any point in the schedule. Lesson plans might take longer than previously scheduled, at which point all subsequent schedule items will need to be recalculated. If any scheduled events (Lesson Plans) fall outside of the prescribed Time Span (i.e. run outside of the teaching Semester, in this case), I need to flag those items.

I've been reading up on various scheduling algorithms, and most seem too complicated for this scenario.

Do any known algorithms exist that handle this type of simple calendar scheduling, or am I overthinking this?

1
  • 3
    Normally such scheduling algorithms are more or less some variation on the Bin Packing Problem, but since your tasks have to be "packed" in a specific order, all you really have to do is combine the time-spans and see how much space they take up in the calendar. If a lesson plan is added, you simply re-calculate. Commented Sep 18, 2017 at 2:14

1 Answer 1

2

What you're looking for is the duration of the "critical path" (or some minor modification of it), for which well known solutions exist in the Project Management community.

You can find many descriptions how it works on the web, among these, see this discussion with Java algorithm on Stackoverflow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.