# Cellular Automata Approach to Topology Optimization of Graded Multi-Material Structures
## 4 Cellular Automata Approach
This means, that for the cells, for which the algorithm is sure, that material should be removed, i.e., cells with low compliances, \(n<N_{1}\), or added, i.e., cells with high compliances, \(n<N_{2}\), the change of design variable value can be assigned as the admissible limit value. For intermediate interval \(N_{1}\leq n\leq N_{2}\) a monotonically increasing function \(f(n)\) representing elements compliances has to be specified, see Equation (13):  
\[F(n)= \begin{cases}\begin{array}{cc}-C&\text{if}\ \ n<N_{1}\\ f(n)&\text{if}\ \ N_{1}\leq n\leq N_{2}\\ C&\text{if}\ \ n>N_{2}\end{array}.\end{cases}  \tag{13}\]  
Under the assumption that the update is based on the states of the neighboring cells, the rule takes the following final form:  
\[d_{n}^{new}=d_{n}+\left[F(n)+\sum_{k=1}^{M}F(k)\right]\frac{m}{M+1}. \tag{14}\]  
In Equation (14) the quantity \(m\) plays the role of admissible change (move limit) of the design variable values and \(F(k)\) is the analogously constructed function for the \(M\) neighboring cells. Depending on the result of selection controlled by Equation (13) material is added to or removed from the cell \(n\). The threshold values \(N_{1}\) and \(N_{2}\) can be adjusted so that the width of the interval [\(N_{1}\), \(N_{2}\)] can be modified during the iteration process. The numerical experiments confirmed that it starts with a relatively wide initial interval [\(N_{1}\), \(N_{2}\)] and then its successive reduction leads to the fast elimination of cells of intermediate densities. The large design domain at the beginning allows for a preliminary outline of the structure layout by eliminating void cells. Then, along with the iteration process, the solution is tuned by subsequent reduction of the [\(N_{1}\), \(N_{2}\)] interval, which manifests by the elimination of so-called gray cells of intermediate densities. Finally, it leads to a distinct solid/void structure. This resembles the well-known simulated annealing strategy. The described approach results in modifying the shape of the \(F(n)\) function, which is illustrated in Figure 1a. One can find a detailed discussion regarding the implemented strategy in the paper [52]. Based on those investigations, the following strategy for the proposed update rule implementation can be proposed. The calculations start with \(N_{1}=N\)-0.1, and then from iteration 25 \(N_{1}=N\)-0.5, while \(N_{2}=N\)-0.9 is kept for all iterations. As to the above-introduced function \(f(n)\), the one defined by Equation (15) is proposed:  
\[f(n)=C\frac{\tanh\left[\beta\left(\frac{n-N_{1}}{N_{2}-N_{1}}-\frac{1}{2} \right)\right]}{\tanh\left(\frac{1}{2}\beta\right)}. \tag{15}\]  
The parameter \(\beta\) determines the form of the \(f(n)\) function. In what follows, \(\beta\) tending to zero \(f(n)\) tends to have linear functions, whereas large values of \(\beta f(n)\) tend to have a step function, see Figure 1b. The flexibility of update rules, induced by adjusting the value of \(\beta\), influences algorithm performance; therefore, in order to control the effectiveness of this process, implementation of the self-adaptive technique is proposed. The design variables are updated at each iteration step using three values of \(\beta\), i.e., a small, middle, and large one, and then the algorithm proceeds to the next iteration with the solution for which the compliance has been found as the smallest one. Based on the test performed, it can be recommended to choose: \(\beta=0.1\), \(\beta=4\) and \(\beta=8\). This scheme of updating guarantees tracking the lowest value of an objective function in each iteration, without the necessity of adjusting the control parameters of the algorithm.