Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
unlink(".RData")
unlink(".RHistory")
rm(list=ls())
pdf("result8.pdf", 8.5, 11)
error.bar <- function(x, y, upper, lower=upper, length=0.1, ...) {
if(length (x) != length (y) | length(y) != length(lower) | length(lower) != length(upper))
stop("vectors must be same length")
arrows(x, y+upper, x, y-lower, angle=90, code=3, length=length, ...)
}
par(mar=c(7.5,7.5,4.1,1.2), oma=c(0,0,4,0), xpd=NA, mfrow=c(3,1))
#---first row---
par(mgp=c(4,2,0))
a <- c(186.514,186.514,186.514,186.514,186.514)
b <- c(192.611,192.611,192.611,192.611,192.611)
c <- c(204.756,204.756,204.756,204.756,204.756)
d <- c(424,424,424,424,424)
stdevs <- c(sd(a), sd(b), sd(c), sd(d))
means <- c(mean(a), mean(b), mean(c), mean(d))
centers <- barplot(means, yaxt='n', cex.names=1.5, beside=TRUE, names.arg=c("1", "2", "4", "Always on"),
col=c("red", "red", "red", "black"), density=c(100, 100, 100, 100))
error.bar(centers, means, 1.96*stdevs/sqrt(5))
title(xlab="Similarity threshold (hours)", cex.lab=1.5)
par(mgp=c(3.5,1,0))
axis(2, las=1, cex.axis=1.5, tck=-.05)
title(ylab="Total consumption (MWh)", cex.lab=1.5)
title(main=expression(atop(atop(paste(bold("64 total nodes, 8 allocated for each user, inactivity threshold=300 s, startup time=30 s")), paste(bold("initially with balancing technique (S"[W]*"=0.5, T"[W]*"=0.5, E"[W]*"=0)",))), atop(paste(bold("evaluations done every 2 days, last 6 hours checked at every evaluation")),""))), cex.main=2, font.main = 2, line=4, bty="o", adj=0.5)
par(new=F)
#---second row---
par(mgp=c(4,2,0))
a <- c(0.226,0.226,0.226,0.226,0.226)
b <- c(0.118,0.118,0.118,0.118,0.118)
c <- c(0.19,0.19,0.19,0.19,0.19)
x <- 1:3
stdevs <- c(sd(a), sd(b), sd(c))
means <- c(mean(a), mean(b), mean(c))
min1 <- means-stdevs
max1 <- means+stdevs
plot(means, main="", xlab="", ylab="", pch=0, frame.plot=T, col="red", ylim=range(c(0, 4)), axes=F, cex.lab=1)
lines(means, type="o", col="red", pch=0, lwd=1, lty=2)
error.bar(x, means, 1.96*stdevs/sqrt(5))
par(new=T)
a <- c(0.315,0.315,0.315,0.315,0.315)
b <- c(0.138,0.138,0.138,0.138,0.138)
c <- c(0.165,0.165,0.165,0.165,0.165)
x <- 1:3
stdevs <- c(sd(a), sd(b), sd(c))
means <- c(mean(a), mean(b), mean(c))
min2 <- means-stdevs
max2 <- means+stdevs
min2 <- min(min1, min2)
max2 <- max(max1, max2)
plot(means, main="", xlab="", ylab="", pch=0, frame.plot=T, col="blue", ylim=range(c(0, 4)), axes=F, cex.lab=1)
lines(means, type="o", col="blue", pch=0, lwd=1, lty=2)
error.bar(x, means, 1.96*stdevs/sqrt(5))
axis(1,at=1:3, las=1, cex.axis=1.5, tck=-.05, labels=c("1", "2", "4"))
title(xlab="Similarity threshold (hours)", cex.lab=1.5)
par(mgp=c(2.5,1,0))
axis(2, las=1, cex.axis=1.5, tck=-.05)
title(ylab="CV of storage space\n and on-time", cex.lab=1.5)
par(xpd=T)
legend("top", inset=-.15, pch=c(0,0), lty=c(2,2), col=c("red","blue"), c("CV of storage space", "CV of on-time"), bty="n", cex=1.25, ncol=2, text.width=c(0.5,0.5))
par(xpd=F)
#---third row---
par(mgp=c(4,2,0))
a <- c(0.64337,0.64337,0.64337,0.64337,0.64337)
b <- c(0.596519,0.596519,0.596519,0.596519,0.596519)
c <- c(0.610936,0.610936,0.610936,0.610936,0.610936)
x <- 1:3
stdevs <- c(sd(a), sd(b), sd(c))
means <- c(mean(a), mean(b), mean(c))
plot(means, main="", xlab="", ylab="", pch=0, frame.plot=T, col="darkgreen", ylim=range(c(0, 2)), axes=F, cex.lab=1)
lines(means, type="o", col="darkgreen", pch=0, lwd=1, lty=2)
error.bar(x, means, 1.96*stdevs/sqrt(5))
axis(1,at=1:3, las=1, cex.axis=1.5, tck=-.05, labels=c("1", "2", "4"))
title(xlab="Similarity threshold (hours)", cex.lab=1.5)
par(mgp=c(3.5,1,0))
axis(2, las=1, cex.axis=1.5, tck=-.05)
title(ylab="Latency per access (s)", cex.lab=1.5)
dev.off()