stochastic.pert {ProjectManagement}R Documentation

Stochastic projects

Description

This function calculates the average duration time for a stochastic project and the activities criticality index. It also plots the estimate density of the project duration, as well as the estimate density of the early and last times.

Usage

stochastic.pert(
  prec1and2 = matrix(0),
  prec3and4 = matrix(0),
  distribution,
  values,
  percentile = 0.95,
  plot.activities.times = NULL,
  compilations = 1000
)

Arguments

prec1and2

A matrix indicating the order of precedence type 1 and 2 between the activities (Default=matrix(0)). If value (i,j)=1 then activity i precedes type 1 to j, and if (i,j)=2 then activity i precedes type 2 to j. Cycles cannot exist in a project, i.e. if an activity i precedes j then j cannot precede i.

prec3and4

A matrix indicating the order of precedence type 3 and 4 between the activities (Default=matrix(0)). If value (i,j)=3 then activity i precedes type 3 to j, and if (i,j)=4 then activity i precedes type 4 to j. Cycles cannot exist in a project, i.e. if an activity i precedes j then j cannot precede i.

distribution

Type of distribution that each activities' duration has. It can be NORMAL, TRIANGLE, EXPONENTIAL, UNIFORM, T-STUDENT, FDISTRIBUTION, CHI-SQUARED, GAMMA, WEIBULL, BINOMIAL, POISSON, GEOMETRIC, HYPERGEOMETRIC and EMPIRICAL.

values

Matrix with the parameters corresponding to the distribution associated with the duration for each activity. Considering i as an activity we have the following cases. If the distribution is TRIANGLE, then (i, 1) it is the minimum value, (i, 2) the maximum value and (i, 3) the mode. If the distribution is NORMAL, (i, 1) is the mean and (i, 2) the variance. If the distribution is EXPONENTIAL, then (i, 1) is the \lambda parameter. If the distribution is UNIFORM, (i, 1) it is the minimum value and (i, 2) the maximum value. If the distribution is T-STUDENT, (i, 1) degrees of freedom and (i, 2) non-centrality parameter delta. In FDISTRIBUTION, (i, 1) and (i, 2) degrees of freedom and (i, 3) non-centrality parameter. In CHI-SQUARED, (i, 1) degrees of freedom and (i, 2) non-centrality parameter (non-negative). In GAMMA, (i, 1) and (i, 3) shape and scale parameters and (i, 2) an alternative way to specify the scale. In WEIBULL, (i, 1) and (i, 2) shape and scale parameters. In BINOMIAL, (i, 1) number of trials (zero or more) and (i, 2) probability of success on each trial. In POISSON, (i, 1) non-negative mean. In GEOMETRIC, (i, 1) probability of success in each trial, between 0 and 1. In HYPERGEOMETRIC, (i, 1) number of white balls in the urn, (i, 2) number of black balls in the urn and (i, 3) numer of balls drawn from the urn. Finally, if the distribution is EMPIRICAL, then (i,j), for all j\in \{1,...,M\} such that M>0, is the sample.

percentile

Percentile used to calculate the maximum time allowed for the duration of the project (Default=0.95).

plot.activities.times

Vector of selected activities to show the distribution of their early and last times (Default=NULL).

compilations

Number of compilations that the function will use for average calculations (Default=1000).

Value

Two values, average duration time and the maximum time allowed, a critically index vector and a durations histogram.

Examples

prec1and2<-matrix(c(0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0),nrow=5,ncol=5,byrow=TRUE)
distribution<-c("TRIANGLE","TRIANGLE","TRIANGLE","TRIANGLE","EXPONENTIAL")
values<-matrix(c(1,3,2,1/2,3/2,1,1/4,9/4,1/2,3,5,4,1/2,0,0),nrow=5,byrow=TRUE)
percentile<-0.95
plot.activities.times<-c(1,4)
stochastic.pert(prec1and2=prec1and2,distribution=distribution,values=values,
percentile=percentile,plot.activities.times=plot.activities.times)


[Package ProjectManagement version 1.5.2 Index]