Based on fish swarm algorithms, improved fish swarm algorithms regarding self-adaptive and changing-step are used in optimization of electromagnetic relay, which takes the size as target function. Also the optimization simulation includes the damping spring, which takes the fatigue safety coefficients, mass and natural frequency as target function. The simulations show that the size of the relay is reduced by 36.41% and 44.51% respectively under fish swarm algorithms and the improved algorithms, and reliability and safety are guaranteed. As for the spring, the diameter, middle diameter and wor...