mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss.git
synced 2025-04-05 11:06:25 +02:00
Enhance analysis
This commit is contained in:
parent
bf8117d3aa
commit
44147f8896
5 changed files with 17331 additions and 8 deletions
|
@ -3,15 +3,25 @@ library("knitr")
|
|||
|
||||
data=read_csv("results.csv")
|
||||
|
||||
final=data%>%group_by(simkey,wireless,wakeupfor)%>%summarize(energy=mean(energy),wireless=first(wireless),sd=sd(energy),wakeupfor=first(wakeupfor))
|
||||
final=data%>%group_by(simkey,wireless,wakeupfor)%>%summarize(wireless=first(wireless),sd=sd(energy),wakeupfor=first(wakeupfor),energy=mean(energy))
|
||||
|
||||
ggplot(final,aes(x=simkey,y=energy))+
|
||||
geom_bar(stat="identity",aes(fill=wireless),position=position_dodge())+
|
||||
ggplot(final,aes(x=simkey,y=energy,fill=wireless))+
|
||||
geom_bar(stat="identity",position=position_dodge())+
|
||||
xlab("Scenarios")+ylab("Energy (J)")+
|
||||
geom_errorbar(aes(ymin=energy-sd, ymax=energy+sd),width=.2,size=1.5) +
|
||||
facet_wrap(~ wakeupfor)
|
||||
geom_errorbar(position=position_dodge(0.9),aes(ymin=energy-sd, ymax=energy+sd),width=0.5,size=1.5,) +
|
||||
facet_wrap(~ wakeupfor) +
|
||||
geom_text(aes(label = round(energy+sd), y= energy+sd),vjust=-0.4,position=position_dodge(0.9))+
|
||||
geom_text(aes(label = round(energy-sd), y= energy-sd),vjust=+1.5,position=position_dodge(0.9))+
|
||||
geom_text(aes(label = round(energy), y= energy/2),fontface="bold",colour="white",position=position_dodge(0.9))
|
||||
|
||||
ggsave("figure.png")
|
||||
|
||||
tf="tables.org"
|
||||
write("",file=tf)
|
||||
for(wake in unique(data$wakeupfor)){
|
||||
print(kable(final%>%filter(wireless=="lora",wakeupfor==wake)))
|
||||
print(kable(final%>%filter(wireless!="lora",wakeupfor==wake)))
|
||||
write(kable(final%>%filter(wireless=="lora",wakeupfor==wake)),file=tf,append=TRUE)
|
||||
write("\n",file=tf,append=TRUE)
|
||||
write(kable(final%>%filter(wireless=="nbiot",wakeupfor==wake)),file=tf,append=TRUE)
|
||||
write("\n",file=tf,append=TRUE)
|
||||
}
|
||||
|
||||
|
|
BIN
results/figure.png
Normal file
BIN
results/figure.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 210 KiB |
|
@ -40,7 +40,7 @@ bitrate="100kbps"
|
|||
|
||||
run-scenarios() {
|
||||
# Configure number of seed per scenarios
|
||||
nseed=10
|
||||
nseed=100
|
||||
|
||||
# Baseline
|
||||
echo "Baseline..."
|
||||
|
|
17280
results/results.csv
17280
results/results.csv
File diff suppressed because it is too large
Load diff
33
results/tables.org
Normal file
33
results/tables.org
Normal file
|
@ -0,0 +1,33 @@
|
|||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|----------:|--------:|
|
||||
|baseline |lora | 60| 0.2266042| 230.3920|
|
||||
|extended |lora | 60| 50.7186446| 606.5560|
|
||||
|hint |lora | 60| 0.2266042| 230.3920|
|
||||
|hintandextended |lora | 60| 52.7539403| 617.1553|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|----------:|--------:|
|
||||
|baseline |nbiot | 60| 0.9205795| 935.9675|
|
||||
|extended |nbiot | 60| 51.9906616| 607.3420|
|
||||
|hint |nbiot | 60| 0.9205795| 935.9675|
|
||||
|hintandextended |nbiot | 60| 53.9800436| 617.9613|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|---------:|
|
||||
|baseline |lora | 180| 2.276321| 690.8349|
|
||||
|extended |lora | 180| 34.623157| 1723.1557|
|
||||
|hint |lora | 180| 2.276321| 690.8349|
|
||||
|hintandextended |lora | 180| 51.402788| 1776.4173|
|
||||
|
||||
|
||||
|simkey |wireless | wakeupfor| sd| energy|
|
||||
|:---------------|:--------|---------:|---------:|--------:|
|
||||
|baseline |nbiot | 180| 387.22964| 2401.296|
|
||||
|extended |nbiot | 180| 89.44436| 1774.901|
|
||||
|hint |nbiot | 180| 360.14353| 2443.371|
|
||||
|hintandextended |nbiot | 180| 78.21175| 1831.326|
|
||||
|
||||
|
Loading…
Add table
Reference in a new issue