trplearn.scheduling module#
- class trplearn.scheduling.PERTAnalyst[source]#
Bases:
objectProject Evaluation and Review Technique (PERT) analyst using Max-Plus algebra. This class computes earliest/latest times and critical paths by interpreting the Kleene star (closure) of a task duration matrix.
The input adjacency matrix A should have A[i, j] = duration of task from event i to j. Use -np.inf where no direct task exists between events.
- durations_#
The original task duration matrix.
- Type:
ndarray
- compute(adjacency_matrix)[source]#
Compute the longest path matrix and prepare for analysis.
- Parameters:
adjacency_matrix (array-like) – Square matrix where [i, j] is the duration of the task starting at event i and ending at event j. Use -np.inf for no dependency.
- Returns:
self
- Return type:
object
- critical_path()[source]#
Identify the sequence of event indices forming the critical path. An event is on a critical path if its slack is zero.
- Returns:
List of event indices on the critical path.
- Return type:
list of int
- property earliest_times#
Earliest Start Times (EST) for each event, assuming project starts at event 0.
- Return type:
ndarray
- property latest_times#
Latest Start Times (LST) for each event without delaying the project.
- Return type:
ndarray
- project_duration()[source]#
Total duration of the project (earliest time of the final event).
- Return type:
float
- property slack#
Total slack (float) for each event. Slack = Latest Time - Earliest Time.
- Return type:
ndarray