def pickle_wsu(): #create all components in network for the wsu campus slack_gt = setup_electric_gen(name='slack_bus_1') GT1 = setup_electric_gen(name='GT1') GT2 = setup_electric_gen(name='GT2') gas_util = setup_gas_utility() components = [slack_gt, GT1, GT2, gas_util] optimoptions = { 'interval': 1, 'horizon': 1, 'resoluion': 1, 'excess_heat': True, 'mixed_integer': False, 'excess_cool': True } campus_network = load_network( components) #load_network_one_node(components)# plant = Plant({ 'name': 'demo_7_9', 'generator': components, 'optimoptions': optimoptions, 'network': campus_network }) gen_file_name = os.path.join('library', 'demo_7_9.pickle') with open(gen_file_name, 'wb') as write_file: pickle.dump(plant, write_file, pickle.HIGHEST_PROTOCOL)
def pickle_wsu(): #create all components in network for the wsu campus elec_utility = setup_elec_utility() gt1 = setup_mgt() gt2 = setup_mgt(n_gt=2) carrier_chiller1 = setup_chiller('Carrier Chiller1') york_chiller1 = setup_chiller('York Chiller1') york_chiller3 = setup_chiller('York Chiller3') carrier_chiller7 = setup_chiller('Carrier Chiller7') carrier_chiller8 = setup_chiller('Carrier Chiller8') carrier_chiller2 = setup_chiller('Carrier Chiller2') carrier_chiller3 = setup_chiller('Carrier Chiller3') carrier_chiller4 = setup_chiller('Carrier Chiller4') trane_chiller = setup_chiller('Trane Chiller') boiler1 = setup_boiler(1) boiler2 = setup_boiler(2) boiler3 = setup_boiler(3) boiler4 = setup_boiler(4) boiler5 = setup_boiler(5) gen_3 = setup_diesel_gen() cold_water_tank = setup_cold_thermal_storage() rooftop_pv = setup_solar() ground_pv = setup_solar(rooftop=False) gas_utility = setup_gas_utility() diesel_utility = setup_diesel_utility() components = [ elec_utility, gas_utility, gt1, carrier_chiller1, cold_water_tank, boiler1, york_chiller1, york_chiller3, carrier_chiller7, carrier_chiller8, carrier_chiller2, carrier_chiller3, carrier_chiller4, trane_chiller, gt2, gen_3, boiler2, boiler3, boiler4, boiler5, rooftop_pv, ground_pv, diesel_utility ] optimoptions = { 'interval': 365, 'horizon': 24, 'resoluion': 1, 'excess_heat': True, 'mixed_integer': False, 'excess_cool': True } campus_network = load_network( components) #load_network_one_node(components)# plant = Plant({ 'name': 'WSU_campus_DC', 'generator': components, 'optimoptions': optimoptions, 'network': campus_network }) gen_file_name = os.path.join('library', 'wsu_campus.pickle') with open(gen_file_name, 'wb') as write_file: pickle.dump(plant, write_file, pickle.HIGHEST_PROTOCOL)