def __init__(self, Farm, water_sources, storages, irrigations, crops): """ :param Farm: Farm Object representing the Farm to manage """ #Call parent constructor FarmManager.__init__(self, Farm, water_sources, storages, irrigations, crops) #Python 3 version of the above #super().__init__(Farm, water_sources, irrigations, crops) self.crop_rotation_counter = {}
#irrig_crops = [CropInfo(**FarmConfig.crop_params['Irrigated Processing Tomato'].getParams())] irrig_crops = [CropInfo(**FarmConfig.crop_params['Irrigated Winter Barley'].getParams()), \ CropInfo(**FarmConfig.crop_params['Irrigated Winter Wheat'].getParams()), \ CropInfo(**FarmConfig.crop_params['Irrigated Winter Canola'].getParams())] dryland_crops = [CropInfo(**FarmConfig.crop_params['Dryland Winter Barley'].getParams()), \ CropInfo(**FarmConfig.crop_params['Dryland Winter Wheat'].getParams()), \ CropInfo(**FarmConfig.crop_params['Dryland Winter Canola'].getParams())] crops = irrig_crops + dryland_crops FileHandler = FileHandler() LpInterface = LpInterface() Finance = FarmFinance() Manager = FarmManager(TestFarm, water_sources, storages, irrigations, crops, LpInterface, Finance) Manager.base_irrigation_efficiency = FarmConfig.Gravity.getCopy().irrigation_efficiency Manager.crop_rotations = { 'irrigated': irrig_crops[:], 'dryland': dryland_crops[:] } #Some useful data values may be found in the below #See Table 2, Echuca: #http://www.g-mwater.com.au/downloads/gmw/Groundwater/Lower_Campaspe_Valley_WSPA/30_Sept_2015-LOWER_CAMPASPE_VALLEY_WSPA_ANNUAL_REPORT_-_2014_15_-_SIGNED.pdf Manager.Farm.storages = {'Farm Dam': FarmDam(**FarmConfig.FarmDam_params.getParams())} FarmDam = FarmDam(**FarmConfig.FarmDam_params.getParams())
CropInfo(**FarmConfig.crop_params["Irrigated Winter Wheat"].getParams()), CropInfo(**FarmConfig.crop_params["Irrigated Winter Canola"].getParams()), ] dryland_crops = [ CropInfo(**FarmConfig.crop_params["Dryland Winter Barley"].getParams()), CropInfo(**FarmConfig.crop_params["Dryland Winter Wheat"].getParams()), CropInfo(**FarmConfig.crop_params["Dryland Winter Canola"].getParams()), ] crops = irrig_crops + dryland_crops FileHandler = FileHandler() LpInterface = LpInterface() Finance = FarmFinance() Manager = FarmManager(TestFarm, water_sources, storages, irrigations, crops, LpInterface, Finance) Manager.base_irrigation_efficiency = FarmConfig.Gravity.getCopy().irrigation_efficiency Manager.crop_rotations = {"irrigated": irrig_crops[:], "dryland": dryland_crops[:]} # Some useful data values may be found in the below # See Table 2, Echuca: # http://www.g-mwater.com.au/downloads/gmw/Groundwater/Lower_Campaspe_Valley_WSPA/30_Sept_2015-LOWER_CAMPASPE_VALLEY_WSPA_ANNUAL_REPORT_-_2014_15_-_SIGNED.pdf Manager.Farm.storages = {"Farm Dam": FarmDam(**FarmConfig.FarmDam_params.getParams())} FarmDam = FarmDam(**FarmConfig.FarmDam_params.getParams()) fields = [ FarmField( name="Field A",