Electricity transformer is an important, widely used electrical equipment. Current the iron beam sectional of the electricity transformer is based on experienced standards which can not achieve the best economic benefits. According to practical technology, we build a basic optimization model about multistep iron beam section. And we also give a reasonable design on the tolerance zone between the diameter of iron beam sectional circumcircle and the diameter of the winding steel-flue, as well as the arrangement about the oil path in the iron beam, which has a big realistic significance and application value. We come up with five reasonable model assumptions to simplified the problem, turning the tolerance zone design problem into the function extreme one. We adopt "Ideal assumption first, specific modification second" method on designing the oil path, considering all kinds of situations to obtain optimization. The core algorithm is dynamic programming which is much faster, much more stable than using Lingo. All the solving and analyzing on math models are based on C++ programming language.