The use of automatic optimization procedures for designing electromagnetic devices is becoming more and more common. Many of these problems are described by nonlinear relationships, which introduce the possibility of multiple local minima. Artificial immune systems are learning and optimization methods that can be applied to the solution of many different types of optimization problems in electromagnetics. In this paper, the shape design of Loney's solenoid benchmark problem is carried out by an optimization method (opt-aiNet) inspired by an artificial immune network which is combined with a local search (Nelder-Mead simplex search method). Comparisons between the results obtained by opt-aiNet and opt-aiNet with local search are reported and commented.