  An increasing amount of gas-fired power plants are currently being installed
in modern power grids worldwide. This is due to their low cost and the inherent
flexibility offered to the electrical network, particularly in the face of
increasing renewable generation. However, the integration and operation of gas
generators poses additional challenges to gas network operators, mainly because
they can induce rapid changes in the demand. This paper presents an efficient
minimization scheme of gas compression costs under dynamic conditions where
deliveries to customers are described by time-dependent mass flows. The
optimization scheme is comprised of a set of transient nonlinear partial
differential equations that model the isothermal gas flow in pipes, an adjoint
problem for efficient calculation of the objective gradients and constraint
Jacobians, and state-of-the-art optimal control methods for solving nonlinear
programs. As the evaluation of constraint Jacobians can become computationally
costly as the number of constraints increases, efficient constraint lumping
schemes are proposed and investigated with respect to accuracy and performance.
The resulting optimal control problems are solved using both interior-point and
sequential quadratic programming methods. The proposed optimization framework
is validated through several benchmark cases of increasing complexity.
