Critical Path Method implementation in VBA, C# or For 2003 MS Excel

Completed Posted Nov 7, 2008 Paid on delivery
Completed Paid on delivery

Okay Guys, here is what i need: i need an application or codes (VBA codes or C# or Whatever with an excel work sheet but prefer something like excel macro). I am looking to have an Application That Would Analysis The Critical Path of An Activity from a Primavera P3e (Ver. 5) project that has hundreds of Critical Float Path that i have to usually work from in an excel spreadsheet. I will provide the excel sheet of the projects once i have located the indiviual that will work on this project. I have founds information online about creating the CPM algorithm.

Application Should be able to Provide me with Critical Path Logic or chain and the Successor Activity or Predecessor Activity that is causing the delay and also with (the Early Start or Early Finish --- Late Start or Late Finish) From the excel worksheet that i will update when i need to present the Critical path in meeting.

I would also like to have a Gantt Chart View of the Activity Logic Just for just the Activity that is been examine. I will Provided the Excel Worksheet that has The Our Standard Layout.

I will also provided more details when, one of you guys wins the project.

I have provided two documents that would aid you on what i really want done...since my summary might not be enough.

thanks you,

Introduction

The Critical Path Method or just CPM is a mathematically based algorithm for scheduling a set of project activities.

Background

The essential technique for using CPM is to construct a model of the project that includes the following:

• A list of all activities required to complete the project (also known as Work Breakdown Structure),

• The time (duration) that each activity will take to completion, and

• The dependencies between the activities.

For a test case let's assume the following picture:

In the picture above we have circles that represent activities identified by capitalized letters.

The red number inside each circle indicates the time spent to complete the activity.

The upper left and right numbers represent the earliest start time and earliest end time of each activity respectively. The lower left and right numbers represent the latest start time and latest end time of each activity respectively.

The circles with a red border represent the critical path for this given set of activities.

Using the code

A class that represents each activity was firstly modeled. This class has as properties the activity's ID, description and duration along with the earliest start time (est), latest start time (lst), earliest end time (eet) and latest end time (let).

The dependencies between each activity is stored in two arrays, the successors and predecessors arrays.

Collapse Copy Code

public class Activity

{

private string id;

private string description;

private int duration;

private int est;

private int lst;

private int eet;

private int let;

private Activity[] successors;

private Activity[] predecessors;

...

}

The CPM algorithm uses the activities data to calculate the longest path of planned activities to the end of the project, and the earliest and latest that each activity can start and finish without making the project longer. This process determines which activities are "critical" (i.e., on the longest path) and which have "total float" (i.e., can be delayed without making the project longer).

To accomplish that two methods were created: one called WalkListAhead and the other called WalkListAback.

The WalkListAhead method receives the array that stores the activities and performs the forward walking inside the array calculating for each activity its earliest start time and earliest end time.

After the forward walking the WalkListAback performs the backward walking calculating for each activity its latest start time and latest end time.

The WalkListAhead and WalkListAback methods implementation:

Collapse Copy Code

private static Activity[] WalkListAhead(Activity[] list)

{

list[0].Eet = list[0].Est + list[0].Duration;

for(int i = 1; i < na; i++)

{

foreach(Activity activity in list[i].Predecessors)

{

if(list[i].Est < [login to view URL])

list[i].Est = [login to view URL];

}

list[i].Eet = list[i].Est + list[i].Duration;

}

return list;

}

private static Activity[] WalkListAback(Activity[] list)

{

list[na - 1].Let = list[na - 1].Eet;

list[na - 1].Lst = list[na - 1].Let - list[na - 1].Duration;

for(int i = na - 2; i >= 0; i--)

{

foreach(Activity activity in list[i].Successors)

{

if(list[i].Let == 0)

list[i].Let = [login to view URL];

else

if(list[i].Let > [login to view URL])

list[i].Let = [login to view URL];

}

list[i].Lst = list[i].Let - list[i].Duration;

}

return list;

}

To calculate the critical path, a method called CriticalPath verifies if each activity's earliest end time minus the latest end time and earliest start time minus the latest start time are equal zero. If so, the activity is part of the critical path and its Id is written in the screen. The project's total duration is also shown.

The CriticalPath method implementation:

Collapse Copy Code

void CriticalPath(Activity[] list)

{

Console.Write"n Critical Path: ");

foreach(Activity activity in list)

{

if(([login to view URL] - [login to view URL] == 0) && ([login to view URL] - [login to view URL] == 0))

[login to view URL]("{0} ", [login to view URL]);

}

[login to view URL]("nn Total duration: {0}nn", list[[login to view URL] - 1].Eet);

}

C Programming Excel Project Management Visual Basic XML

Project ID: #340352

About the project

4 proposals Remote project Active Nov 8, 2008

Awarded to:

rajtuhin1

Waste less $, and get Critical Path solution from a Software Engineer, who also got MATHs Post Graduate degree. I am also having 7+ years experience. I am an Expert of C# and Excel-VBB, so i am the perfect coder for th More

$250 USD in 8 days
(76 Reviews)
6.8

4 freelancers are bidding on average $234 for this job

CDNProjects

Please check PM.

$250 USD in 0 days
(2 Reviews)
5.3
johnsinit

Dear Newport Films! I am an experienced VB and VBA programmer and would be happy to work for you. Please, check PMB.

$235 USD in 4 days
(17 Reviews)
4.2
GlobalProduct

We are a group of software developers having more than 5 years of experience in sw developement we believe in providing high quality solutions in promised deadlines

$200 USD in 45 days
(1 Review)
0.0