Add R analysis

This commit is contained in:
Loic Guegan 2021-05-08 21:38:26 +02:00
parent 159d8e123a
commit 69e8818642
3 changed files with 31 additions and 21 deletions

10
results/analysis.R Normal file
View file

@ -0,0 +1,10 @@
library("tidyverse")
data=read_csv("results.csv")
final=data%>%group_by(simkey)%>%summarize(energy=mean(energy),sd=sd(energy))
ggplot(final,aes(x=simkey,y=energy))+geom_bar(stat="identity")+
xlab("Scenario")+ylab("Energy (J)")+
geom_errorbar(aes(ymin=energy-sd, ymax=energy+sd),width=.2,size=1.5)

View file

@ -29,7 +29,7 @@ hint="false"
poff=0
pon=1
prx=1
ptx=5
ptx=2
datasize=1
simkey=0

View file

@ -1,24 +1,24 @@
node,nWakeUp,nDataRcv,nSendFail,nRcvFail,simkey,seed,energy
on0,1,0,1,0,baseline,1,450.000000
on0,1,0,1,0,baseline,2,450.000000
on0,1,0,1,0,baseline,3,450.000000
on0,1,0,1,0,baseline,4,450.000000
on0,1,0,1,0,baseline,5,450.000000
on0,1,0,1,0,baseline,6,450.000000
on0,1,0,1,0,baseline,7,450.000000
on0,1,0,1,0,baseline,8,450.000000
on0,1,0,1,0,baseline,9,450.000000
on0,1,0,1,0,baseline,10,450.000000
on0,1,0,1,0,hint,1,450.000000
on0,1,0,1,0,hint,2,450.000000
on0,1,0,1,0,hint,3,450.000000
on0,1,0,1,0,hint,4,450.000000
on0,1,0,1,0,hint,5,450.000000
on0,1,0,1,0,hint,6,450.000000
on0,1,0,1,0,hint,7,450.000000
on0,1,0,1,0,hint,8,450.000000
on0,1,0,1,0,hint,9,450.000000
on0,1,0,1,0,hint,10,450.000000
on0,1,0,1,0,baseline,1,180.000000
on0,1,0,1,0,baseline,2,180.000000
on0,1,0,1,0,baseline,3,180.000000
on0,1,0,1,0,baseline,4,180.000000
on0,1,0,1,0,baseline,5,180.000000
on0,1,0,1,0,baseline,6,180.000000
on0,1,0,1,0,baseline,7,180.000000
on0,1,0,1,0,baseline,8,180.000000
on0,1,0,1,0,baseline,9,180.000000
on0,1,0,1,0,baseline,10,180.000000
on0,1,0,1,0,hint,1,180.000000
on0,1,0,1,0,hint,2,180.000000
on0,1,0,1,0,hint,3,180.000000
on0,1,0,1,0,hint,4,180.000000
on0,1,0,1,0,hint,5,180.000000
on0,1,0,1,0,hint,6,180.000000
on0,1,0,1,0,hint,7,180.000000
on0,1,0,1,0,hint,8,180.000000
on0,1,0,1,0,hint,9,180.000000
on0,1,0,1,0,hint,10,180.000000
on0,1,0,1,0,extended,1,90.000000
on0,1,0,1,0,extended,2,90.000000
on0,1,0,1,0,extended,3,90.000000

1 node nWakeUp nDataRcv nSendFail nRcvFail simkey seed energy
2 on0 1 0 1 0 baseline 1 450.000000 180.000000
3 on0 1 0 1 0 baseline 2 450.000000 180.000000
4 on0 1 0 1 0 baseline 3 450.000000 180.000000
5 on0 1 0 1 0 baseline 4 450.000000 180.000000
6 on0 1 0 1 0 baseline 5 450.000000 180.000000
7 on0 1 0 1 0 baseline 6 450.000000 180.000000
8 on0 1 0 1 0 baseline 7 450.000000 180.000000
9 on0 1 0 1 0 baseline 8 450.000000 180.000000
10 on0 1 0 1 0 baseline 9 450.000000 180.000000
11 on0 1 0 1 0 baseline 10 450.000000 180.000000
12 on0 1 0 1 0 hint 1 450.000000 180.000000
13 on0 1 0 1 0 hint 2 450.000000 180.000000
14 on0 1 0 1 0 hint 3 450.000000 180.000000
15 on0 1 0 1 0 hint 4 450.000000 180.000000
16 on0 1 0 1 0 hint 5 450.000000 180.000000
17 on0 1 0 1 0 hint 6 450.000000 180.000000
18 on0 1 0 1 0 hint 7 450.000000 180.000000
19 on0 1 0 1 0 hint 8 450.000000 180.000000
20 on0 1 0 1 0 hint 9 450.000000 180.000000
21 on0 1 0 1 0 hint 10 450.000000 180.000000
22 on0 1 0 1 0 extended 1 90.000000
23 on0 1 0 1 0 extended 2 90.000000
24 on0 1 0 1 0 extended 3 90.000000