In the period of shortage of gas supply, special attention is given to reducing the supply of gas to its consumers, that is, their complete and uninterrupted gas supply. Increasing gas losses associated with technological transportation costs, in particular caused by gas flow instability and frequent changes in gas transmission network operating modes. Considering losses due to unreliability of gas pumping is one of the important tasks of gas supply optimization. The purpose of the study is to develop an optimization mathematical model that will simultaneously take into account the factors of reliability and minimum lossesIn the general case, the optimization calculations of the modes of operation of the main gas pipelines are intended to solve three main problems: determining the maximum productivity, calculating the optimal mode with a given productivity and choosing the optimal strategy, the development of the pipeline. On the basis of approaches of simulation modeling of complex systems, a multi-parameter mathematical model of gas supply process optimization was developed. It is shown that a comparative analysis of the forecast and actual indicators of the operating modes of the plunger gas pumping unit shows their satisfactory convergence. The performance of the compressor operation period in the process of injection according to the forecast deviates from the actual value for the whole period of operation of the plunger gas pumping unit in 2016 by 2.98%. The optimization problem of gas pumping planning is considered, taking into account the expected losses, on the basis of which the transfer of the controlled system from the initial state to the final one is carried out by such a sequence of states that minimizes the total cost of the system evolution.