Development of a zero-dimensional numerical model for optimization and diagnostic of gas systems