Compare commits

..

No commits in common. "06b9500efc0099904ba3701d303496b1251e384d" and "df98bff2857a126a230aef7baa135f10d9b2b31d" have entirely different histories.

View file

@ -114,42 +114,7 @@ we store each item in the next bin if it fits, otherwise we open a new bin.
will be of random sizes between $ 0 $ and $ 1 $. We will run X simulations % TODO will be of random sizes between $ 0 $ and $ 1 $. We will run X simulations % TODO
with 10 packets. with 10 packets.
\subsection{Variables used in models} \subsubsection{Variables used in models}
We use the following variables in our algorithms and models :
\begin{itemize}
\item $ U_n $ : the size of the $ n $-th item. $ (U_n)_{n \in \mathbb{N}} $
denotes the mathematical sequence of random variables of uniform
distribution on $ [0, 1] $ representing the items' sizes.
\item $ T_i $ : the number of items in the $ i $-th bin.
\item $ V_i $ : the size of the first item in the $ i $-th bin.
\item $ H_n $ : the number of bins required to store $ n $ items.
\end{itemize}
Mathematically, the NFBP algorithm imposes the following constraint on the first box :
\begin{align*}
T_1 = k \iff & U_1 + U_2 + \ldots + U_{k-1} < 1 \\
\text{ and } & U_1 + U_2 + \ldots + U_{k} \geq 1 \qquad \text{ with } k \geq 2
\end{align*}
\subsection{Implementation and results}
We implemented the NFBP algorithm in Python \footnotemark, for its ease of use
and broad recommendation. We used the \texttt{random} library to generate
random numbers between $ 0 $ and $ 1 $ and \texttt{matplotlib} to plot the
results.
\footnotetext{The code is available in Annex \ref{annex:probabilistic}}
@ -158,8 +123,6 @@ results.
\section{Next Fit Dual Bin Packing algorithm} \section{Next Fit Dual Bin Packing algorithm}
The variables used are the same as for NFBP.
\subsection{La giga demo} \subsection{La giga demo}
Let $ k \in \mathbb{N} $. Let $ (U_n)_{n \in \mathbb{N}} $ be a sequence of Let $ k \in \mathbb{N} $. Let $ (U_n)_{n \in \mathbb{N}} $ be a sequence of
@ -262,10 +225,8 @@ $ f_{U_{k-1}}(y) = 1 $.
\section{Complexity and implementation optimization} \section{Complexity and implementation optimization}
Both the NFBP and NFDBP algorithms have a linear complexity $ O(n) $, as we The NFBP algorithm has a linear complexity $ O(n) $, as we only need to iterate
only need to iterate over the items once. While the algorithms themselves are over the items once.
linear, calculating the statistics may not not be. In this section, we will
discuss how to optimize the implementation of the statistical analysis.
\subsection{Performance optimization} \subsection{Performance optimization}