# Development of Optimal Size Range of Modules for Driving of Automatic Sliding Doors
## 2 Solving the Problem
### Stage 6. Selection of a Mathematical Method  
The formulated problem is characterized by a large number of possible size ranges that must be analyzed. This number is determined by the dependence \(\sum_{k=1}^{\overline{L}-1}C_{\overline{L}-1}^{k}=2^{\overline{L}-1}-1\), where \(k\) is the number of elements in the range formed by elements of the initial size range with \(\overline{L}\) elements [8].  
For the considered problem, \(\overline{L}=110\). Therefore, the number of alternative size ranges is \(2^{109}-1=6.4903711\times 10^{32}-1\). The time involved to solve the problem with 7 elements in the size range is about 137 min (Intel Core i7-4710 HQ CPU, 2.50 GHz, 8 GB RAM). A conservative (polynomial) estimation of the calculation time for \(\overline{L}=110\) is about 339 years. The time involved makes it impossible to solve the problem by full combination and necessitates the use of a method for directed search for the optimal solution.  
One of the effective methods for solving the formulated problem is the dynamic programming method [32], which will be applied in this paper. The main advantage of the method is its good adaptability for solving discrete optimization problems, as its application does not depend on the type of objective function.  
According to the chosen method, the following recurrent dependencies for determining the total costs have been derived: for \(l=1\), \(m=l\div\overline{L}\),  
\[R_{m}^{1}=G\left(\overline{x}_{m},\sum\limits_{p=1}^{m}\overline{N}^{p}\right)= TS(\overline{x}_{m})\cdot\sum\limits_{p=1}^{m}\overline{N}^{p}\cdot\left(\frac{N_{ TS}}{\sum\limits_{p=1}^{m}\overline{N}^{p}}\right)^{v_{1}}+\sum\limits_{p=1}^{m} DR\left(\overline{x}_{m},\overline{x}_{p},\sum\limits_{p=1}^{m} \overline{N}^{p}\right) \tag{10}\]  
\[\text{for }l=2\div\overline{L},\,m=l\div\overline{L},\frac{\sim}{\overline{m}}= \left(l-1\right)\div\left(m-1\right),\]  
\[R_{m}^{l}=\min\left\{R_{\overline{m}}^{l-1}+G\left(\overline{x}_{m},\sum \limits_{p=\overline{m}+1}^{m}\overline{N}^{p}\right)\right\}\]  
\[=R_{\overline{m}}^{l-1}+TS(\overline{x}_{m})\cdot\sum\limits_{p=\overline{m}+1 }^{m}\overline{N}^{p}\cdot\left(\frac{N_{TS}}{\sum\limits_{p=\overline{m}+1}^ {m}\overline{N}^{p}}\right)^{v_{1}}+\sum\limits_{p=\overline{m}+1}^{m}DR \left(\overline{x}_{m},\overline{x}_{p},\sum\limits_{p=\overline{m}+1}^{m} \overline{N}^{p}\right) \tag{11}\]  
where \(R_{m}^{l}\) is the minimum (optimal) value of the objective function to satisfy the demand for products with values of the main parameter in the interval \((0,\overline{x}_{m}]\), \(m=1\div\overline{L}\), with \(l\) number of sizes; \(\overline{L}\)--the number of permissible values of the main parameter of the product; \(\overline{N}^{p}\)--the demand for products with values of the main parameter in the range \(\left(\overline{x}_{p-1},\,\overline{x}_{p}\right]\).  
Since the objective function is a discrete convex function and has a global minimum, the calculation of \(R_{m}^{l},l=1\div\overline{L}\), continues until the following condition is met:  
\[R_{\overline{L}}^{l}\leq R_{\overline{L}}^{l+1} \tag{12}\]