# Optimization of Mass Concrete Construction Using a Twofold Parallel Genetic Algorithm
## 3 Optimization Problem of the Construction Phase of a Massive Concrete Structure Using a GA
### Penalty Function  
Penalty functions are generally used to prevent the appearance of non-feasible solutions in constrained optimization problems. The choice of the appropriate penalty is extremely important to obtain good results. It is known that a very aggressive penalty can lead to loss of good genetic material, while a very soft penalty can perpetuate poor schemes that do not introduce relevant information to the evolutionary process.  
In this work, it is considered that a solution is not feasible if the structure cracks. Aiming to properly characterize cracking of a structure, it is worthy to characterize cracking at a given point. It should be stressed that, at the early ages of a structure, a given point may have cracks opened and closed for different times. Therefore, within the framework of the present analysis, for the sake of simplicity, a point is considered as cracked if, for at least one time step, the point experiences cracking.  
In this way it is worthy to introduce the variable \(LCr(x,y,z)\), which is defined as: \(LCr(x,y,z)=0\) if \(I_{c}(x,y,z,t)<1\) for all the time steps of the analysis and \(LCr(x,y,z)=1\) if \(I_{c}(x,y,z,t)\geq 1\) for at least one time step of the analysis. Therefore, it can be written that \(LCr(x,y,z)\in\{0,1\}\).  
In the present paper the FE model uses linear tetrahedrals with one integration point. Therefore the variable \(LCr\) can represent cracking of a given finite element, i.e., \(LCr_{iel}=LCr(x,y,z)\). It is now possible to introduce a variable that stands for the global (macroscopic) cracking tendency of the structure (\(Ecr\)) that is equal to the sum of the volumes of the cracked finite elements (i.e., the elements that have \(LCr_{iel}=1\)) divided by the sum of the volumes of all elements. Considering that the cracking of an individual structure is a function of the set of design variables (\(\mathbf{X}\)) that characterize this individual, the following equation can be drawn:  
\[E_{Cr}(\mathbf{X})=\frac{\sum\limits_{iel=1}^{numel}V_{iel}LCr_{iel}}{\sum \limits_{iel=1}^{numel}V_{iel}};\quad E_{Cr}(\mathbf{X})\in[0,1] \tag{11}\]  
where \(numel\) is the total number of finite elements, and \(V_{iel}\) is the volume of a given finite element.  
The penalty scheme combines a dynamic penalty for the early generations and a static penalty for the late generations. This scheme allows for a greater diversity within the first generations (the half of the evolutive process) accepting the survival of individuals with a small extent of cracking. For the late generations only uncracked individuals are allowed to survive, a condition that is established by the penalty scheme proposed.  
The dynamic penalty is defined as follows.  
Let \((E_{Cr_{lim0}})\) be an initial extent of cracking that determines the limit of cracking in the initial population; let \(E_{Cr_{lim}}(t_{g})\) be the function that evaluates the cracking limit according to the current generation \(t_{g}\); and let \(N_{g}\) be the number of generations. The extent of cracking can be written, for each generation, as:  
\[E_{Cr_{lim}}(t_{g})=\left\{\begin{array}{ll}E_{Cr_{lim0}}-t_{g}\left(\frac{ E_{Cr_{lim0}}}{\frac{N_{g}}{2}}\right),&\mbox{if }0\leq t_{g}\leq\frac{N_{g}}{2}\\ \\ 0,&\mbox{if }\frac{N_{g}}{2}<t_{g}\leq N_{g}\end{array}\right. \tag{12}\]  
The penalty function can then be written:  
\[P(\mathbf{X},t_{g})=\left\{\begin{array}{ll}(1-f_{min}),&\mbox{if }E_{Cr}( \mathbf{X})\geq E_{Cr_{lim}}(t_{g})\\ \\ (1-f_{min})\left(\frac{E_{Cr}(\mathbf{X})}{E_{Cr_{lim}}(t_{g})}\right),&\mbox{ if }E_{Cr}(\mathbf{X})<E_{Cr_{lim}}(t_{g})\end{array}\right. \tag{13}\]  
Some characteristic values of the fitness function that help to understand the organization of the penalty scheme are given in the Equation (14).  
\[F(\mathbf{X},t_{g})=\left\{\begin{array}{ll}f_{min},&\text{if $f=f_{min}$ and $E_{Cr}=0$}\\ \\ 1,&\text{if $f=f_{min}$ and $E_{Cr}>E_{Cr_{lim}}(t_{g})$}\\ \\ 1,&\text{if $f=1$ and $E_{Cr}=0$}\\ \\ 2-f_{min},&\text{if $f=1$ and $E_{Cr}>E_{Cr_{lim}}(t_{g})$}\\ \end{array}\right. \tag{14}\]