Learn R Programming

projmanr (version 0.2.1)

simulation: Runs a simulation on project end time when certain tasks have uncertain durations

Description

Runs a simulation on project end time when certain tasks have uncertain durations

Usage

simulation(df, iter = 100)

Arguments

df

A data frame of tasks with columns ID, name, duration, id's of predecessrs (as a comma separated string), type of distrubtion for the uncertain task (currently, "triangle", "pert", "uniform", "normal" and "log_normal" are supported), and additional hyperparameters for the uncertain task, described below. For "triangle" and "pert", the next three columns should be minimum end time, maximum end time, and most likely end time (all in days) for the uncertain tasks in that order. For "uniform", the next two columns should be minimum and maximum end time (in days) for uncertain tasks. For "normal" and "log_normal", the next two columns should be mean and standard deviation (in days) of end time. Tasks with a null value for the distribution (fifth) column will not be treated as uncertain tasks. Note that names of columns do not matter, only order. Type 'taskdatauncertain1' into the console for an example of valid data.

iter

Default: 1000. The number of times the simulation should run.

Value

A list of results.

  • durations A vector of doubles (of the same size as 'iter') that contains the total project duration for each itertation of the simulation.

  • histogram A histogram of 'durations'

Examples

Run this code
# NOT RUN {
# Example using built in data
simulation(taskdatauncertain1, 10000)

# }

Run the code above in your browser using DataLab