You are on page 1of 19

Page |1

“Simulation of Critical Path Computation in



I declare that this assignment is my indivisible work, I have not copied from any other
student’s work or from any other source except where due acknowledgement is made
explicitly in text, not has any part become written for me by another person.

N. K.D

Evaluation content

Marks Obtained Out of:

Page |2

It is a great and challenging experience for me, working with term paper “Simulation
of Critical Path Computation in Network”. It’s our pleasure to take this opportunity to thank
all those who help us directly or indirectly in preparation of this project.

I would like to thank Department of Computers Application which provide me

enough infrastructures to complete the Term Paper on this topic. I am thankful to our Lect.
Mr. Amandeep not only for their valuable instructions which he gives me to prepare the Term
Paper over this topic but also for solving various types of problem, which came across during
study of this topic and also for inspiring us to do such job.

I am extremely grateful to my friends for their help, support and inspiration to keep
my moral high to complete the task.

Table of Content

Page |3

• Acknowledgement 2

• Introduction 4

• What is Network Activity 5

• What is a Critical Path 7

• Critical Path Analysis (CPA) 8

• Critical Path Method 10

• Step to Creating CPM 13

• The Key Rules of a CPM 15

• A simple example – baking a loaf of bread 16

• Feature of CPM 16

• Crashing 17

• Summary 18

• Conclusion 18

• Bibliography 19

Simulation of Critical Path Computation in Networks


We consider the problem of computing traffic engineered paths for bandwidth requests, when
these requests arrive in the network independent of one another. Reservation of bandwidth
Page |4

along pre-selected paths has become important in networks providing service differentiation
and bandwidth guarantees to applications. Service providers are looking at traffic engineering
to automate path selection procedures and to maintain network loading at an optimal level.
Sophisticated path selection algorithms are being developed which deviate from the “shortest
path” philosophy in traditional IP networks.

While these algorithms perform well under moderate network loads, their behaviour under
high load conditions often leads to risks of network instability. In addition, these
sophisticated algorithms are often computationally intensive. In this paper we provide an
O(nlogn) algorithm that improves network utilization under moderate load and also maintains
stability under high load conditions. We show that the algorithm reduces the complexity of a
competitive algorithm and achieves better performance.

A complex project must be well planned, especially if a number of people are involved. It is
the task of management to undertake the planning and to ensure that the various tasks
required in the project are completed in time. Operational researchers developed a method of
scheduling complex projects shortly after the Second World War.

It is sometimes called network analysis, but is more usually known as critical path analysis
(CPA). Its virtue is that it can be used in a wide variety of projects, and was, for example,
employed in such diverse projects as the Apollo moonshot, the development of Concorde, the
Polaris missile project and the privatisation of the electricity and water boards. Essentially,
CPA can be used for any multi-task complex project to ensure that the complete scheme is
completed in the minimum time.

Although its real potential is for helping to schedule complex projects, we will illustrate the
use of CPA by applying it to rather simpler problems. You will often be able to solve these
problems without using CPA, but it is an understanding of the concepts involved in CPA
which is being developed here. The simulation of critical path computation leads

What is Networks Activity

In order to be able to use CPA, you first need to be able to form what is called anactivity
network. This is essentially a way of illustrating the given project data concerning the tasks
to be completed, how long each task takes and the constraints on the order in which the tasks
are to be completed. As an example, consider the activities shown below for the construction
of a garage.
Page |5

Clearly, some of these activities cannot be started until other activities have been completed.
For example:

Activity G- erect roof cannot begin until

Activity E - erect walls has been completed. The following table shows which activity must
precede which of the following:

 D must follow E
 E must follow A and B
 F must follow D and G
 G must follow E
 H must follow G
 I must follow C and F
 J must follow I.

We call these the precedence relation

Page |6

In this network each activity is represented by a vertex ; joining vertex X to vertex Y shows
that activity X must be completed before Y can be started; the number marked on each arc
shows the duration of the activity from which the arc starts. Note the use of 'arc' here to mean
a directed edge. Sometimes we can easily form the activity network, but not always, so we
need to have a formal method. First try the following activity
Page |7

What is Critical Path

You have seen how to construct an activity network. In this section you will see how this can
be used to find the critical path. This will first involve finding the earliest possible start for
each activity, by going forwards through the network. Secondly, the latest possible start time
for each activity is found by going backwards through the network. Activities which have
equal earliest and latest start time are on the critical path. The technique will be illustrated
using the 'garage construction. The activity network for this problem is shown below, where
sufficient space is made at each activity node to insert two numbers.

