Optimizing Soil Moisture and Irrigation Management