# Calculatation of total project quality of a project using MFPP package.
library(pracma)
# Generation of a 10 by 10 upper triangular binary matrix (PEM) of logic domain of a project.
PEM <- triu(rand(10)*0.5+0.5)
# Generation of a 10 by 10 Upper triangular binary matrix of logic domain
# (a project structureof a PEM matrix).
DSM <- round(PEM)
# Generation of a 10 by 1 vector of quality parameters of a project.
q <- rand(10,1)
# For fixed project plan the TPQ is the geometric mean of quality parameters
tpq(DSM,DSM,q)
# For flexibility project plan the TPQ
# is the weighted geometric mean of
# quality parameters
tpq(DSM,PEM, q)
QD2<-cbind(q,rand(10,1)) # Generate two completion modes
# Calculate relative quality considering the best choice
tpq(DSM,PEM,q,QD2)
Run the code above in your browser using DataLab