Skip to content

Critical Path Method implemented with early, late start time

Notifications You must be signed in to change notification settings

juwonzylee/critical-path-method

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Critical Path Method

A critical path in project management is the longest sequence of activities that must be finished on time in order for the entire project to be complete. This program sets the activities on edges and calculates the early, late start time, and free float of the activities in addition to the critical path of the project.

The code is structured in the cpm module, where the nodes and edges objects are defined in Activity.py, and the project in CriticalPath.py.

The tests written in test_Activity.py are based on Question 8.4.4 from Chapter 8 of Operations Research. The tests written in test_CriticalPath.py are based on Question 8.4.10 from the same textbook. The network graph for Question 8.4.10 is visualized in the same test file, test_CriticalPath.py, which outputs to example.jpg.

Requirements

To install the requirements please run:

$ pip install -r requirements.txt

Running the tests

The tests are written in pytest format such that each crucial Python file with a name x.py has an accompanying test file test_x.py. Hence, to run all the tests, simply run:

$ pytest

Assumptions and Limitations

This program assumes that the user manually inputs the nodes and edges of the project network in order to calculate the critical path. This could be automated further so the user only has to put in the activities, duration, and dependencies to pre-requisite activities. In addition, the program only accepts projects with activities on edges, and not activities on nodes.