The fuel consumption minimization of a pipeline system including boosting units has been investigated in this paper. Virial equation of state has been used to study steady state non-isothermal flow of natural gas. Due to the complexity of mentioned equations and requirement time to study the different operating states, intelligent systems including Artificial Neural Network (ANN), Adaptive Neuro-Fuzzy inference System (ANFIS), and Fuzzy Inference System (FIS) are applied to predict and optimize the pipeline system. As a case study, IGAT 5 pipeline with four compressor stations is chosen to be explored which transports the natural gas from Asalouyeh (South Pars Energy Zone-IRAN) for oil well injection purposes. The results have shown that ANN is slightly more accurate than the other two predictive methods. Therefore ANN results are introduced to Genetic Algorithm (GA) to determine the optimum speed of each compressor and their compression ratio.