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.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)