Demos

Defining the Project object

We start by defining the Project object.

using ProjectManagement

proj = Project(
    (
        start=0,
        finish=0,
    ),
    [
        :start => :finish,
    ]
)
Project{NamedTuple{(:start, :finish), Tuple{Int64, Int64}}}((start = 0, finish = 0), [:start => :finish])

Visualizing the PERT Chart

visualize_chart(proj; fontsize=8)
finish0 start0

Critical Path

We can compute the critical path and it's cost using the critical_path function.

critical_path(proj)
[:start, :finish] => 0.0

We can compute all the path costs using path_durations. For example we can find the critical path and near critical paths as:

path_durations(proj)[1:min(3, end)]
1-element Vector{Pair{Vector{Symbol}, Float64}}:
 [:start, :finish] => 0.0

Sampling Durations

Using that Project object we can sample possible durations of the project. Which allows for statistical analysis of possible outcomes.

julia> using Statistics

julia> duration_samples = rand(proj, 100_000);

julia> mean(duration_samples)
0.0

julia> minimum(duration_samples)
0.0

julia> quantile(duration_samples, 0.25)
0.0

julia> median(duration_samples)
0.0

julia> quantile(duration_samples, 0.75)
0.0

julia> maximum(duration_samples)
0.0

We can plot the distribution showing the probability density function for project completion duration.

density(proj)
Completed By -1.4 -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 -1.25 -1.20 -1.15 -1.10 -1.05 -1.00 -0.95 -0.90 -0.85 -0.80 -0.75 -0.70 -0.65 -0.60 -0.55 -0.50 -0.45 -0.40 -0.35 -0.30 -0.25 -0.20 -0.15 -0.10 -0.05 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 1.05 1.10 1.15 1.20 -2 -1 0 1 2 -1.25 -1.20 -1.15 -1.10 -1.05 -1.00 -0.95 -0.90 -0.85 -0.80 -0.75 -0.70 -0.65 -0.60 -0.55 -0.50 -0.45 -0.40 -0.35 -0.30 -0.25 -0.20 -0.15 -0.10 -0.05 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 0.40 0.45 0.50 0.55 0.60 0.65 0.70 0.75 0.80 0.85 0.90 0.95 1.00 1.05 1.10 1.15 1.20 h,j,k,l,arrows,drag to pan i,o,+,-,scroll,shift-drag to zoom r,dbl-click to reset c for coordinates ? for help ? -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 -5.0 -4.5 -4.0 -3.5 -3.0 -2.5 -2.0 -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 7.5 8.0 8.5 9.0 9.5 10.0 -5 0 5 10 -5.0 -4.8 -4.6 -4.4 -4.2 -4.0 -3.8 -3.6 -3.4 -3.2 -3.0 -2.8 -2.6 -2.4 -2.2 -2.0 -1.8 -1.6 -1.4 -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 5.2 5.4 5.6 5.8 6.0 6.2 6.4 6.6 6.8 7.0 7.2 7.4 7.6 7.8 8.0 8.2 8.4 8.6 8.8 9.0 9.2 9.4 9.6 9.8 10.0 Probability Density Completion Time PDF