Demos

Defining the Project object

We start by defining the Project object.

using ProjectManagement

proj = Project(
    (
        start=0,
        a = PertBeta(0,1,2),
        finish=0,
    ),
    [
        :start => :a,
        :a => :finish,
    ]
)
Project{NamedTuple{(:start, :a, :finish), Tuple{Int64, PertBeta{Int64}, Int64}}}((start = 0, a = PertBeta{Int64}(a=0, b=1, c=2), finish = 0), [:start => :a, :a => :finish])

Visualizing the PERT Chart

visualize_chart(proj; fontsize=4)
finish0 a(0|1|2)1.0 start0

Critical Path

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

critical_path(proj)
[:start, :a, :finish] => 1.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, :a, :finish] => 1.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)
1.0014490004047627

julia> minimum(duration_samples)
0.023555872199459864

julia> quantile(duration_samples, 0.25)
0.7190595387390734

julia> median(duration_samples)
1.0017416198478775

julia> quantile(duration_samples, 0.75)
1.283662665210795

julia> maximum(duration_samples)
1.9774393508288015

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

density(proj)
Completed By -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 -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 -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 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 ? -1.5 -1.0 -0.5 0.0 0.5 1.0 1.5 2.0 2.5 -1.0 -0.9 -0.8 -0.7 -0.6 -0.5 -0.4 -0.3 -0.2 -0.1 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0 -1 0 1 2 -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 1.25 1.30 1.35 1.40 1.45 1.50 1.55 1.60 1.65 1.70 1.75 1.80 1.85 1.90 1.95 2.00 Probability Density Completion Time PDF