954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Critical Path Method Algorithm

Hello everyone, congratulations for the good job.
The last 5 days i search for a comprehensible and simple, CPM algorithm and i can't find one.
I want to make a program (in C++) that it will calculate the critical path of a given number of nodes..Any ideas? thanks for reading, and sorry for my English :)

logan_231_2009
Newbie Poster
7 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

Can you define what you mean by a critical path? Maybe give examples.

firstPerson
Senior Poster
3,923 posts since Dec 2008
Reputation Points: 841
Solved Threads: 608
 

What is an algorithm?

sergent
Posting Pro
598 posts since Apr 2011
Reputation Points: 70
Solved Threads: 22
 
x.drago.x
Newbie Poster
2 posts since Apr 2011
Reputation Points: 10
Solved Threads: 1
 
Can you define what you mean by a critical path? Maybe give examples.

So...for example: http://www.brighthub.com/office/project-management/articles/49584.aspx

practically we had a number of jobs with their duration, and we want to discover the bigger in duration (in total) path. The reason is that we want to know how many works (and who) should not delay and this because then all project will delay..

example..
Duration of Path 2 = 0 days + 5 days + 3 days + 1 days + 8 days + 0 days = 17 days

Duration of Path 3 = 0 days + 5 days + 3 days + 4 days + 4 days + 6 days + 8 days + 8 days + 0 days = 38 days

logan_231_2009
Newbie Poster
7 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

I may be wrong here, but isn't the CPM simply solved by formulating the problem as an Action-On-Arc (AOA) graph. Then, you just solve for the solution using a standard shortest-path algorithm (evidently, you multiply the costs by -1 to get a longest-path algorithm). You can, for instance, use the Boost Graph Library which includes several shortest-path algorithms including Dijkstra, A*, Bellman-Ford, etc. You can even export to Graphviz and get a visualization of the graph.

mike_2000_17
Posting Virtuoso
Moderator
2,137 posts since Jul 2010
Reputation Points: 1,634
Solved Threads: 457
 
user786
Newbie Poster
1 post since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: