A lightweight Python library for creating Project Network Diagrams (CPM/PERT), calculating paths, and visualizing activity dependencies using NetworkX and Matplotlib.
- Easy Node Management: Add activities with durations and string-based predecessor lists (e.g.,
"A,B"). - Automatic Pathfinding: Detects all probable paths from Start to End.
- Visualisation: Generates directed graphs with arrows and duration labels using
matplotlib. - CPM Ready: Built on a node structure supporting Probable Paths, Critical Path.
- Name: Kathan Majithia
- Contact: kathanmajithia@gmail.com
To use the visualization features, you must have the following libraries installed:
- networkx (for graph theory and structure)
- matplotlib (for plotting the diagram)
pip install networkdiagram
from networkdiagram import CriticalPathMethod
cpm = CriticalPathMethodk()
activities = ['A','B','C','D']
durations = [2,5,4,2]
predecessors = ['-','A','B','B,C']
cpm.add_activity('O',0)
cpm.add_activities_relations(activities,durations,predecessors)