This is the final step of the proposed methodology. In this step, the network files generated in previous step were used with two different optimization algorithms in order to obtain the optimum parameters value for surface machining process. These algorithms are Genetic Algorithm (GA) and Simulated Annealing (SA). Since two algorithms were used to get the optimum parameters, some information was given about these algorithms.
3.2.1 Optimization:
Optimization may be defined as the process of maximizing or minimizing a desired objective function while satisfying the prevailing constraints [10]. An optimization problem can be stated as follows:
Min F(x)
gj(x) ≤ 0, j = 1, 2, ..., m (1)
hi(x) = 0, i = 1, 2, ..., n (2)
x={x1, x2, ….., xp} (3)
It is to find the values of x={x1, x2, ….., xp} minimizing the function of F(x) while dealing with the constraints of gj (x) ≤ 0, j = 1, 2, ..., m and hi (x) = 0, i = 1, 2, ..., n. In Eq. 2.1, F (x) is an objective function. gj (x), hi (x) are inequality and equality constraints, respectively. x={x1, x2, ….., xp} is set of design parameters being optimum values of the optimization problem.
3.2.1.1 Simulated Annealing:
The Simulated Annealing optimization algorithm is inspired of the annealing process. It aims to find global optimum point simulating the annealing process. The explanations regarding Simulated Annealing below were taken from the book of Singiresu S. Rao. [22] “The simulated annealing is an optimization method based on annealing process. Annealing process is heating any material or metal up to annealing temperature then cooling slowly. This process is applied in order to soften the material, optimize the internal structure of the material and eliminate the internal stresses. The simulated annealing method simulates the process of slow cooling of molten metal to achieve the minimum function value in a minimization problem.” Details can be found in Engineering Optimization: Theory and Practice [22]. Modified versions of simulated annealing have been used successfully in different types of research areas by Kirkpatrick et al. (1983) [23], Wong et al. (1988) [24], Drexl (1988) [25] Wasserman and Schwartz (1988) [26], Telly et al. (1987) [27] and Carnevali et al. (1985) [28].
3.2.1.2 Genetic Algorithm:
The Genetic Algorithm, which is based on the Darwin’s Evolution Theory, was invented by John H. Holland. [29] However, until Goldberg, who is student of Holland, published a book regarding GA named Genetic Algorithms in Search, Optimization, and Machine Learning; it had not been a popular optimization method. [30] Because of the increasing competition in engineering and the contribution of the increasing computer technology the GA became more popular optimization. The advantages of the GA compared to the traditional optimization methods are as follow:

The GA uses a population of points for starting phase in place of single point. Thus, the possibility to be stuck into a local optimum is minimized.

In GA it is not necessary to have continuous objective function. It can be applied to the optimization problems having continuous or discrete variables.

In GA, better design vectors are tried to be obtained via the probabilistic GA operators. In each iteration, GA tries to find new design vectors having better fitness value. In spite of these operators work randomly, they use the information based on the fitness values.
As it mentioned above, GA is based on Evolution Theory. So it uses the principles of the Evolution Theory like Reproduction, Crossover and Mutation. The GA uses these principles as probabilistic tools in order to get better individuals the same as in the Evolution Theory. More information can be provided from the book of Rao [22].
3.2.2. Finding the Optimum Parameters Value for Surface machining with GA
There are several studies combining the ANN and GA in literature but any application to find out optimum cutting parameter has not been seen. For detailed information of the used methodology, study of Salajegheh et. al. [31] can be examined.
In this study, there are four parameters in the optimization of surface roughness belonged to the plain carbon fiber reinforced polymer. These parameters are feed rate, cutting speed, tip angle and flute number. The upper bounds and the lower bounds of these parameters were shown in Table 4.
Table 4
Upper and Lower Bounds for the Surface machining Parameters
Parameters  Upper Bound  Lower Bound 
Feed  0.4 mm/rev.  0.2 mm/rev. 
Cutting Speed  90 m/min.  50 m/min. 
Tip Angle  \({120}^{^\circ }\)  \({60}^{^\circ }\) 
Flute Number  4  2 
To find the optimum surface machining parameters GA and the network file generated for predicting the surface roughness value for plain material were used together. The network file was used as an objective function in GA and the surface machining parameters yielding the minimum surface roughness value were found.
3.2.3. Finding the Optimum Parameters Value for Surface machining with SA
There are lots of applications of SA in optimization studies or of ANN in modeling in literature but only very few studies combining SA and ANN are found. For detailed information, the study combining ANN and SA [32] can be viewed.
The parameters used in the optimization with SA are same as the parameters used in the optimization with GA. So the parameters and their upper and lower bounds can be seen in Table 4. The network file generated for predicting the surface roughness value for plain material and SA were used together in order to find the optimum surface machining parameters. The network file was used as an objective function in SA as it used in GA and the surface machining parameters yielding the minimum surface roughness value were found.