mirror of
https://gitlab.com/manzerbredes/paper-lowrate-iot.git
synced 2025-05-01 01:17:46 +00:00
Update simulations
This commit is contained in:
parent
daa845cc49
commit
bf96465528
393 changed files with 5613238 additions and 70539 deletions
|
@ -14,11 +14,13 @@
|
|||
#+BEGIN_SRC bash :noweb yes :results output
|
||||
<<singleRun>>
|
||||
simKey="BW"
|
||||
sensorsNumber=10
|
||||
for linksBandwidth in $(seq 10 20 100)
|
||||
for sensorsNumber in $(seq 1 15)
|
||||
do
|
||||
run
|
||||
done
|
||||
for linksBandwidth in $(seq 10 20 100)
|
||||
do
|
||||
run
|
||||
done
|
||||
done
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: runBW
|
||||
|
@ -30,11 +32,13 @@
|
|||
#+BEGIN_SRC bash :noweb yes :results output
|
||||
<<singleRun>>
|
||||
simKey="LATENCY"
|
||||
sensorsNumber=10
|
||||
for linksLatency in $(seq 1 1 10)
|
||||
for sensorsNumber in $(seq 1 15)
|
||||
do
|
||||
run
|
||||
done
|
||||
for linksLatency in $(seq 1 1 10)
|
||||
do
|
||||
run
|
||||
done
|
||||
done
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: runLat
|
||||
|
@ -59,12 +63,17 @@
|
|||
#+BEGIN_SRC bash :noweb yes :results output
|
||||
<<singleRun>>
|
||||
simKey="NBHOP"
|
||||
for nbHop in $(seq 1 10)
|
||||
for sensorsNumber in $(seq 1 15)
|
||||
do
|
||||
run
|
||||
done
|
||||
for nbHop in $(seq 1 10)
|
||||
do
|
||||
run
|
||||
done
|
||||
done
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: runNbHop
|
||||
|
||||
** Single Run
|
||||
|
||||
#+NAME: singleRun
|
||||
|
@ -144,12 +153,14 @@
|
|||
#+NAME: genAllPlots
|
||||
#+BEGIN_SRC R :noweb yes :results output
|
||||
<<RUtils>>
|
||||
easyPlot("linksLatency","totalEnergy", "LATENCY")
|
||||
easyPlot("linksBandwidth","totalEnergy", "BW")
|
||||
easyPlotGroup("linksLatency","totalEnergy", "LATENCY","sensorsNumber")
|
||||
easyPlotGroup("linksBandwidth","totalEnergy", "BW","sensorsNumber")
|
||||
easyPlot("sensorsNumber","totalEnergy", "NBSENSORS")
|
||||
easyPlot("nbHop","totalEnergy", "NBHOP")
|
||||
easyPlotGroup("nbHop","totalEnergy", "NBHOP","sensorsNumber")
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: genAllPlots
|
||||
|
||||
*** R Utils
|
||||
RUtils is intended to load logs (data.csv) and providing
|
||||
simple plot function for them.
|
||||
|
@ -180,6 +191,13 @@
|
|||
ggplot(curData,aes_string(x=X,y=Y))+geom_point()+geom_line()+xlab(getLabel(X))+ylab(getLabel(Y))
|
||||
ggsave(paste0("plots/",KEY,"-",X,"_",Y,".png"))
|
||||
}
|
||||
|
||||
easyPlotGroup=function(X,Y,KEY,GRP){
|
||||
curData=data%>%filter(simKey==KEY) %>% mutate(!!GRP:=as.character(UQ(rlang::sym(GRP)))) # %>%mutate(sensorsNumber=as.character(sensorsNumber))
|
||||
stopifnot(NROW(curData)>0)
|
||||
ggplot(curData,aes_string(x=X,y=Y,color=GRP,group=GRP))+geom_point()+geom_line()+xlab(getLabel(X))+ylab(getLabel(Y)) + labs(color = getLabel(GRP))
|
||||
ggsave(paste0("plots/",KEY,"-",X,"_",Y,".png"))
|
||||
}
|
||||
#+END_SRC
|
||||
|
||||
** Plots -> PDF
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue