A Mathematical Model to Optimize the Operation of a Gas Distribution Network