duration<-c(3,4,2,1)
prec1and2<-matrix(c(0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0),nrow=4,ncol=4,byrow=TRUE)
resources<-c(4,1,3,3)
max.resources<-4
resource.allocation(duration,prec1and2,prec3and4=matrix(0),resources,max.resources,int=1)
Run the code above in your browser using DataLab