mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss-extended.git
synced 2025-04-05 19:16:26 +02:00
Minor changes
This commit is contained in:
parent
363b14e967
commit
7bc73b807f
1 changed files with 32 additions and 4 deletions
|
@ -29,8 +29,8 @@ dformat=function(data){
|
|||
build_stats=function(file){
|
||||
data=read_csv(file)
|
||||
energy60=data%>%filter(wakeupfor==60)
|
||||
energy60Snd=energy60%>%filter(isSender==1)%>%group_by(simkey,wireless)%>%summarise(sd=sd(energy),energy=mean(energy),type="Sender")
|
||||
energy60Rcv=energy60%>%filter(isSender==0)%>%group_by(simkey,wireless)%>%summarise(sd=sd(energy),energy=mean(energy),type="Receiver")
|
||||
energy60Snd=energy60%>%filter(isSender==1)%>%group_by(simkey,wireless)%>%summarise(sd=sd(energy),sd_energy=sd(energy),energy=mean(energy),type="Sender")
|
||||
energy60Rcv=energy60%>%filter(isSender==0)%>%group_by(simkey,wireless)%>%summarise(sd=sd(energy),sd_energy=sd(energy),energy=mean(energy),type="Receiver")
|
||||
energy60=energy60Snd%>%ungroup()%>%rbind(energy60Rcv)
|
||||
energy60=energy60%>%mutate(sd_min=energy-sd,sd_max=energy+sd)%>%mutate(sd_min_txt=paste0("-",r_(sd_min)))%>%mutate(sd_max_txt=paste0("+",r_(sd_max)))
|
||||
energy60Baseline=energy60%>%filter(simkey=="baseline")%>%uncount(nsimkeys,.id="id")%>%mutate(simkey=simkeys[id])
|
||||
|
@ -46,8 +46,8 @@ energy60=energy60%>%mutate(type=factor(type,levels = c("Sender","Receiver")),wak
|
|||
|
||||
|
||||
energy180=data%>%filter(wakeupfor==180)
|
||||
energy180Snd=energy180%>%filter(isSender==1)%>%group_by(simkey,wireless)%>%summarise(sd=sd(energy),energy=mean(energy),type="Sender")
|
||||
energy180Rcv=energy180%>%filter(isSender==0)%>%group_by(simkey,wireless)%>%summarise(sd=sd(energy),energy=mean(energy),type="Receiver")
|
||||
energy180Snd=energy180%>%filter(isSender==1)%>%group_by(simkey,wireless)%>%summarise(sd=sd(energy),sd_energy=sd(energy),energy=mean(energy),type="Sender")
|
||||
energy180Rcv=energy180%>%filter(isSender==0)%>%group_by(simkey,wireless)%>%summarise(sd=sd(energy),sd_energy=sd(energy),energy=mean(energy),type="Receiver")
|
||||
energy180=energy180Snd%>%ungroup()%>%rbind(energy180Rcv)%>%mutate(type=factor(type,levels = c("Sender","Receiver")))
|
||||
energy180=energy180%>%mutate(sd_min=energy-sd,sd_max=energy+sd)%>%mutate(sd_min_txt=paste0("-",r_(sd_min)))%>%mutate(sd_max_txt=paste0("+",r_(sd_max)))
|
||||
energy180Baseline=energy180%>%filter(simkey=="baseline")%>%uncount(nsimkeys,.id="id")%>%mutate(simkey=simkeys[id])
|
||||
|
@ -207,3 +207,31 @@ fw(r"(\multicolumn{9}{c}{NbIoT}\\)")
|
|||
fw(r"(\midrule)")
|
||||
write_table("nbiot")
|
||||
fw(footer)
|
||||
|
||||
|
||||
|
||||
## Print energy sd infos
|
||||
stats_sor=build_stats("logs/sor_results/results.csv")
|
||||
stats_uor=build_stats("logs/uor_results/results.csv")
|
||||
stats_farhint=build_stats("logs/farhint_results/results.csv")
|
||||
stats_combined=build_stats("logs/combined/results.csv")
|
||||
message(paste0("Energy std SOR: min=",
|
||||
round(min(stats_sor$sd_energy)),
|
||||
" max=",round(max(stats_sor$sd_energy)),
|
||||
" median=",round(median(stats_sor$sd_energy))))
|
||||
|
||||
message(paste0("Energy std UOR: min=",
|
||||
round(min(stats_uor$sd_energy)),
|
||||
" max=",round(max(stats_uor$sd_energy)),
|
||||
" median=",round(median(stats_uor$sd_energy))))
|
||||
|
||||
|
||||
message(paste0("Energy std FARHINT: min=",
|
||||
round(min(stats_farhint$sd_energy)),
|
||||
" max=",round(max(stats_farhint$sd_energy)),
|
||||
" median=",round(median(stats_farhint$sd_energy))))
|
||||
|
||||
message(paste0("Energy std combined: min=",
|
||||
round(min(stats_combined$sd_energy)),
|
||||
" max=",round(max(stats_combined$sd_energy)),
|
||||
" median=",round(median(stats_combined$sd_energy))))
|
||||
|
|
Loading…
Add table
Reference in a new issue