The problem of distributing gas through a network of pipelines is formulated as a cost minimization subject to nonlinear flow-pressure relations, material balances, and pressure bounds. The solution method is based on piecewise linear approximations of the nonlinear flow-pressure relations. The approximated problem is solved by an extension of the Simplex method. The solution method is tested on real-world data and compared with alternative solution methods.