The numbers in the top half of each circle will indicate the earliest possible starting time. So,
for activities A, B and C, the number zero is inserted. Moving forward through the network,
the activity E is reached next. Since both A and B have to be completed before E can be
started, the earliest start time for E is 7. This is put into the top half of the circle at E. The
earliest times at D and G are then both 17, and for H, 22. Since F cannot be started until both
D and G are completed, its earliest start time is 25, and consequently, 27 for I. The earliest
start time for J is then 29, which gives an earliest completion time of 32. 196.

Since 32 is the earliest possible completion time, it is also assumed to be the completion time
in order to find the latest possible start times. So 32 is also put in the lower half of the 'finish'
circle. Now working backwards through the network, the latest start times for each activity
are as follows:
Page |8

 J 32 – 3 = 29
 I 29 – 2 = 27
 F 27 – 2 = 25
 H 32 – 8 = 24
 D 25 – 8 = 17

G the minimum of 25 – 5 = 20 and 24 – 5 = 19 E the minimum of 17 – 10 = 7 and

 19 – 10 = 9
 A7–7=0
 B7–2=5
 C 27 – 15 = 12

This gives a completed network as shown below

The vertices with equal earliest and latest starting times define the critical path. This is
clearly seen to be A, E, D, F, I, J. Another way of identifying the critical path is to define the

Float time = latest start time - earliest start time

Critical Path Analysis CPA (Network Analysis)

Critical Path Analysis (CPA) is:

• Sets out all the individual activities that make up a larger project.
• Shows the order in which activities have to be undertaken.
• Shows which activities can only taken place once other activities have been
• Shows which activities can be undertaken simultaneously, thereby reducing the
overall time taken to complete the whole project.
• Shows when certain resources will be needed – for example, a crane to be hired for a
building site.

In order to construct a CPA, it is necessary to estimate the elapsed time for each activity –
that is the time taken from commencement to completion.
Page |9

Then the CPA is drawn up a based on dependencies such as:

• The availability of labour and other resources

• Lead times for delivery of materials and other services
• Seasonal factors – such as dry weather required in a building project

Once the CPA is drawn up, it is possible to see the CRITICAL PATH itself – this is a route
through the CPA, which has no spare time (called ‘FLOAT’ or ‘slack’) in any of the
activities. In other words, if there is any delay to any of the activities on the critical path, the
whole project will be delayed unless the firm makes other changes to bring the project back
on track.

The total time along this critical path is also the minimum time in which the whole project
can be completed. Some branches on the CPA may have FLOAT, which means that there is
some spare time available for these activities.

The critical path is defined as the longest logical path through the CPM network and consists
of those activities that determine the shortest time for project completion. Activities within
this or list form a series (or sequence) of logically connected activities that is called the
critical path. A delay to the start or completion of any activity in this critical path results in a
delay to project completion, assuming that this path consists of a continuous sequence of
activities without an overriding date constraint or multiple calendars. Normally, there is only
one critical path though a network schedule. There may be multiple critical paths through a

Multiple critical paths may occur due to different paths having exactly the same overall
duration. Constrained milestones (perhaps reflecting contractual requirements) may cause
different paths to be critical at the same time. Individual schedules (each with their own
critical path) may be combined into a master schedule that has a different critical path. In the
case of a master schedule, there are both individual schedule critical paths as well as a larger
program critical path. Project schedule specifications should define the legal interpretation of
each type.
The list of critical path activities often changes from schedule update to schedule update as
activity status is revised and the schedule is recalculated. Any activity associated with the
CPM schedule that is delayed long enough can eventually become critical, regardless of its
original status. There are several accepted methods for determining the critical path. The four
most frequently used methods include the following,
1. Lowest Total Float – The activities with the lowest total float (sometimes abbreviated
as “TF”) values may be considered critical path activities. This calculated value may
be a positive number, zero, or even a negative number.
2. Negative Total Float – Using this classification method, any activity that has negative
float is considered critical, even if other activities have a lower negative float value.
Under this classification, if an activity is contributing to late project completion then it
is worthy of inclusion on the critical path list regardless of its direct contribution to
delayed project completion. Another way of framing this Identifying the Critical Path
concept is to say that any work is understood to be critical if it scheduled to be
completed after the date required for a timely project completion.
3. Longest Path – The concept and term, “longest path” has existed since the beginning
of formal CPM theory. Commercial implementation of this process into a defined
algorithm has only recently been made and is recommended for projects that use
P a g e | 10

