The optimization design of underground engineering space distribution is the key of stability anal-ysis in a large-scale underground engineering. Nowadays, there are two main bottlenecks to restrict its de-velopment. One is the problem of model establishing and the other is the implementation of the optimiza-tion method. Taking the general-purpose finite element software ABAQUS as a platform, its standard design language Python is used to make secondary development for the pre-processing and post-processing. The moving boundary nonlinear relationship of parametric model is made into the program to realize the fem-based parametric design. Using MATLAB language for programming,a combined optimization was estab-lished on the basis of Nelder-Mead algorithm and exact penalty function method, and further combining the optimum analysis program with finite element parametric design, the intelligent and continuous optimiza-tion method in underground engineering has been realized. The engineering application involved in this pa-per will be given in Part Ⅱ of this paper series.