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)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.0Sampling 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.9998121202730291
julia> minimum(duration_samples)
0.02700209779431418
julia> quantile(duration_samples, 0.25)
0.7193953575768273
julia> median(duration_samples)
0.9997396208926232
julia> quantile(duration_samples, 0.75)
1.2786603380825698
julia> maximum(duration_samples)
1.9695680342268331We can plot the distribution showing the probability density function for project completion duration.
density(proj)