This folder contains the codes for optimizing the thicknesses for each configuration. The commented codes for the first case chosen for the threshold of 25% of the mean value are shown. The other codes are exactly the same, but inside the value of 50% has been changed and then imposing the minimum value of the stress as the threshold (case where no real limit is to be imposed - case 2 in the thesis). These codes also have 3D database formation for thickness, stress, EA, SEA, VEA (post-optimization). Saving is automised, so the address of a personal folder has been given, which must be changed in the new use.