delay.stochastic.pert {ProjectManagement} | R Documentation |
Problems of distribution of delay in stochastic projects
Description
This function calculates the delay of a stochastic project, once it has been carried out. In addition, it also calculates the distribution of the delay on the different activities with the Stochastic Shapley rule.
Usage
delay.stochastic.pert(
prec1and2 = matrix(0),
prec3and4 = matrix(0),
distribution,
values,
observed.duration,
percentile = NULL,
delta = NULL,
cost.function = NULL,
compilations = 1000
)
Arguments
prec1and2 |
A matrix indicating the order of precedence type 1 and 2 between the activities (Default=matrix(0)). If value |
prec3and4 |
A matrix indicating the order of precedence type 3 and 4 between the activities (Default=matrix(0)). If value |
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 |
observed.duration |
Vector with the observed duration for each activity. |
percentile |
Percentile used to calculate the maximum time allowed for the duration of the project (Default=NULL). Only percentile or delta is necessary. This value is only used if the function uses the default cost function. |
delta |
Maximum time allowed for the duration of the project (Default=NULL). Only delta or pencetile is necessary. This value is only used if the function uses the default cost function. |
cost.function |
Delay costs function. If this value is not added, a default cost function will be used. |
compilations |
Number of compilations that the function will use for average calculations (Default=1000). |
Details
Given a problem of sharing delays in a stochastic project (N,\prec,\{X_i\}_{i\in N},\{x_i\}_{i\in N})
, such that \{X_i\}_{i\in N}
is the random variable of activities' durations and \{x_i\}_{i\in N}
the observed value. It is defined as E(D(N,\prec,\{X_i\}_{i\in N}))
the expected project time, where E
is the mathematical expectation, and D(N,\prec,\{x_i\}_{i\in N})
the observed project time, then d=D(N,\prec,\{X_i\}_{i\in N})-\delta
, with \delta>0
, normally \delta>E(D(N,\prec,\{X_i\}_{i\in N}))
, is the delay. The proportional and truncated proportional rule, see delay.pert function, can be adapted to this context by using the mean of the random variables.
The Stochastic Shapley, Gonçalves-Dosantos et al. (2020), rule is based on the Shapley value for the TU game (N,v)
where v(S)=E(C(D(N,\prec,(\{X_i\}_{i\in N\backslash S},\{x_i\}_{i\in S})))
, for all S\subseteq N
, where C
is the costs function (by default C(y)=D(N,\prec,y)-\delta
). If the number of activities is greater than ten, the Shapley value, of the game (N,v)
, is estimated using a unique sampling process for all players, see Castro et al. (2009).
The Stochastic Shapley rule 2 is based on the sum of the Shapley values for the TU games (N,v)
and (N,w)
where v(S)=E(C(D(N,\prec,(\{X_i\}_{i\in N\backslash S},\{x_i\}_{i\in S}))))-E(C(D(N,\prec,(\{X_i\}_{i\in N}))))
and w(S)=E(C(D(N,\prec,(\{0_i\}_{i\in N\backslash S},\{X_i\}_{i\in S}))))
, for all S\subseteq N
, 0_N
denotes the vector in R^N
whose components are equal to zero and where C
is the costs function (by default C(y)=D(N,\prec,y)-\delta
).
Value
A delay value and solution vector.
References
- castro
Castro, J., Gómez, D., & Tejada, J. (2009). Polynomial calculation of the Shapley value based on sampling. Computers & Operations Research, 36(5), 1726-1730.
- gon
Gonçalves-Dosantos, J.C., García-Jurado, I., Costa, J. (2020) Sharing delay costs in Stochastic scheduling problems with delays. 4OR, 18(4), 457-476
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)
observed.duration<-c(2.5,1.25,2,4.5,3)
percentile<-NULL
delta<-6.5
delay.stochastic.pert(prec1and2=prec1and2,distribution=distribution,values=values,
observed.duration=observed.duration,percentile=percentile,delta=delta,
cost.function=NULL,compilations=1000)