Project Analysis

CPM Activity

OperationsResearchModels.CPM.CpmActivity — Type
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

CPM (Critical Path Method)

OperationsResearchModels.solve — Method
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);

See also CpmProblem, CpmResult, solve(::CpmProblem)

source

CpmResult

OperationsResearchModels.CPM.CpmResult — Type
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.

See also CpmProblem, solve(::CpmProblem), CpmActivity

source

PERT Activity

OperationsResearchModels.CPM.PertActivity — Type
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]);

See also PertProblem, solve(::PertProblem), PertActivity

source

PERT Problem

PERT (Project Evaluation and Review Technique)

OperationsResearchModels.solve — Method
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)

See also PertProblem, PertResult, solve(::PertProblem)

source

PERT Result

OperationsResearchModels.CPM.PertResult — Type
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.

See also PertProblem, solve(::PertProblem), PertActivity

source