Here's an exmaple of a task-set that I'm working with: JobID TaskID ServTime Dependencies 1 1 1 0 1 2 2 1 1 3 3 1 1 4 4 1 1 5 5 2, 3 1 6 6 3, 4 1 7 7 5, 6
I made a Level-2 M-S Function that calculates the critical path of this job i.e. the path with the highest ServTime values. I need to mention that the Level-2 function deals with every task at a time because I'm running it on a SimEvents model where each entitiy is ineffect a task per se.
My issue here is I would like to be able to define the possible paths for every selected task; paths here mean all possible paths from the 1st to the last task of a job passing through the selected task to investigate. For instance, if we choose to investigate the 5th task, I want an output that somehow shows me task 5 has two possible paths; 1-2-5-7 and 1-3-5-7. Basically once I hava those values I can then use them to calculate which one is the longest or shortest, but my problem here remains in actually finding out those paths.
I started looking at Dijkstra's algorithms, but no algorithms I came across that take into considerations dependencies. I don't think I can do this in my Level-2 function inside SimEvents, so I started playing with m.scripts, but no real success yet. Any tips would be much valuable.