multiple calendars and activity constraints. The longest path calculation begins by
identifying the activities that have an early finish equal to the latest calculated early
finish for the project and then identifies all driving relationships for these activities
and traces them back to the project start date. This special calculation scheme is
currently only instituted in Primavera scheduling software products. When discussing
the theory of longest path, we will use the phrase using lower-case letters. When
describing the Primavera software feature called, “Longest Path,” we will use upper-
case to distinguish the implementation from the theory.
4. Longest Path Value Method - The principle of longest path value differs from the
approach used by Primavera in that, instead of just noting activity inclusion or
exclusion from the longest path, a numerical value is calculated for each activity that
describes the degree of longest path much like float describes the degree of criticality.
Other principles are also enforced that will be described below.

CPM - Critical Path Method

This algorithm follows a solution strategy very similar to the dynamic programming
algorithm, however there is a variation which occurs due to the fact that a project network
need not be structured as a sequence of stages. It also has a starting node and works by
computing 'flag values' for the nodes, however for CPM problems, the flag values represent
the longest time to each node, and the nodes in the network may be processed in any
sequence so long as all preceding nodes have flags at each step. The arcs are always directed,
for 'activity on arc' or AoA diagrams since the passage of time is implied by each activity,
and for 'activity on node' or AoN diagrams since a precedence relation states that one activity
must be complete before another begins. But the possibility of concurrent activities means
that there will usually be many paths through the network, and the longest of these is called
the critical path since it determines the minimal project duration.

Now here is the algorithm description, which has four parts: the initialization step, the
forward pass, the backward pass, and the computation of slacks.


Step 0: Place a BOP at the beginning of the project if there is no activity which must precede
all others (i.e. when several activities may begin in parallel). Place an EOP node at the end of
the project if there is no activity which must follow all others (i.e. when several activities may
end in parallel). Place an ES flag value of zero on the designated origin node, and let EF(1) =
d(1) for the first node (where the duration of both BOP and EOP nodes is taken to be zero).

Forward Pass
P a g e | 11

Step1: Pick any node k such that all of its predecesors have EF time flags. If none remain, i.e.
the last or EOP node has just been flagged, go to the Backward Pass.

Step2: Let the ES(k) time for the selected node be the maximum of the EF times at the
preceeding nodes, and set the EF(k) time for node k equal to ES(k) + d(k). Return to step 1.
Mathematically, we can write formulas for the early start and finish times as follows:

Flow Chart for Simulation of Critical Path Computation in networks Forward Pass

Backward Pass
P a g e | 12

Initialization: Set the LF time at the last or EOP node equal to the EF time, so that no delays
at the final project time are allowed. Then set the LS there equal to the ES, as well. Hence the
node slack at the last node is zero, by definition.

Step3. Choose any node such that all following nodes have LS time flags. If none remain,
i.e. the beginning or BOP node has just been flagged, go to the computation of slacks.

Step4. Set the LF(j) time for the selected node to the minimum of the LS times at the
succeeding nodes, and set the LS(j) time for node j equal to LF(j) - d(j). Return to step 3.
Mathematically, we can write formulas for the late start and finish times as follows:

Flow Chart for Simulation of Critical Path Computation in networks Backward Pass

Activity Slacks Let activity slack S(k) = LS(k) - ES(k) for each node. Activities with zero
slack are called critical activities, and are always found on one or more critical paths. This (or
P a g e | 13

these) critical path(s) determine minimum project duration since all of them must be
completed as part of the project, and all noncritical activities can be completed concurrently
with the critical activities.

Steps to creating a C.P.M

The various steps to creating a CPM is given below:

1. Develop a list of tasks that are required to complete the project. ie. The actual work is
to be carried out. To name a task so that its purpose is clear. It is usually best to use
two words; a verb followed by a noun. For example; build walls, install windows.
Define your tasks so that they are the right size. If the task you assign is too large in
scope it may hide smaller tasks that need to be completed. For example the task
“construct building” would be too large, as there are many steps that go into the
construction of a building, such as Excavate the site, Pour foundation... On the other
hand, turning on the cement mixer is too finely detailed to be valuable to
programming your C.P.M. This level of detail would quickly lead to a cluttered and
confusing diagram. In short the tasks should be well defined, precise and detailed but
they should also be significant to furthering the project along.
2. Order your tasks and determine the immediate predecessors for each. Simply put ”
What tasks need to be completed before the next task can be carried out. ie. The
architectural drawings must be completed before the building can be built. Hence the
task Build house“ is dependent on ”Prepare drawings“. Determine completion time
for each task. How long will the individual task take to complete?
Sources for determining these times are;
 Your own judgement and experience.
 Draw on the experience of others.
 Obtain estimates from professionals.
