# Calculation of TPC for a generated project scenario.
# using MFPP package.
# Generation of 10 by 10 Upper triangular binary matrix (DSM) of logic domain.
library(Matrix)
library(pracma)
DSM<-triu(round(rand(10)*.5+.5)) # Generate DSM
# Generation of 10 by 1 cost vector (cost demands 30)
C<-rand(10,1)*30 # Generate C vector (cost demands)
# Calculation of total project cost using MFPP package.
TPC<-tpc(DSM,C) # Calculate TPC
Run the code above in your browser using DataLab