## 2 Materials and Methods
Hierarchical divisive (decomposing and dividing) algorithms operate on the 'top-down' principle. Initially, a single complex cluster is created containing all observations. Then, in individual steps, existing clusters are divided based on the principle of mutual dissimilarity between clusters or between clusters and observations [21]. In non-hierarchical clustering methods, objects are classified into disjoint clusters, the number of which is predefined. Non-hierarchical methods focus on discovering the groupings present in the data by optimizing the objective function and iteratively improving the quality of assigning objects to individual clusters. These clustering methods can be divided into [18,22] the following:  
* hard clustering methods--each object belongs to a cluster or not;
* fuzzy clustering--each object belongs to each cluster to a certain degree. There are several procedures used when applying cluster analysis. The choice of using a suitable procedure depends mainly on the given task. Individual procedures differ from each other in the association coefficients used (Sokalov-Michenerov, Russelov-Rarov, Jaccardov, etc.) and in the method based on which the segmentation process is performed. Among the most used algorithmic methods are [22] Rank Order Clustering Algorithm, Direct Clustering Algorithm, Single Linkage Clustering Algorithm, Average Linkage Clustering Algorithm, and Production Flow Analysis. Figure 1: Method of cluster analysis. The agglomerative methods are used in the article. The result of using hierarchical clustering methods is a dendrogram that represents the nested grouping of objects and the similarity measures where the groupings change. Dendrogram is a special type of tree that represents the agglomerative clustering method. Clustered objects are represented by the leaf nodes of the tree. Connecting the two nearest objects on the respective clustering level creates intermediate nodes. The result of the clustering algorithm is influenced by the specific choice of the distance (proximity measure) and the specific choice of the clustering algorithm. The output of the algorithm is the assignment of individual observations to a certain number of disjoint clusters [8]. The procedure of agglomerative hierarchical clustering is implemented in these steps [22]:  
1. The distance matrix \(E_{1}\) is compiled from the input data matrix \(E_{0}\) according to the squared Euclidean distance \(d_{ES}\). 2. The smallest distance is searched in the distance matrix \(E_{1}\), which generates the first cluster. 3. All remaining objects are then connected to the first cluster, and a new distance matrix \(E_{2}\) is recalculated. This distance matrix is calculated using individual cluster analysis methods. Any missing values in matrix \(E_{2}\) are filled from the input distance matrix \(E_{1}\). 4. The smallest distance is once again selected from matrix \(E_{2}\), generating the second cluster. The remaining objects or clusters are then connected to it, and a new distance matrix \(E_{3}\) is recalculated. 5. Once again, the smallest distance is selected from distance matrix \(E_{3}\), representing another cluster. 6. This procedure is repeated until all objects or clusters have been assigned. 7. The output of hierarchical cluster analysis method is a dendrogram. The model of the cluster analysis procedure is depicted in Figure 2.  
The scheme of the application process of cluster analysis in the modeling of in-house production processes is shown in a simplified form in Figure 3. The compiled design of the methodology for the application of hierarchical methods of cluster analysis in the supply process in the form of an algorithm can be implemented for inventory management regardless of the warehouse type (input, output, or intermediate warehouses) and the type of production activity of the company. Figure 2: Model of cluster analysis.