This paper presents a reasonable mathematical model for optimal design of gas transmission pipeline through analyzing the relation between the optimal parameter of pipeline and the combined cost in pipeline construction. End line packing of gas pipeline is used in the article to solve the model. Based on the techno-logical economy,terminal cost is considered economic indicator of pipeline and develop a model. Example presented at the end is to demonstrate the rationality of the model.