diff --git a/Reports/Thesis/sections/results.tex b/Reports/Thesis/sections/results.tex
index 4ad407f..5d8884a 100644
--- a/Reports/Thesis/sections/results.tex
+++ b/Reports/Thesis/sections/results.tex
@@ -41,10 +41,20 @@ TODO: ask Jonas: add urls to the correct data? via citation?
A lot of data is available but only the most relevant data needs to be used. Experiments will be done to identify which data and features improve the NRV modeling. The data will be split into a training and test set. The training dataset starts depending on which data features are used but ends on 31-12-2022. The test set starts on 01-01-2023 and ends on (TODO: check the end date). This makes sure enough data is available to train the models and the test set is large enough to evaluate the models. The year 2023 is chosen as the test set because it is the most recent data available when the thesis experiments were conducted. Using data from 2022 in the test set also does not make a lot of sense because the trained models would be used to predict the future. Data from 2022 is not relevant anymore to evaluate the models.
\subsection{Quantile Regression}
-\input{sections/results/linear}
+\input{sections/results/models/linear}
-\input{sections/results/non-linear}
+\input{sections/results/models/non-linear}
-\input{sections/results/gru}
+\input{sections/results/models/gru}
-\input{sections/results/diffusion}
+\input{sections/results/models/diffusion}
+
+\input{sections/results/models/comparison}
+
+\newpage
+\section{Policies for battery optimization}
+The goal of this thesis is to model the NRV data and use this to optimize the buying and selling of electricity to make a profit. Different models and methods can be used to model the NRV data which can all result in different results. To evaluate the performance of the models, the generated profit on the test set can be used as a metric. First of all, baselines are needed to be able to compare the models to if adding NRV predictions to the policies improves the profit. The baselines are already discussed in the background section. It is very important to compare the baselines and other policies fairly. The profit depends on the number of charge cycles that are used. The more charge cycles a policy uses, the more profit it will be able to make. Using too many charge cycles is bad for the health of the battery. A penalty parameter can be used to penalize the policy when too many charge cycles are used in a day. To fairly compare the policies with different models and baselines, a maximum number of charge cycles is determined for the test period. The test period starts on 01-01-2023 and ends on (TODO: check the end date). Assuming a maximum of 400 charge cycles can be used in a year, only 293 charge cycles can be used during the test period. The penalty parameter is optimized using a simple gradient descent approach to make sure only 293 charge cycles are used during the test period. The profit is then calculated using the optimized penalty parameter.
+
+\input{sections/results/policies/baselines}
+
+\input{sections/results/policies/nrv_samples_policy}
diff --git a/Reports/Thesis/sections/results/models/comparison.tex b/Reports/Thesis/sections/results/models/comparison.tex
new file mode 100644
index 0000000..e04fccb
--- /dev/null
+++ b/Reports/Thesis/sections/results/models/comparison.tex
@@ -0,0 +1 @@
+\subsection{Comparison}
diff --git a/Reports/Thesis/sections/results/diffusion.tex b/Reports/Thesis/sections/results/models/diffusion.tex
similarity index 100%
rename from Reports/Thesis/sections/results/diffusion.tex
rename to Reports/Thesis/sections/results/models/diffusion.tex
diff --git a/Reports/Thesis/sections/results/gru.tex b/Reports/Thesis/sections/results/models/gru.tex
similarity index 100%
rename from Reports/Thesis/sections/results/gru.tex
rename to Reports/Thesis/sections/results/models/gru.tex
diff --git a/Reports/Thesis/sections/results/linear.aux b/Reports/Thesis/sections/results/models/linear.aux
similarity index 100%
rename from Reports/Thesis/sections/results/linear.aux
rename to Reports/Thesis/sections/results/models/linear.aux
diff --git a/Reports/Thesis/sections/results/linear.tex b/Reports/Thesis/sections/results/models/linear.tex
similarity index 100%
rename from Reports/Thesis/sections/results/linear.tex
rename to Reports/Thesis/sections/results/models/linear.tex
diff --git a/Reports/Thesis/sections/results/non-linear.tex b/Reports/Thesis/sections/results/models/non-linear.tex
similarity index 100%
rename from Reports/Thesis/sections/results/non-linear.tex
rename to Reports/Thesis/sections/results/models/non-linear.tex
diff --git a/Reports/Thesis/sections/results/policies/baselines.tex b/Reports/Thesis/sections/results/policies/baselines.tex
new file mode 100644
index 0000000..9a31e23
--- /dev/null
+++ b/Reports/Thesis/sections/results/policies/baselines.tex
@@ -0,0 +1,20 @@
+\subsection{Baselines}
+As discussed earlier, the most simple baseline that can be used is choosing two fixed thresholds. One threshold is used to buy electricity and the other threshold is used to sell electricity. The thresholds can be chosen based on the available historical data. A simple grid search is done over multiple combinations of thresholds. For each combination, the penalty parameter is optimized to make sure only 400 charge cycles are used in a year. The thresholds that achieve the highest profit on the training set are then used to evaluate the policy on the test set. The thresholds found that maximize the profit on the training set are 100€/MWh for buying and 200€/MWh for selling. Evaluating these thresholds on the test set results in a profit of €266,294.15 but using 492.0 charge cycles. This can not be used to fairly compare other policies. The thresholds can also be determined on the test set itself to find what the maximum possible profit is for the fixed thresholds policy. This can not be used in practice because the thresholds are determined on future data. It is, however, useful for the comparison of the other policies. The best thresholds found on the test set are 200€/MWh for buying and 250€/MWh for selling. The profit achieved using these thresholds is €143,004.34 with 287.12 charge cycles.
+
+Another baseline that can be used is using the real NRV data of the previous day to determine the buying and selling thresholds for the next day. The NRV data of the previous day can be seen as a prediction for the NRV data of the next day. Now, the thresholds are not fixed anymore but are determined based on the NRV predictions. The thresholds are determined separately for each day using a simple grid search which allows the policy to adapt to the changing NRV data. The penalty parameter is also optimized to make sure only around 283 charge cycles are used. The profit achieved using this policy is €198,807.09 using 283.5 charge cycles.
+
+The baseline policy using the NRV data of the day before as a prediction can be adapted to use the real NRV data of the day that is being optimized. This policy can show the maximum profit that can be achieved if a perfect NRV prediction is made. The profit for the policy using a perfect prediction of the NRV is €230,317.84 using 282.5 charge cycles. This policy can be seen as the upper bound for the other policies. To achieve better profit results than this, more complex policies need to be used. \\
+
+\begin{table}[H]
+ \centering
+ \begin{tabular}{|l|l|l|l|}
+ \hline
+ \textbf{Policy} & \textbf{Profit (€)} & \textbf{Charge cycles} \\ \hline
+ Fixed thresholds & 143,004.34 & 287.12\\ \hline
+ Yesterday NRV & 198,807.09 & 283.5\\ \hline
+ Perfect NRV & 230,317.84 & 282.5\\ \hline
+
+ \end{tabular}
+ \caption{Results of the baseline policies on the test set. }
+ \label{tab:fixed_thresholds}
+\end{table}
diff --git a/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex b/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex
new file mode 100644
index 0000000..c9ce139
--- /dev/null
+++ b/Reports/Thesis/sections/results/policies/nrv_samples_policy.tex
@@ -0,0 +1,9 @@
+\subsection{Policy using generated NRV samples}
+The generated full-day samples can be used to improve the profit of the policy. For each day, the generated samples can be used to determine the buying and selling thresholds. Assume that there are 100 generated full-day NRV samples for the day for which the profit needs to be optimized. The thresholds are determined for each generated sample separately using a simple grid search. All these thresholds can then be reduced by taking the mean to get one value for the buying threshold and one value for the selling threshold. Again, the penalty parameter is optimized for the test set to make sure around 283 charge cycles are used for fair comparison. The policy is evaluated for the different types of models that were trained and discussed in the previous sections.
+
+% TODO: Explain the results of the different models
+% TODO: Compare with baselines
+
+% TODO: explain further
+An observation that can be made is that the metrics used to evaluate the NRV predictions, do not necessarily correlate with the profit that can be made using the predictions. This means the best model in terms of the metrics does not necessarily result in the best profit. During the training, the profit should be used as a metric to evaluate the models but this becomes computationally expensive.
+
diff --git a/Reports/Thesis/verslag 10.synctex.gz b/Reports/Thesis/verslag 10.synctex.gz
new file mode 100644
index 0000000..a244560
Binary files /dev/null and b/Reports/Thesis/verslag 10.synctex.gz differ
diff --git a/Reports/Thesis/verslag 11.synctex.gz b/Reports/Thesis/verslag 11.synctex.gz
new file mode 100644
index 0000000..56a3f19
Binary files /dev/null and b/Reports/Thesis/verslag 11.synctex.gz differ
diff --git a/Reports/Thesis/verslag 3.synctex.gz b/Reports/Thesis/verslag 3.synctex.gz
new file mode 100644
index 0000000..ae90e13
Binary files /dev/null and b/Reports/Thesis/verslag 3.synctex.gz differ
diff --git a/Reports/Thesis/verslag 4.synctex.gz b/Reports/Thesis/verslag 4.synctex.gz
new file mode 100644
index 0000000..c2194bc
Binary files /dev/null and b/Reports/Thesis/verslag 4.synctex.gz differ
diff --git a/Reports/Thesis/verslag 5.synctex.gz b/Reports/Thesis/verslag 5.synctex.gz
new file mode 100644
index 0000000..bcbc46b
Binary files /dev/null and b/Reports/Thesis/verslag 5.synctex.gz differ
diff --git a/Reports/Thesis/verslag 6.synctex.gz b/Reports/Thesis/verslag 6.synctex.gz
new file mode 100644
index 0000000..17f2749
Binary files /dev/null and b/Reports/Thesis/verslag 6.synctex.gz differ
diff --git a/Reports/Thesis/verslag 7.synctex.gz b/Reports/Thesis/verslag 7.synctex.gz
new file mode 100644
index 0000000..6422847
Binary files /dev/null and b/Reports/Thesis/verslag 7.synctex.gz differ
diff --git a/Reports/Thesis/verslag 8.synctex.gz b/Reports/Thesis/verslag 8.synctex.gz
new file mode 100644
index 0000000..18fc7e7
Binary files /dev/null and b/Reports/Thesis/verslag 8.synctex.gz differ
diff --git a/Reports/Thesis/verslag 9.synctex.gz b/Reports/Thesis/verslag 9.synctex.gz
new file mode 100644
index 0000000..956abb1
Binary files /dev/null and b/Reports/Thesis/verslag 9.synctex.gz differ
diff --git a/Reports/Thesis/verslag.aux b/Reports/Thesis/verslag.aux
index 0cc17c3..0531ac9 100644
--- a/Reports/Thesis/verslag.aux
+++ b/Reports/Thesis/verslag.aux
@@ -82,17 +82,20 @@
\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}Diffusion}{36}{subsection.6.3}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {14}{\ignorespaces Intermediate steps of the diffusion model for example 864 from the test set. The confidence intervals shown in the plots are made using 100 samples.\relax }}{38}{figure.caption.23}\protected@file@percent }
\newlabel{fig:diffusion_intermediates}{{14}{38}{Intermediate steps of the diffusion model for example 864 from the test set. The confidence intervals shown in the plots are made using 100 samples.\relax }{figure.caption.23}{}}
-\@writefile{toc}{\contentsline {section}{\numberline {7}Policies for battery optimization}{38}{section.7}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Baselines}{38}{subsection.7.1}\protected@file@percent }
-\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Policies using NRV predictions}{38}{subsection.7.2}\protected@file@percent }
-\abx@aux@page{6}{39}
-\abx@aux@page{7}{39}
-\abx@aux@page{8}{39}
-\abx@aux@page{9}{39}
+\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}Comparison}{38}{subsection.6.4}\protected@file@percent }
+\@writefile{toc}{\contentsline {section}{\numberline {7}Policies for battery optimization}{39}{section.7}\protected@file@percent }
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Baselines}{39}{subsection.7.1}\protected@file@percent }
+\@writefile{lot}{\contentsline {table}{\numberline {9}{\ignorespaces Results of the baseline policies on the test set. \relax }}{40}{table.caption.24}\protected@file@percent }
+\newlabel{tab:fixed_thresholds}{{9}{40}{Results of the baseline policies on the test set. \relax }{table.caption.24}{}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Policy using generated NRV samples}{40}{subsection.7.2}\protected@file@percent }
+\abx@aux@page{6}{41}
+\abx@aux@page{7}{41}
+\abx@aux@page{8}{41}
+\abx@aux@page{9}{41}
\abx@aux@read@bbl@mdfivesum{5DC935CC8C8FAB8A3CAF97A486ED2386}
\abx@aux@read@bblrerun
\abx@aux@defaultrefcontext{0}{dumas_deep_2022}{nyt/global//global/global}
\abx@aux@defaultrefcontext{0}{lu_scenarios_2022}{nyt/global//global/global}
\abx@aux@defaultrefcontext{0}{poggi_electricity_2023}{nyt/global//global/global}
\abx@aux@defaultrefcontext{0}{weron_electricity_2014}{nyt/global//global/global}
-\gdef \@abspage@last{40}
+\gdef \@abspage@last{42}
diff --git a/Reports/Thesis/verslag.bcf b/Reports/Thesis/verslag.bcf
index f32af90..d5d38dd 100644
--- a/Reports/Thesis/verslag.bcf
+++ b/Reports/Thesis/verslag.bcf
@@ -2818,4 +2818,70 @@
article
report
-
\ No newline at end of file
+ author
+ title
+
+
+
+
+
+
+ ./references.bib
+
+
+ weron_electricity_2014
+ poggi_electricity_2023
+ lu_scenarios_2022
+ dumas_deep_2022
+ rasul_autoregressive_2021
+ dumas_deep_2022
+
+
+
+
+ presort
+
+
+ sortkey
+
+
+ sortname
+ author
+ editor
+ translator
+ sorttitle
+ title
+
+
+ sortyear
+ year
+
+
+ sorttitle
+ title
+
+
+ volume
+ 0
+
+
+
+
+
+
+
+
diff --git a/Reports/Thesis/verslag.log b/Reports/Thesis/verslag.log
index db1e21e..247a2f2 100644
--- a/Reports/Thesis/verslag.log
+++ b/Reports/Thesis/verslag.log
@@ -1,4 +1,4 @@
-This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.9.17) 8 MAY 2024 17:56
+This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2023.9.17) 9 MAY 2024 13:21
entering extended mode
restricted \write18 enabled.
file:line:error style messages enabled.
@@ -1211,7 +1211,7 @@ LaTeX Font Info: Font shape `T1/LinuxBiolinumT-TLF/m/n' will be
pdfTeX warning: pdflatex (file ./ea-en.pdf): PDF inclusion: found PDF version <1.7>, but at most version <1.5> allowed
-
+
File: ea-en.pdf Graphic file (type pdf)