Modeling and Optimal Operation of Hydraulic