3. The more information you have the more accurate your prediction for the project
completion will be.
I.D. Task Name Duration Predecessor
 prepare drawings 5w –
 identify tenants 6w –
 develop prospectus 4w 1
 select G.C. 3w 1
 prepare permits 1w 1
 obtain permits 4w 5
 build mall 14w 4,6
 finalize contracts 12w 2,
 tenants move in 2w 7,8
4. Using the chart above we are able to develop a graphical version of the network.
P a g e | 14

In order to determine the length of time needed to complete the project we must identify, in
the network the critical path. Typically the longest path, time wise, will determine the
completion time for a project. If any of the tasks on the critical path are delayed then the
entire project will be delayed. Hence the task is critical to the completion of the project on
5. Determining the critical path: When laying out a c.p.m. network, each task will be
represented by a box with the following information.

To begin determining the critical path, we must first determine the earliest start time and a
latest finish time for all tasks.
ES= earliest start time
EF= earliest finish time
The earliest finish time for a task is;
Using our network we begin from the start Task 1. Can begin as soon as possible, so we set
its t to 0 (t= 0). It has a duration time of 5 weeks so its earliest finish time will be:
EF=0+5= 5
Since the task cannot be started until all other preceding tasks have finished the earliest start
time for a task is equal to the largest of all the earliest finish times for all its immediate
predecessors. We make a forward pass through the whole network determining all the earliest
start and finish times for all tasks. The earliest finish time for the last task will be how long
the entire project will take to complete.
P a g e | 15

The key rules of a CPM

The key rules of the CPM Method are

 Nodes are numbered to identify each one and show the Earliest Start Time (EST) of
the activities that immediately follow the node, and the Latest Finish Time (LFT) of
the immediately preceding activities
 The CPA must begin and end on one ‘node’ – see below
 There must be no crossing activities in the CPM
 East activity is labelled with its name eg ‘print brochure’, or it may be given a label,
such as ‘D’, below.
 The activities on the critical path are usually marked with a ‘//’ In the example below
 The Node is number 3
 The EST for the following activities is 14 days
 The LFT for the preceding activities is 16 days
 There is 2 days’ float in this case (difference between EST and LFT)
 The activity that follows the node is labelled ‘D’ and will take 6 days
P a g e | 16

A simple example – baking a loaf of bread

Here is a simple example, in which some activities depend on others having been undertaken
in order, whereas others can be done independently.

Activity Preceded by Elapsed time (minutes)

A weigh ingredients - 1
B mix ingredients A 3
C dough rising time B 60
D prepare tins - 1
E pre-heat oven - 10
F knock back dough and place in tins C&D 2
G 2 nd dough rising time F 15
H cooking time E&G 40

In this example, there is a clear sequence of events that have to happen in the right order. If
any of the events on the critical path is delayed, then the bread will not be ready as soon.
However, tasks D (prepare tins) and E (heat the oven) can be started at any time as long as
they are done by the latest finish time in the following node.

So, we can see that the oven could be switched on as early as time 0, but we can work out that
it could be switched on at any time before 71 – any later than this and it won’t be hot enough
when the dough is ready for cooking. There is some ‘float’ available for tasks D and E as
neither is on the critical path.

This is a fairly simple example, and we can see the LST and LFT are the same in each node.
In a more complex CPA, this will not necessarily be the case, and if so, will indicate that
there is some ‘float’ in at least one activity leading to the node. However, nodes on the
critical path will always have the same EST and LFT.

Features of CPM

CPM helps us to identify the critical activities of the project and thereby the duration of the
project. We carry out the forward-pass and the backward-pass to compute the project
duration. In forward-pass we begin at the start event of the project and add the duration
needed by each activity to the date on which the start event would begin. Thus, we reach the
end event. Now the date on which the end event is reached is the expected project completion

In backward-pass we begin at the end event of the project subtracting the duration needed by
each activity from the project completion date progressively till we reach the start event. The
date of the start event arrived at this manner is the date the project should begin in order to
deliver the project on time.

Now, each activity on the network has two sets of dates – one arrived at through forward-pass
and the other through backward-pass. The dates of activities arrived through forward-pass are
known as “earliest times” – earliest start and earliest finish – for each activity. The dates of
activities arrived through backward-pass are known as the “latest times: - latest start and
P a g e | 17

