summaryrefslogtreecommitdiff
path: root/analysis
diff options
context:
space:
mode:
Diffstat (limited to 'analysis')
-rw-r--r--analysis/analysis.R2
-rw-r--r--analysis/in-situ.R2
-rw-r--r--analysis/kmeans.R2
-rw-r--r--analysis/offline.R2
4 files changed, 4 insertions, 4 deletions
diff --git a/analysis/analysis.R b/analysis/analysis.R
index 46d8788..94b6dc6 100644
--- a/analysis/analysis.R
+++ b/analysis/analysis.R
@@ -22,7 +22,7 @@ nsimulations=nseed*nwakeupfor*nwireless*nsimkey # Must be 3200
if(!exists("data_seed")){ # Auto-load data only one time
## Load data
-data=read_csv("../CCGRID2022.csv")%>%distinct() # Note that in the data experiment wireless=="lora",seed==1,wakeupfor==60,simkey=="baseline" is present 2 times in the CSV file
+data=read_csv("../simulations/results/analysis/CCGRID2022.csv")%>%distinct() # Note that in the data experiment wireless=="lora",seed==1,wakeupfor==60,simkey=="baseline" is present 2 times in the CSV file
tmp_data_coverage=data%>%group_by(simkey,wireless,wakeupfor,seed)%>%mutate(coverage=sum(nDataRcv))%>%ungroup()%>%filter(isSender==1)%>%select(simkey,wireless,wakeupfor,seed,coverage)
data_seed_isSender=data%>%group_by(simkey,wireless,wakeupfor,seed,isSender)%>%summarize(energy_mean=mean(energy))%>%
left_join(tmp_data_coverage,by=c("simkey","wireless","wakeupfor","seed"))%>%
diff --git a/analysis/in-situ.R b/analysis/in-situ.R
index 8df51e0..8a00359 100644
--- a/analysis/in-situ.R
+++ b/analysis/in-situ.R
@@ -34,7 +34,7 @@ nsimkey=4
nsimulations=nseed*nwakeupfor*nwireless*nsimkey # Must be 3200
## Load data and prepare the data
-data=suppressMessages(read_csv("../CCGRID2022.csv"))%>%distinct() # Note that in the data experiment wireless=="lora",seed==1,wakeupfor==60,simkey=="baseline" is present 2 times in the CSV file
+data=suppressMessages(read_csv("../simulations/results/analysis/CCGRID2022.csv"))%>%distinct() # Note that in the data experiment wireless=="lora",seed==1,wakeupfor==60,simkey=="baseline" is present 2 times in the CSV file
data_seed=data%>%group_by(simkey,wireless,wakeupfor,seed)%>%summarize(energy=sum(energy),coverage=sum(nDataRcv))%>%
mutate(efficiency=energy/coverage)%>%
ungroup()
diff --git a/analysis/kmeans.R b/analysis/kmeans.R
index 320ba8d..7689502 100644
--- a/analysis/kmeans.R
+++ b/analysis/kmeans.R
@@ -31,7 +31,7 @@ nsimkey=4
nsimulations=nseed*nwakeupfor*nwireless*nsimkey # Must be 3200
## Load data
-data=suppressMessages(read_csv("../CCGRID2022.csv"))%>%distinct() # Note that in the data experiment wireless=="lora",seed==1,wakeupfor==60,simkey=="baseline" is present 2 times in the CSV file
+data=suppressMessages(read_csv("../simulations/results/analysis/CCGRID2022.csv"))%>%distinct() # Note that in the data experiment wireless=="lora",seed==1,wakeupfor==60,simkey=="baseline" is present 2 times in the CSV file
data_seed=data%>%group_by(simkey,wireless,wakeupfor,seed)%>%summarize(energy=sum(energy),coverage=sum(nDataRcv))%>% ungroup()
## Format data
diff --git a/analysis/offline.R b/analysis/offline.R
index 2b21bea..4dc991e 100644
--- a/analysis/offline.R
+++ b/analysis/offline.R
@@ -26,7 +26,7 @@ nsimkey=4
nsimulations=nseed*nwakeupfor*nwireless*nsimkey # Must be 3200
## Load data
-data=suppressMessages(read_csv("../CCGRID2022.csv"))%>%distinct() # Note that in the data experiment wireless=="lora",seed==1,wakeupfor==60,simkey=="baseline" is present 2 times in the CSV file
+data=suppressMessages(read_csv("../simulations/results/analysis/CCGRID2022.csv"))%>%distinct() # Note that in the data experiment wireless=="lora",seed==1,wakeupfor==60,simkey=="baseline" is present 2 times in the CSV file
data_seed=data%>%group_by(simkey,wireless,wakeupfor,seed)%>%summarize(energy=sum(energy),coverage=sum(nDataRcv))%>%
mutate(efficiency=energy/coverage)%>%
ungroup()