\sectionnn{Introduction} Bin packing is the process of packing a set of items of different sizes into containers of a fixed capacity in a way that minimizes the number of containers used. This has applications in many fields, such as logistics, where we want to optimize the storage and transport of items in boxes, containers, trucks, etc. Building mathematical models for bin packing is useful in understanding the problem and in designing better algorithms, depending on the use case. An algorithm optimized for packing cubes into boxes will not perform as well as another algorithm for packing long items into trucks. Studying the mathematics behind algorithms provides us with a better understanding of what works best. When operating at scale, every small detail can have a huge impact on overall efficiency and cost. Therefore, carefully developing algorithms based on solid mathematical models is crucial. As we have seen in our Automatics class, a small logic breach can be an issue in the long run in systems that are supposed to run autonomously. This situation can be avoided by using mathematical models during the design process wich will lead to better choices welding economic and relibility concerns. We will conduct a probabilistic analysis of multiple algorithms and compare results to theoretical values. We will also consider the algoriths complexity and performance, both in resource consumption and in box usage. \clearpage \section{Bin packing use cases} Before studying the mathematics behind bin packing algorithms, we will have a look at the motivations behind this project. Bin packing has applications in many fields and allows to automize and optimize complex systems. We will illustrate with examples focusing on two use cases: logistics and computer science. We will consider examples of multiple dimensions to show the versatility of bin packing algorithms. \paragraph{} In the modern day, an effective supply chain relies on an automated production thanks to sensors and actuators installed along conveyor belts. It is often required to implement a packing procedure. All of this is controlled by a computer system running continuously. \subsection{3D : Containers} Storing items in containers can be a prime application of bin packing. These tree-dimensional objects of standardized size are used to transport goods. While the dimensions of the containers are predictable, those of the transported items are not. Storage is furthermore complicated by the fact that there can be a void between items, allowing to move around. Multiple types of items can also be stored in the same container. There are many ways to optimize the storage of items in containers. For example, by ensuring items are of an optimal standardized size or by storing a specific item in each container, both eliminating the randomness in item size. In these settings, it is easy to fill a container by assimilating them to rectangular blocks. However, when items come in pseudo-random dimensions, it is intuitive to start filling the container with larger items and then filling the remaining gaps with smaller items. As containers must be closed, in the event of an overflow, the remaining items must be stored in another container. \subsection{2D : Cutting stock problem} In industries such as woodworking bin packing algorithms are utilized to minimize material waste when cutting large planks into smaller pieces of desired sizes. Many tools use this two-dimensional cut process. For example, at the Fabric'INSA Fablab, the milling machine, laser cutter and many more are used to cut large planks of wood into smaller pieces for student projects. In this scenario, we try to organize the desired cuts in a way that minimizes the unusable excess wood. \begin{figure}[ht] \centering \includegraphics[width=0.65\linewidth]{graphics/fraiseuse.jpg} \caption[]{Milling machine at the Fabric'INSA Fablab \footnotemark} \label{fig:fraiseuse} \end{figure} \footnotetext{Photo courtesy of Inés Bafaluy} Managing the placement of items of complex shapes can be optimized by using by various algorithms minimizing the waste of material. \subsection{1D : Networking} on which humans have decreasing control. In this paper, we will focus on one-dimensional bin packing, where we try to store items of different heights in a linear container. \section{Next Fit Bin Packing algorithm} \cite{hofri:1987} % TODO mettre de l'Histoire \section{Next Fit Dual Bin Packing algorithm} \section{Algorithm comparisons and optimization} \subsection{NFBP vs NFDBP} \subsection{Optimal algorithm} \cite{bin-packing-approximation:2022} \sectionnn{Conclusion}