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("result5.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(200.093,199.844,198.801,198.127,199.936)
b <- c(190.262,190.353,193.968,190.815,193.384)
c <- c(184.094,184.094,184.094,184.094,184.658)
d <- c(354, 354, 354, 354, 354)
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("2", "10", "20", "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="Evaluation frequency (days)", 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(paste(bold('64 total nodes, 8 allocated for each user, starting initially with balancing technique, (S'[W]*'=0.5,T'[W]*'=0.5,E'[W]*'=0)')), paste(bold('inactivity threshold=300 s, startup time=30 s, last 6 hours checked at every evaluation')))), cex.main=1.4, font.main = 2, line=3, bty="o", adj=0.5)
par(new=F)
#---second row---
par(mgp=c(4,2,0))
a <- c(0.593,0.598,0.605,0.631,0.598)
b <- c(0.603,0.635,0.602,0.624,0.598)
c <- c(0.531,0.531,0.531,0.531,0.563)
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.078,0.087,0.098,0.103,0.1)
b <- c(0.146,0.162,0.137,0.155,0.138)
c <- c(0.138,0.138,0.138,0.138,0.139)
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("2", "10", "20"))
title(xlab="Evaluation frequency (days)", 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(1.112455,1.18711,1.021705,1.16399,1.06513)
b <- c(1.206531,1.172618,1.176871,1.135969,1.07757)
c <- c(1.64302,1.64302,1.64302,1.64302,1.450313)
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("2", "10", "20"))
title(xlab="Evaluation frequency (days)", 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()