Project Analysis

CPM Activity

OperationsResearchModels.CPM.CpmActivityType
CpmActivity(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]);
source

CpmProblem

OperationsResearchModels.CPM.CpmProblemType
CpmProblem(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.
source

CPM (Critical Path Method)

OperationsResearchModels.solveMethod
solve(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);
source

CpmResult

OperationsResearchModels.CPM.CpmResultType
CpmResult(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.
source

PERT Activity

OperationsResearchModels.CPM.PertActivityType
PertActivity(name::String, o::Float64, m::Float64, p::Float64)::PertActivity

Description

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]);
source

PERT Problem

OperationsResearchModels.CPM.PertProblemType
PertProblem(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.
source

PERT (Project Evaluation and Review Technique)

OperationsResearchModels.solveMethod
solve(problem::PertProblem)::PertResult

Arguments

  • 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)
source

PERT Result

OperationsResearchModels.CPM.PertResultType
PertResult(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.
source