latest finish – for each activity. The earliest start date denotes the date on which the activity
can be started and the latest start denotes the date on which the activity must start in order not
to delay the project. Similarly, the earliest finish date of an activity denotes the earliest date
by which the activity can be finished and the latest date denotes the date by which the activity
must finish in order not to delay the project.

The difference between latest and earliest (earliest & latest start or earliest & latest finish)
dates of an activity is called the “slack” for that activity. The activities for which the slack is
zero are referred to as the “critical activities”. The path of activities from the start event to the
end event is called the “critical path” for the project when the slack of all activities on that
path is zero. The sum of durations of the activities on the critical path is the duration of the


The CPM assumes that by applying extra resources, the project duration can be reduced.
Crashing is the systematic exercise of reducing the duration of the project at the least possible
increase in cost in order to complete the project earlier than expected. Crashing is an
iterative exercise needing multiple iterations.

CPM is a deterministic model – that is the duration for the activities is known in advance with
confidence. Each activity would have two durations, namely, the “normal duration” and the
“crash duration”. Associated with the normal duration is the “normal cost” and the cost
associated with crash duration is the “crash cost”. The relationship between the normal and
crash values is assumed to be linear. We compute the cost-time slope (extra cost per day of
reduction in duration) for each activity on the critical path.

Then we select the activity that has the least cost-time slope and crash (reduce its duration) it.
Then we re-compute the new critical path. We also see if the objective (the duration required
for completing the project) is reached. If it is achieved, then we do not iterate further. If the
objective is not achieved, we iterate again till the objective is achieved.
Once you have created a network and determined its critical path, you should reevaluate the
network to see if the time for project completion can be shortened without considerable loss
to the project. this shortening of the project network is called ”crashing“ the C.P.M. There are
several techniques to use when crashing a C.P.M.
1. Shorten (if possible) the duration of tasks on the critical path by adding resources such
as overtime hours or extra workers.
2. Overlap tasks on the critical path so that they may be worked on simultaneously. i.e.
Dry wallers finish upstairs move to downstairs. Painting can begin on upstairs walls.
3. Break up larger tasks on the critical path into smaller more manageable ones
4. Does the plan include only tasks which are necessary to achieving project goals?

P a g e | 18

The following are the key points of CPM method for computation of networks

 Develop a list of tasks

 Order and determine immediate predecessors for each task
 Estimate completion time for tasks
 Layout a project network using tasks and their predecessors
 Determine earliest start and finishing times using a forward pass through the network.
 Equations: forward pass 1.ESi =largest of (EFi-1)
 EFi= ESi +t backward pass 3.LFi= smallest of (LSi+1)
 LSi=LFi –t
 Using the earliest finish time for the project make a backward pass through the
network to determine the latest start and finish times for each task.
 Determine slack for each task using difference between latest and earliest start times.
 Find tasks with zero slack. These are critical tasks lying on the critical path.


To recap, the first of two principal benefits of this implementation are that the precedence
structure is embodied in the two pointer lists determined once and for all before the CPM or
any PERT simulation trials. Hence during simulation trials this structure need not be
rediscovered on each and every simulation trial. Secondly, use of these pointer lists shortens
the arrays fed to the MAX and MIN functions during the forward and backward passes since
they are no longer as long as the number of activities in the project, but are only as long as the
pointer lists in the successor and predecessor pointer lists. And if the argument lists are pre-
computed using the VBA code as in the appendix, then the OFFSET function calls can be
entirely eliminated as well. Hence the work required to carry out each CPM computation will
tend to grow linearly with the number of activities in the project rather than quadratically.
This enhances the scalability of the method. In addition, we have avoided use of any
intentional circular reference such as advocated by Ragsdale. When the EOP is incorporated
into the computation, there is no inherent circularity in the logic of the underlying CPM
formulas. Hence we regard the use of circular references in Excel as an artificial way of
compensating for an incomplete network diagram for the project that should be avoided.
Eliminating reliance on circular references speeds run time and enhances portability of the
method. The reader may well wonder why the discussion of pointer lists was retained after it
was discovered that in the spreadsheet they need not be explicitly developed to get the desired
results, since VBA allows formulas to be computed and saved. The reason is that
programmers for websites providing online solutions may not have the luxury of an Excel
spreadsheet running on the server. If the solution is to be obtained in some other
programming language, then the pointer lists may be developed explicitly and form the basis
for fast solutions on a server supporting a website.

P a g e | 19