|
#session 7 |
|
# d <- d[,-5] to delete a column |
|
d <- cbind(PT=c(3,20,15,8,2)) |
|
rownames(d) <- c("file","foreign","d1", "d2","print") |
|
d <- cbind(d, num_res=c(1,2,3,2,1)) |
|
d <- cbind(d, 60*d[,"num_res"]/d[,"PT"]) |
|
colnames(d)[3] <- "cap" #oops |
|
|
|
d <- cbind(d,for_dem=c(NA,NA,NA,NA,NA)) |
|
d <- cbind(d,reg_dem=rep(NA,nrow(d))) |
|
d <- cbind(d,ez_dem=rep(NA,nrow(d))) |
|
|
|
d["file","for_dem"] = 3 |
|
d["file","reg_dem"] = 11 |
|
d["file","ez_dem"] = 4 |
|
d["foreign","for_dem"]=3 |
|
d["d1","for_dem"]=3 |
|
d["d1","reg_dem"]=11 |
|
d["d2","ez_dem"]=4 |
|
d["print","ez_dem"]=4 |
|
d["print","reg_dem"]=11 |
|
d["print","for_dem"]=3 |
|
|
|
d <- cbind(d,total_dem=rowSums(d[,4:6],na.rm=TRUE)) |
|
d <- cbind(d,impl_util=d[,"total_dem"]/d[,"cap"]) |
|
#the above model assumes that processing time is uniform for all kinds of demand. that might be incorrect |
|
|
|
#minute of work model |
|
d <- cbind(PT=c(3,20,15,8,2)) |
|
rownames(d) <- c("file","foreign","d1", "d2","print") |
|
d <- cbind(d, num_res=c(1,2,3,2,1)) |
|
d <- cbind(d, time_avail=60*d[,"num_res"]) |
|
|
|
d <- cbind(d,for_dem=c(NA,NA,NA,NA,NA)) |
|
d <- cbind(d,reg_dem=rep(NA,nrow(d))) |
|
d <- cbind(d,ez_dem=rep(NA,nrow(d))) |
|
|
|
d["file","for_dem"] = 3 |
|
d["file","reg_dem"] = 11 |
|
d["file","ez_dem"] = 4 |
|
d["foreign","for_dem"]=3 |
|
d["d1","for_dem"]=3 |
|
d["d1","reg_dem"]=11 |
|
d["d2","ez_dem"]=4 |
|
d["print","ez_dem"]=4 |
|
d["print","reg_dem"]=11 |
|
d["print","for_dem"]=3 |
|
|
|
|
|
d <- cbind(d,for_tim=rep(NA,nrow(d))) |
|
d <- cbind(d,reg_tim=rep(NA,nrow(d))) |
|
d <- cbind(d,ez_tim=rep(NA,nrow(d))) |
|
|
|
effort <- matrix(rep(3),3) |
|
rownames(effort) <- c("for","reg","ez") |
|
colnames(effort)[1] <- "file_eff" |
|
effort <- cbind(effort, for_eff=rep(20,3)) |
|
|
|
|
|
effort <- cbind(effort, d1_eff=rep(15,3)) |
|
effort <- cbind(effort, d2_eff=rep(8,3)) |
|
effort <- cbind(effort, print_eff=rep(2,3)) |
|
k <- t(effort) # transposing, because I cant really do matrix multiplication here |
|
k[is.na(k)] <- 0 |
|
d <- cbind(d,k*t(effort)) |
|
|
|
colnames(d)[7] = "for_eff" |
|
colnames(d)[8] = "reg_eff" |
|
colnames(d)[9] = "ez_eff" |
|
|
|
d <- cbind(d,total_eff=rowSums(d[,7:9],na.rm=TRUE)) |
|
d <- cbind(d,impl_util=d[,"total_eff"]/d[,"time_avail"]) |