Machine learning methods to facilitate optimal water allocation and management in irrigated river basins to comply with water law