Project Analysis
CPM Activity
OperationsResearchModels.CPM.CpmActivity — TypeCpmActivity(name::String, time::Float64, dependencies)Description
The object that represents an activity in CPM (Critical Path Method).
Fields
- name::String: The name of the activity.
- time::Float64: The time of the activity.
- dependencies: The dependencies of the activity in type of- Vector{CpmActivity}.
Example
A = CpmActivity("A", 2, []);
B = CpmActivity("B", 3, []);
C = CpmActivity("C", 2, [A, B]);
CpmProblem
OperationsResearchModels.CPM.CpmProblem — TypeCpmProblem(activities::Vector{CpmActivity})Description
Represents a CPM (Critical Path Method) problem instance, containing the activities.
Fields
- activities::Vector{CpmActivity}: A vector of activities in the CPM problem.
CPM (Critical Path Method)
OperationsResearchModels.solve — Methodsolve(problem)Arguments
- problem::CpmProblem: The problem in type of CpmProblem.
Output
- ::CpmResult: The object holds the results
Description
Calculates CPM (Critical Path Method) and reports the critical path for a given set of activities.
Example
A = CpmActivity("A", 2);
B = CpmActivity("B", 3);
C = CpmActivity("C", 2, [A]);
D = CpmActivity("D", 3, [B]);
E = CpmActivity("E", 2, [B]);
F = CpmActivity("F", 3, [C, D]);
G = CpmActivity("G", 7, [E]);
H = CpmActivity("H", 5, [E]);
I = CpmActivity("I", 6, [G, F]);
J = CpmActivity("J", 2, [C, D]);
activities = [A, B, C, D, E, F, G, H, I, J];
problem = CpmProblem(activities);
result = solve(problem);
CpmResult
OperationsResearchModels.CPM.CpmResult — TypeCpmResult(pathstr::Vector{String}, path::Vector{CpmActivity})Description
Represents the result of a CPM (Critical Path Method) analysis, containing the critical path and its activities.
Fields
- pathstr::Vector{String}: A vector of strings representing the names of the activities in the critical path.
- path::Vector{CpmActivity}: A vector of activities representing the critical path.
PERT Activity
OperationsResearchModels.CPM.PertActivity — TypePertActivity(name::String, o::Float64, m::Float64, p::Float64)::PertActivityDescription
The object that represents an activity in PERT (Program Evaluation and Review Technique).
Fields
- name::String: The name of the activity.
- o::Float64: The optimistic time of the activity.
- m::Float64: The most likely time of the activity.
- p::Float64: The pessimistic time of the activity.
- dependencies: The dependencies of the activity in type of- Vector{PertActivity}.
Example
A = PertActivity("A", 1, 2, 3);
B = PertActivity("B", 3, 3, 4);
C = PertActivity("C", 5, 6, 7, [A, B]);PERT Problem
OperationsResearchModels.CPM.PertProblem — TypePertProblem(activities::Vector{PertActivity})Description
Represents a PERT (Program Evaluation and Review Technique) problem instance, containing the activities.
Fields
- activities::Vector{PertActivity}: A vector of activities in the PERT problem.
PERT (Project Evaluation and Review Technique)
OperationsResearchModels.solve — Methodsolve(problem::PertProblem)::PertResultArguments
- problem::PertProblem: The problem in type of PertProblem.
Output
- ::PertResult: The object holds the results
Example
A = PertActivity("A", 1, 2, 3)
B = PertActivity("B", 3, 3, 3)
C = PertActivity("C", 5, 5, 5, [A, B])
activities = [A, B, C]
problem = PertProblem(activities);
result = pert(activities)
println(result.mean)
println(result.stddev)PERT Result
OperationsResearchModels.CPM.PertResult — TypePertResult(path::Vector{PertActivity}, mean::Float64, stddev::Float64)Description
Represents the result of a PERT (Program Evaluation and Review Technique) analysis, containing the critical path and its activities.
Fields
- path::Vector{PertActivity}: A vector of activities representing the critical path.
- mean::Float64: The mean duration of the critical path.
- stddev::Float64: The standard deviation of the critical path.