## 6 Optimization Model
### Simulated Annealing Method  
To explain the SA method, the term \"temperature\" is used, together with Boltzmann criterion, and it represents the \"mathematical temperature\" of the optimization system [30]. Boltzmann distribution means that the energy of the system E, for thermal balance at temperature T distributed using following equation:  
\[\mathrm{P}(\mathrm{E})=\mathrm{e}^{(-\frac{\mathrm{E}}{\mathrm{E}})} \tag{8}\]  
where: P(E) probability of reaching energy level E, k Boltzmann constant.  
It can be noticed that, at higher temperatures, the system has almost the same possibility to reach any energy level, but at lower temperatures, the system has the small possibility of reaching height energy level (8). Table 5 shows an analogy between real physics annealing and the SA method for optimization.  
Based on the Metropolis criterion [30], the possibility of acceptant of next point (state) \(\mathrm{x}_{i+1}\) depends on the difference in energy levels or values of the cost function of two points:  
\[\mathrm{\Delta E}=\mathrm{E}_{i+1}-\mathrm{E}_{i}=\mathrm{\Delta f}=\mathrm{f} _{i+1}-\mathrm{f}_{i}\equiv\mathrm{f}(\mathrm{x}_{i+1})-\mathrm{f}(\mathrm{x} _{i}) \tag{9}\]  
New energy state or now potential solution \(\mathrm{x}_{i+1}\) can be calculated using Boltzmann distribution:  
\[\mathrm{P}[\mathrm{E}_{i+1}]=\mathrm{min}\left\{\begin{array}{ll}\mathrm{e} ^{(-\frac{\mathrm{\Delta E}}{\mathrm{E}})},&\mathrm{\Delta E}>0\\ 1,&\mathrm{\Delta E}\leq 0\end{array}\right. \tag{10}\]  
Boltzmann constant is used as a scaling factor in the SA method, and usually, it has a value of k = 1. In the case that \(\mathrm{\Delta E}\leq 0\), Equation (10) gives P\([\mathrm{E}_{i+1}]=1\) and point \(\mathrm{x}_{i+1}\) are always accepted. This is a logical choice in the content of cost function minimization, because its value \(\mathrm{f}_{i+1}=\mathrm{f}(\mathrm{x}_{i+1})\) is better (smaller) than \(\mathrm{f}_{i}=\mathrm{f}(\mathrm{x}_{i})\). In the case that \(\mathrm{\Delta E}>0\) value of equation \(\mathrm{f}_{i+1}=\mathrm{f}(\mathrm{x}_{i+1})\) is worse (bigger) than \(\mathrm{f}_{i}=\mathrm{f}(\mathrm{x}_{i})\).  
Conventional optimization methods will not accept the point \(\mathrm{x}_{i+1}\) as the next point of the iteration. The possibility of accepting of point \(\mathrm{x}_{i+1}\), despite the fact that it gives poorer value of cost function in comparison to point \(\mathrm{x}_{i}\), is final (no matter how small it may be) in the case that Metropolis criterion is used.  
It is important to notice that the possibility of accepting the point \(\mathrm{x}_{i+1}\), defined using Equation (10), is not the same, and it depends on the values of \(\mathrm{\Delta E}\) and T. If the temperature T is high, the possibility of accepting the point \(\mathrm{x}_{i+1}\), with a high value of cost function \(\mathrm{\Delta E}=\mathrm{\Delta f}\), will also be high. Because of this, in the case of high temperatures, because of  
\begin{table}
\begin{tabular}{c c} \hline
**Real Physical Process of Annealing** & **SA Method for Optimization** \\ \hline System status & Possible solutions (feasibility domain) \\ \hline Energy & Cost function \\ \hline Change of the state & Adjacent solution \\ \hline Temperature & Control parameter \\ \hline End temperature & Optimal solution \\ \hline \end{tabular}
\end{table}
Table 5: Analogy between real physics annealing and SA method for optimization.  
a high possibility, poorer solutions can be accepted. In the case when temperature is low, possibility of acceptance of solution x\({}_{i+1}\) is also small. It can be concluded that whit the fall of temperature (closing to the optimal solution), the possibility of acceptance of point x\({}_{i+1}\), with bigger values than point x\({}_{i}\), is smaller.