Optimizing the Use of Solar, Wind and Hydroelectric Power