A Model for the Optimal Operation of a Single Reservoir for Use of Irrigation