From 7673b0504c51df58c50981230b989fbec7caed94 Mon Sep 17 00:00:00 2001 From: Daniel Muldrew Date: Wed, 8 Apr 2020 11:29:06 -0700 Subject: [PATCH] chore: rename design_transmission and delete unused test input file --- powersimdata/design/clean_capacity_scaling.py | 346 ++-- powersimdata/design/demo/__init__.py | 1 - powersimdata/design/demo/data/__init__.py | 0 ... => eastern_2030_clean_energy_targets.csv} | 0 .../design/demo/data/save_files/Pacific.json | 72 + .../design/demo/data/save_files/Pacific.pkl | Bin 0 -> 885 bytes .../design/demo/data/save_files/__init__.py | 1 - ...eastern_clean_capacity_scaling_demo.ipynb} | 1700 ++++++++--------- .../design/tests/test_case_input_output.csv | 8 - ...n_transmission.py => test_transmission.py} | 2 +- ...design_transmission.py => transmission.py} | 0 powersimdata/input/__init__.py | 2 +- powersimdata/input/change_table.py | 10 +- 13 files changed, 1082 insertions(+), 1060 deletions(-) delete mode 100644 powersimdata/design/demo/__init__.py delete mode 100644 powersimdata/design/demo/data/__init__.py rename powersimdata/design/demo/data/{Eastern Scenario Take 2.csv => eastern_2030_clean_energy_targets.csv} (100%) create mode 100644 powersimdata/design/demo/data/save_files/Pacific.json create mode 100644 powersimdata/design/demo/data/save_files/Pacific.pkl delete mode 100644 powersimdata/design/demo/data/save_files/__init__.py rename powersimdata/design/demo/{EasternCapacityScaling.ipynb => eastern_clean_capacity_scaling_demo.ipynb} (96%) delete mode 100644 powersimdata/design/tests/test_case_input_output.csv rename powersimdata/design/tests/{test_design_transmission.py => test_transmission.py} (99%) rename powersimdata/design/{design_transmission.py => transmission.py} (100%) diff --git a/powersimdata/design/clean_capacity_scaling.py b/powersimdata/design/clean_capacity_scaling.py index 9f9704506..9e476293e 100644 --- a/powersimdata/design/clean_capacity_scaling.py +++ b/powersimdata/design/clean_capacity_scaling.py @@ -17,16 +17,16 @@ def __init__(self): @staticmethod def set_next_sim_hours(next_sim_hours): - """ - Sets the number of hours in the simulation for next capacity - calculations + """Sets the number of hours in the simulation for next capacity + calculations. + :param int next_sim_hours: number of hours in the simulation """ AbstractStrategyManager.next_sim_hours = next_sim_hours def targets_from_data_frame(self, data_frame): - """ - Bulk creates target objects from dataframe + """Creates target objects from data frame. + :param (*pandas.DataFrame*) data_frame: external target information """ for row in data_frame.itertuples(): @@ -51,10 +51,10 @@ def targets_from_data_frame(self, data_frame): def populate_targets_with_resources(self, scenario_info, start_time, end_time): - """ - Add resource objects to all targets with a strategy from a - specified scenario - :param powersimdata.scenario.scenario_info.ScenarioInfo scenario_info: + """Adds resource objects to all targets with a strategy from a + specified scenario. + + :param powersimdata.design.scenario_info.ScenarioInfo scenario_info: ScenarioInfo object to calculate scenario resource properties :param str start_time: starting datetime for interval of interest :param str end_time: ending datetime for interval of interest @@ -74,9 +74,9 @@ def populate_targets_with_resources(self, scenario_info, start_time, end_time) def add_target(self, target_manager_obj): - """ - Add target to strategy object - :param target_manager_obj: target object to be added + """Adds target to strategy object. + + :param TargetManager target_manager_obj: target object to be added. """ assert (isinstance(target_manager_obj, TargetManager)), \ "Input must be of TargetManager type" @@ -84,10 +84,10 @@ def add_target(self, target_manager_obj): @staticmethod def load_target_from_json(target_name): - """ - Loads JSON file of given target - :param str target_name: name of target to be loaded - :return: instance of TargetManager class + """Loads JSON file of given target. + + :param str target_name: name of target to be loaded. + :return: (*TargetManager*) -- instance of TargetManager class """ json_file = open(os.path.join( os.path.dirname(os.path.abspath(__file__)), @@ -99,10 +99,10 @@ def load_target_from_json(target_name): @staticmethod def load_target_from_pickle(target_name): - """ - Loads pickle file of given target + """Loads pickle file of given target. + :param str target_name: name of target to be loaded - :return: instance of TargetManager class + :return: (*TargetManager*) -- instance of TargetManager class """ json_file = open(os.path.join( os.path.dirname(os.path.abspath(__file__)), @@ -114,18 +114,18 @@ def load_target_from_pickle(target_name): class IndependentStrategyManager(AbstractStrategyManager): - """ - Calculates the next capacities using individual target shortfalls + """Calculates the next capacities using individual target shortfalls. + """ def __init__(self): AbstractStrategyManager.__init__(self) def set_addl_curtailment(self, additional_curtailment_table): - """ - Sets additional curtailment for a region and particular resource type - :param additional_curtailment_table: nested dictionary structure of - the form: {‘Alabama’:{‘solar’: .2}, ‘Maryland’: {‘wind’: .1}} - The numbers are curtailment factors between 0 and 1. + """Sets additional curtailment for a region and particular resource type + + :param dict additional_curtailment_table: nested dictionary structure of + the form: {‘Alabama’:{‘solar’: .2}, ‘Maryland’: {‘wind’: .1}}. The + numbers are curtailment factors between 0 and 1. """ for region_name, target_obj in additional_curtailment_table.items(): for resource_name, curtailment_factor in target_obj.items(): @@ -143,9 +143,9 @@ def set_addl_curtailment(self, additional_curtailment_table): f"{resource_name} not found***") from e def data_frame_of_next_capacities(self): - """ - Gathers next target capacity information into a dataframe - :return: data frame of next target capacities + """Gathers next target capacity information into a data frame. + + :return: (*pandas.DataFrame*) -- data frame of next target capacities. """ target_capacities = [] for tar in self.targets: @@ -194,19 +194,18 @@ def data_frame_of_next_capacities(self): class CollaborativeStrategyManager(AbstractStrategyManager): - """ - Calculates the next capacities using total target shortfalls + """Calculates the next capacities using total target shortfalls. + """ def __init__(self): self.addl_curtailment = {"solar": 0, "wind": 0} AbstractStrategyManager.__init__(self) def set_collab_addl_curtailment(self, addl_curtailment): - """ - Set additional curtailment for Collaborative Strategy - Must be a dictionary with "solar" and "wind" keys defined: - {"solar": .2, "wind": .3} - with values between 0 and 1. + """Sets additional curtailment for Collaborative Strategy + + :param dict addl_curtailment: dictionary with '*solar*' and '*wind*' + keys defined: {"solar": .2, "wind": .3} with values between 0 and 1. """ assert set(addl_curtailment.keys()) == set(["solar", "wind"]) assert 0 <= addl_curtailment["solar"] <= 1, "solar additional " \ @@ -218,9 +217,9 @@ def set_collab_addl_curtailment(self, addl_curtailment): self.addl_curtailment = addl_curtailment def calculate_total_shortfall(self): - """ - Calculate total clean energy shortfall - :return: total clean energy shortfall + """Calculates total clean energy shortfall. + + :return: (*float*) -- total clean energy shortfall """ total_ce_shortfall = 0 for name, target in self.targets.items(): @@ -229,9 +228,9 @@ def calculate_total_shortfall(self): return total_ce_shortfall def calculate_total_prev_ce_generation(self): - """ - Calculate total allowed clean energy generation - :return: total allowed clean energy generation + """Calculates total allowed clean energy generation + + :return: (*float*) -- total allowed clean energy generation """ total_prev_ce_generation = 0 for tar in self.targets: @@ -240,11 +239,11 @@ def calculate_total_prev_ce_generation(self): return total_prev_ce_generation def calculate_total_added_capacity(self, solar_fraction=None): - """ - Calculate the capacity to add from total clean energy shortfall - :param solar_fraction: solar fraction to be used in calculation, - default is to maintain from previous result - :return: solar and wind added capacities + """Calculates the capacity to add from total clean energy shortfall. + + :param float solar_fraction: solar fraction to be used in calculation, + default is to maintain from previous result + :return: (*tuple*) -- solar and wind added capacities """ solar_prev_capacity = self.calculate_total_capacity('solar') wind_prev_capacity = self.calculate_total_capacity('wind') @@ -274,11 +273,11 @@ def calculate_total_added_capacity(self, solar_fraction=None): return solar_added_capacity, wind_added_capacity def calculate_total_added_capacity_gen_constant(self, solar_fraction=None): - """ - Calculate the capacity to add from total clean energy shortfall - :param solar_fraction: solar fraction to be used in calculation, - default is to maintain from previous result - :return: solar and wind added capacities + """Calculates the capacity to add from total clean energy shortfall. + + :param (*float*) solar_fraction: solar fraction to be used in + calculation, default is to maintain from previous result + :return: (*tuple*) -- solar and wind added capacities """ solar_prev_capacity = self.calculate_total_capacity('solar') wind_prev_capacity = self.calculate_total_capacity('wind') @@ -307,10 +306,10 @@ def calculate_total_added_capacity_gen_constant(self, solar_fraction=None): return solar_added_capacity, wind_added_capacity def calculate_total_capacity(self, category): - """ - Calculate total capacity for a resource - :param category: resource category - :return: total capacity for a resource + """Calculates total capacity for a resource. + + :param str category: resource category. + :return: (*float*) -- total capacity for a resource. """ total_prev_capacity = 0 for tar in self.targets: @@ -319,10 +318,10 @@ def calculate_total_capacity(self, category): return total_prev_capacity def calculate_total_generation(self, category): - """ - Calculate total generation for a resource - :param category: resource category - :return: total generation for a resource + """Calculates total generation for a resource. + + :param str category: resource category. + :return: (*float*) -- total generation for a resource. """ total_prev_generation = 0 for tar in self.targets: @@ -331,10 +330,10 @@ def calculate_total_generation(self, category): return total_prev_generation def calculate_total_capacity_factor(self, category): - """ - Calculate total capacity factor for a target_manager_obj resource - :param category: resource category - :return: total capacity factor + """Calculates total capacity factor for a resource. + + :param str category: resource category. + :return: (*float*) -- total capacity factor. """ # revisit where hourly factor comes from total_cap_factor = self.calculate_total_generation(category) / \ @@ -342,11 +341,10 @@ def calculate_total_capacity_factor(self, category): return total_cap_factor def calculate_total_expected_capacity_factor(self, category): - """ - Calculate the total expected capacity for a target_manager_obj resource - :param category: resource category - :param addl_curtailment: option to add additional curtailment - :return: total expected capacity factor + """Calculates the total expected capacity for a resource. + + :param str category: resource category. + :return: (*float*) -- total expected capacity factor """ assert (category in ["solar", "wind"]), " expected capacity factor " \ "only defined for solar and " \ @@ -357,9 +355,9 @@ def calculate_total_expected_capacity_factor(self, category): return total_exp_cap_factor def calculate_capacity_scaling(self): - """ - Calculate the aggregate capacity scaling factor for solar and wind - :return: solar and wind capacity scaling factors + """Calculates the aggregate capacity scaling factor for solar and wind. + + :return: (*tuple*) -- solar and wind capacity scaling factors """ solar_prev_capacity = self.calculate_total_capacity('solar') wind_prev_capacity = self.calculate_total_capacity('wind') @@ -370,9 +368,9 @@ def calculate_capacity_scaling(self): return solar_scaling, wind_scaling def data_frame_of_next_capacities(self): - """ - Gathers next target capacity information into a dataframe - :return: data frame of next target capacities + """Gathers next target capacity information into a data frame. + + :return: (*pandas.DataFrame*) -- data frame of next target capacities """ solar_scaling, wind_scaling = self.calculate_capacity_scaling() @@ -414,13 +412,14 @@ class TargetManager: def __init__(self, region_name, ce_target_fraction, ce_category, total_demand, external_ce_historical_amount=0, solar_percentage=None): - """ - Class manages the regional target_manager_obj data and calculations - :param region_name: region region_name - :param ce_target_fraction: target_manager_obj fraction for clean energy - :param ce_category: type of energy target_manager_obj, i.e. renewable, - clean energy, etc. - :param total_demand: total demand for region + """Manages the regional data and calculations. + + :param str region_name: region region_name + :param float ce_target_fraction: target_manager_obj fraction for clean + energy + :param str ce_category: type of energy target_manager_obj, i.e. + renewable, clean energy, etc. + :param float total_demand: total demand for region """ assert (type(region_name) == str), "region_name must be a string" assert (type(ce_category) == str), "ce_category must be a string" @@ -451,12 +450,12 @@ def __init__(self, region_name, ce_target_fraction, ce_category, def populate_resource_info(self, scenario_info, start_time, end_time): - """ - Add resource objects to target using a specified scenario - :param powersimdata.scenario.scenario_info.ScenarioInfo scenario_info: - ScenarioInfo object to calculate scenario resource properties - :param str start_time: starting datetime for interval of interest - :param str end_time: ending datetime for interval of interest + """Adds resource objects to target using a specified scenario. + + :param powersimdata.design.scenario_info.ScenarioInfo scenario_info: + ScenarioInfo object to calculate scenario resource properties. + :param str start_time: starting datetime for interval of interest. + :param str end_time: ending datetime for interval of interest. """ allowed_resources = set(self.allowed_resources) available_resources = set( @@ -472,9 +471,9 @@ def populate_resource_info(self, scenario_info, self.add_resource_manager(resources) def calculate_added_capacity(self): - """ - Calculate added capacity, maintains solar wind ratio by default - :return: tuple of solar and wind added capacity values + """Calculates added capacity, maintains solar wind ratio by default. + + :return: (*tuple*) -- solar and wind added capacity values """ solar = self.resources['solar'] wind = self.resources['wind'] @@ -501,9 +500,9 @@ def calculate_added_capacity(self): return solar_added_capacity, wind_added_capacity def calculate_added_capacity_gen_constant(self): - """ - Calculate added capacity, maintains solar wind ratio by default - :return: tuple of solar and wind added capacity values + """Calculates added capacity, maintains solar wind ratio by default. + + :return: (*tuple*) -- solar and wind added capacity values. """ solar = self.resources['solar'] wind = self.resources['wind'] @@ -530,9 +529,9 @@ def calculate_added_capacity_gen_constant(self): return solar_added_capacity, wind_added_capacity def calculate_prev_ce_generation(self): - """ - Calculates total generation from allowed resources - :return: total generation from allowed resources + """Calculates total generation from allowed resources. + + :return: (*float*) -- total generation from allowed resources """ # prev_ce_generation = the sum of all prev_generation in the list # of allowed resources @@ -543,32 +542,31 @@ def calculate_prev_ce_generation(self): return prev_ce_generation def add_resource(self, resource): - """ - Adds resource to TargetManager - :param resource: resource to be added + """Adds resource to TargetManager. + + :param Resource resource: resource to be added """ assert (isinstance(resource, Resource)),\ "Input must be of Resource type" self.resources[resource.name] = resource def add_resource_manager(self, resource_manager): - """ - Sets the resources property equal to a resource manager object which - contains scenario resource information - :param (powersimdata.scaling.generation - .auto_capacity_scaling.ResourceManager) resource_manager: resource - manager object with scenario resource information + """Sets the resources property equal to a resource manager object which + contains scenario resource information. + + :param ResourceManager resource_manager: resource manager object with + scenario resource information """ assert (isinstance(resource_manager, ResourceManager)),\ "Input parameter must be an instance of type ResourceManager" self.resources = resource_manager def calculate_ce_shortfall(self): - """ - Calculates the clean energy shortfall for target_manager_obj area, + """Calculates the clean energy shortfall for target_manager_obj area, subtracts the external value if greater than total allowed clean energy - generation - :return: clean energy shortfall + generation. + + :return: (*float*) -- clean energy shortfall """ prev_ce_generation = self.calculate_prev_ce_generation() @@ -585,11 +583,10 @@ def calculate_ce_shortfall(self): return ce_shortfall def calculate_ce_overgeneration(self): - """ - Calculates the clean energy overgeneration for target_manager_obj - area, subtracts from external value if greater than total allowed - clean energy generation - :return: clean energy overgeneration + """Calculates the clean energy over generation, subtracts from external + value if greater than total allowed clean energy generation + + :return: (*float*) -- clean energy over generation """ prev_ce_generation = self.calculate_prev_ce_generation() @@ -606,16 +603,17 @@ def calculate_ce_overgeneration(self): return ce_overgeneration def set_allowed_resources(self, allowed_resources): + """Sets a list of allowed resources. + + :param list allowed_resources: allowed resources + + .. todo:: input validation """ - Sets a list of allow resources - :param allowed_resources: list of allow resources - """ - # todo: input validation self.allowed_resources = allowed_resources def save_target_as_json(self): - """ - Saves target object as indented JSON file named by region name + """Saves target object as indented JSON file named by region name. + """ print(os.getcwd()) json_file = open(os.path.join( @@ -628,8 +626,8 @@ def save_target_as_json(self): json_file.close() def save_target_as_pickle(self): - """ - Saves target object as pickle file named by region name + """Saves target object as pickle file named by region name. + """ print(os.getcwd()) json_file = open(os.path.join( @@ -640,9 +638,9 @@ def save_target_as_pickle(self): json_file.close() def __str__(self): - """ - Outputs indented JSON string af object properties - :return: JSON formatted string + """Outputs indented JSON string af object properties. + + :return: (*str*) -- JSON formatted string """ return json.dumps( json.loads(jsonpickle.encode(self, unpicklable=False)), @@ -651,20 +649,20 @@ def __str__(self): class ResourceManager: - """ - Class manages the creation of resource objects from scenario information + """Manages the creation of resource objects from scenario information. + """ def __init__(self): - """ - Creates an empty dictionary to hold resource objects + """Creates an empty dictionary to hold resource objects. + """ self.resources = {} def __getitem__(self, key): - """ - Allows indexing into the resources dictionary directly from the + """Allows indexing into the resources dictionary directly from the object variable, i.e. res = ResourceManager; res["solar"] is the - same as res.resources["solar"] + same as res.resources["solar"]. + :param str key: resource type as string :raises KeyError For attempts to use key not in the dictionary :return: instance of Resource class @@ -676,15 +674,15 @@ def __getitem__(self, key): def pull_region_resource_info(self, region_name, scenario_info, region_resources, start_time, end_time): - """ - Pulls resource information from scenario info object over the - specified time range + """Pulls resource information from scenario info object over the + specified time range. + :param str region_name: name of region to extract from scenario - :param powersimdata.scenario.scenario_info.ScenarioInfo scenario_info: - ScenarioInfo object to calculate scenario resource properties - :param set region_resources: resources to extract from scenario - :param str start_time: starting time for simulation - :param str end_time: ending time for simulation + :param powersimdata.design.scenario_info.ScenarioInfo scenario_info: + ScenarioInfo instance to calculate scenario resource properties + :param set region_resources: resources to extract from scenario. + :param str start_time: starting time for simulation. + :param str end_time: ending time for simulation. """ assert (isinstance(scenario_info, ScenarioInfo)),\ "input parameter must be an instance of type ScenarioInfo" @@ -760,14 +758,16 @@ def __init__(self, name, prev_scenario_num): self.prev_curtailment = None self.addl_curtailment = 0 - # todo: calculate directly from scenario results def set_capacity(self, no_congestion_cap_factor, prev_capacity, prev_cap_factor): - """ - Sets capacity information for resource - :param no_congestion_cap_factor: capacity factor with no congestion - :param prev_capacity: capacity from scenario run - :param prev_cap_factor: capacity factor from scenario run + """Sets capacity information for resource. + + :param float no_congestion_cap_factor: capacity factor with no + congestion. + :param float prev_capacity: capacity from scenario run. + :param float prev_cap_factor: capacity factor from scenario run. + + .. todo:: calculate directly from scenario results """ assert (0 <= no_congestion_cap_factor <= 1), \ "no_congestion_cap_factor must be between 0 and 1" @@ -779,60 +779,60 @@ def set_capacity(self, no_congestion_cap_factor, prev_capacity, self.prev_capacity = prev_capacity self.prev_cap_factor = prev_cap_factor - # todo: calculate directly from scenario results def set_generation(self, prev_generation, tolerance=1e-3): + """Sets generation from scenario run. + + :param float prev_generation: generation from scenario run. + :param float tolerance: tolerance for ignored negative values. + + .. todo:: calculate directly from scenario results """ - Set generation from scenario run - :param prev_generation: generation from scenario run - :param {float, int} tolerance: tolerance for ignored negative values - """ - if ((-1 * tolerance) <= prev_generation < 0): + if (-1 * tolerance) <= prev_generation < 0: prev_generation = 0 assert (prev_generation >= 0), \ f"prev_generation must be greater than zero. Got {prev_generation}" self.prev_generation = prev_generation def set_curtailment(self, prev_curtailment): - """ - Set curtailment from scenario run - :param prev_curtailment: calculated curtailment from scenario run + """Sets curtailment from scenario run. + + :param float prev_curtailment: calculated curtailment from scenario run. """ assert (prev_curtailment >= 0), \ "prev_curtailment must be greater than zero" self.prev_curtailment = prev_curtailment def set_addl_curtailment(self, addl_curtailment): - """ - Set additional curtailment to included in capacity calculations - :param addl_curtailment: additional curtailment + """Sets additional curtailment to include in capacity calculations. + + :param float addl_curtailment: additional curtailment """ assert (0 <= addl_curtailment <= 1), \ "additional_curtailment must be between 0 and 1" self.addl_curtailment = addl_curtailment def calculate_expected_cap_factor(self): - """ - Calculates the capacity factor including additional curtailment - :return: capacity factor for resource + """Calculates the capacity factor including additional curtailment. + + :return: (*float*) --capacity factor for resource """ exp_cap_factor = self.prev_cap_factor * (1-self.addl_curtailment) return exp_cap_factor def calculate_next_capacity(self, added_capacity): - """ - Calculates next capacity to be used for scenario - :param added_capacity: calculated added capacity - :return: next capacity to be used for scenario + """Calculates next capacity to be used for scenario. + + :param float added_capacity: calculated added capacity + :return: (*float*) -- next capacity to be used for scenario """ next_capacity = self.prev_capacity + added_capacity return next_capacity def __str__(self): + """Outputs indented JSON string af object properties + + :return: (*str*) --JSON formatted string """ - Outputs indented JSON string af object properties - :return: JSON formatted string - """ - return json.dumps(json.loads(jsonpickle.encode(self, - unpicklable=False - )), - indent=4, sort_keys=True) + return json.dumps( + json.loads(jsonpickle.encode(self, unpicklable=False)), + indent=4, sort_keys=True) diff --git a/powersimdata/design/demo/__init__.py b/powersimdata/design/demo/__init__.py deleted file mode 100644 index dfa289e47..000000000 --- a/powersimdata/design/demo/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['data'] \ No newline at end of file diff --git a/powersimdata/design/demo/data/__init__.py b/powersimdata/design/demo/data/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/powersimdata/design/demo/data/Eastern Scenario Take 2.csv b/powersimdata/design/demo/data/eastern_2030_clean_energy_targets.csv similarity index 100% rename from powersimdata/design/demo/data/Eastern Scenario Take 2.csv rename to powersimdata/design/demo/data/eastern_2030_clean_energy_targets.csv diff --git a/powersimdata/design/demo/data/save_files/Pacific.json b/powersimdata/design/demo/data/save_files/Pacific.json new file mode 100644 index 000000000..a3147334b --- /dev/null +++ b/powersimdata/design/demo/data/save_files/Pacific.json @@ -0,0 +1,72 @@ +{ + "allowed_resources": [ + "solar", + "wind", + "geo" + ], + "ce_category": "renewables", + "ce_target": 50000.0, + "ce_target_fraction": 0.25, + "external_ce_historical_amount": 0, + "py/object": "powersimdata.design.clean_capacity_scaling.TargetManager", + "region_name": "Pacific", + "resources": { + "geo": { + "addl_curtailment": 0, + "name": "geo", + "no_congestion_cap_factor": 1, + "prev_cap_factor": 1, + "prev_capacity": 4000, + "prev_curtailment": 0, + "prev_generation": 8000, + "prev_scenario_num": 3, + "py/object": "powersimdata.design.clean_capacity_scaling.Resource" + }, + "hydro": { + "addl_curtailment": 0, + "name": "hydro", + "no_congestion_cap_factor": 1, + "prev_cap_factor": 1, + "prev_capacity": 3900, + "prev_curtailment": 0, + "prev_generation": 7000, + "prev_scenario_num": 3, + "py/object": "powersimdata.design.clean_capacity_scaling.Resource" + }, + "nuclear": { + "addl_curtailment": 0, + "name": "nuclear", + "no_congestion_cap_factor": 1, + "prev_cap_factor": 1, + "prev_capacity": 4300, + "prev_curtailment": 0, + "prev_generation": 6500, + "prev_scenario_num": 3, + "py/object": "powersimdata.design.clean_capacity_scaling.Resource" + }, + "solar": { + "addl_curtailment": 0, + "name": "solar", + "no_congestion_cap_factor": 0.25, + "prev_cap_factor": 0.215379, + "prev_capacity": 3700, + "prev_curtailment": 0.138483, + "prev_generation": 7000, + "prev_scenario_num": 3, + "py/object": "powersimdata.design.clean_capacity_scaling.Resource" + }, + "wind": { + "addl_curtailment": 0, + "name": "wind", + "no_congestion_cap_factor": 0.4, + "prev_cap_factor": 0.347855, + "prev_capacity": 3600, + "prev_curtailment": 0.130363, + "prev_generation": 11000, + "prev_scenario_num": 3, + "py/object": "powersimdata.design.clean_capacity_scaling.Resource" + } + }, + "solar_percentage": null, + "total_demand": 200000 +} \ No newline at end of file diff --git a/powersimdata/design/demo/data/save_files/Pacific.pkl b/powersimdata/design/demo/data/save_files/Pacific.pkl new file mode 100644 index 0000000000000000000000000000000000000000..5b0c1fb2b65744a006ad7e8acecf46b9da58afee GIT binary patch literal 885 zcmb7@zi-n(6vrLXA2e+ew?Ju9xD;|=|d++mo@4nA@TJ(l;#8eW-KGn44vm^{e z%ZnHlu1AN|3-#DdJQ{@}C_SJmVA`RA227Q}y73GO8Jua7Rm-vz3qmPeL1P9*vW$@< zqz9n~3nuR|6x1w`Y7C2{WC+1Vv>&kqmdF|gwA3_meHK&U!}8ruxoD9Mj3cT|Yj>ci zr?Cy3?Y6&R1|PD5AO9*~rQ7-aXp-2$FZM(;B~TSBc$jFZLcEMiW0?vKrJhA>tV(1= zl{;k0V?yKQVD%nZ$2g55bjNoUOJs`41lArxxk(nM3{=Pho<|`LTqQ+3226s@%uq9G zJ%f!Vul$eK_fK1v;2hd~K7$KQ)5`d}$tz~Qp<<75J4{d&N>`*YTq!x? zBzG&{q&q<8q=K!Pab>JC3e!bH&CwN7oeNK?dbj=Q#dGU*|8SNLm|%*UZ8RLxFh)+~ zQl)7a#poq$ciSJ|eLY@!^ULI^@8c@w@;f~%?ei+nFL^10-6r3}Uw8|SgZ_A#KgYc0 z*cFZ=e7|%1)nVa?H=I8=IVyj6`@a6==Lw&P*hXY8gUh*yJrU^@kUpvMIvyHMXP0mH ztVz9DA|Lxo!oDG|WNU GxBdc@UJ0.000000e+00\n", " 1.686780e+05\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 75.000\n", " 1.000\n", - " 249.991082\n", - " 3.333214\n", + " 214.176239\n", + " 2.855683\n", " \n", " \n", " Arkansas\n", @@ -4844,12 +4834,12 @@ " 0.000000e+00\n", " 3.088913e+04\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 13.000\n", " 1.000\n", - " 43.331788\n", - " 3.333214\n", + " 37.123881\n", + " 2.855683\n", " \n", " \n", " Connecticut\n", @@ -4857,12 +4847,12 @@ " 1.369935e+07\n", " 5.444679e+05\n", " 1.315488e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 25.200\n", " 5.000\n", - " 83.997004\n", - " 16.666072\n", + " 71.963216\n", + " 14.278416\n", " \n", " \n", " Delaware\n", @@ -4870,12 +4860,12 @@ " 3.607736e+06\n", " 6.465725e+04\n", " 3.543078e+06\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 30.799\n", " 2.000\n", - " 102.659671\n", - " 6.666429\n", + " 87.952187\n", + " 5.711366\n", " \n", " \n", " Florida\n", @@ -4883,12 +4873,12 @@ " 0.000000e+00\n", " 6.376034e+05\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 331.599\n", " 3.000\n", - " 1105.290571\n", - " 9.999643\n", + " 946.941689\n", + " 8.567050\n", " \n", " \n", " Georgia\n", @@ -4896,12 +4886,12 @@ " 0.000000e+00\n", " 1.872815e+06\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 978.100\n", " 2.000\n", - " 3260.217031\n", - " 6.666429\n", + " 2793.143726\n", + " 5.711366\n", " \n", " \n", " Iowa\n", @@ -4909,12 +4899,12 @@ " 0.000000e+00\n", " 2.284169e+07\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 2.600\n", " 6935.303\n", - " 8.666358\n", - " 23116.852018\n", + " 7.424776\n", + " 19805.028180\n", " \n", " \n", " Illinois\n", @@ -4922,12 +4912,12 @@ " 4.412802e+07\n", " 1.276847e+07\n", " 3.135955e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 34.100\n", " 4008.500\n", - " 113.662612\n", - " 13361.190032\n", + " 97.378797\n", + " 11447.006059\n", " \n", " \n", " Indiana\n", @@ -4935,12 +4925,12 @@ " 1.134574e+07\n", " 6.363548e+06\n", " 4.982189e+06\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 160.597\n", " 1889.701\n", - " 535.304237\n", - " 6298.778637\n", + " 458.614153\n", + " 5396.387376\n", " \n", " \n", " Kansas\n", @@ -4948,12 +4938,12 @@ " 1.117864e+07\n", " 1.547162e+07\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 1.000\n", " 4469.801\n", - " 3.333214\n", - " 14898.805181\n", + " 2.855683\n", + " 12764.335569\n", " \n", " \n", " Kentucky\n", @@ -4961,12 +4951,12 @@ " 0.000000e+00\n", " 2.114564e+04\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 10.000\n", " 1.000\n", - " 33.332144\n", - " 3.333214\n", + " 28.556832\n", + " 2.855683\n", " \n", " \n", " Louisiana\n", @@ -4974,12 +4964,12 @@ " 0.000000e+00\n", " 5.445332e+03\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 1.000\n", " 1.000\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " \n", " \n", " Massachusetts\n", @@ -4987,12 +4977,12 @@ " 1.961179e+07\n", " 3.961751e+06\n", " 1.565004e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 482.297\n", " 96.400\n", - " 1607.599319\n", - " 321.321871\n", + " 1377.287434\n", + " 275.287859\n", " \n", " \n", " Maryland\n", @@ -5000,12 +4990,12 @@ " 4.268290e+07\n", " 2.981008e+06\n", " 3.970189e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 144.400\n", " 190.000\n", - " 481.316163\n", - " 633.310741\n", + " 412.360652\n", + " 542.579806\n", " \n", " \n", " Maine\n", @@ -5013,12 +5003,12 @@ " 7.939602e+06\n", " 5.146707e+06\n", " 2.792895e+06\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 1.000\n", " 898.800\n", - " 3.333214\n", - " 2995.893127\n", + " 2.855683\n", + " 2566.688049\n", " \n", " \n", " Michigan\n", @@ -5026,12 +5016,12 @@ " 4.128669e+07\n", " 9.868740e+06\n", " 3.141795e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 12.500\n", " 1609.901\n", - " 41.665180\n", - " 5366.145240\n", + " 35.696040\n", + " 4597.367220\n", " \n", " \n", " Minnesota\n", @@ -5039,12 +5029,12 @@ " 1.858635e+07\n", " 1.239467e+07\n", " 6.191684e+06\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 256.200\n", " 3517.022\n", - " 853.969536\n", - " 11722.988472\n", + " 731.626033\n", + " 10043.500597\n", " \n", " \n", " Missouri\n", @@ -5052,12 +5042,12 @@ " 1.473278e+07\n", " 4.093900e+06\n", " 1.063888e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 26.700\n", " 660.400\n", - " 88.996825\n", - " 2201.254808\n", + " 76.246741\n", + " 1885.893177\n", " \n", " \n", " Mississippi\n", @@ -5065,12 +5055,12 @@ " 0.000000e+00\n", " 9.494913e+03\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 3.100\n", " 1.000\n", - " 10.332965\n", - " 3.333214\n", + " 8.852618\n", + " 2.855683\n", " \n", " \n", " Montana Eastern\n", @@ -5078,12 +5068,12 @@ " 0.000000e+00\n", " 1.029446e+05\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 1.000\n", " 30.000\n", - " 3.333214\n", - " 99.996433\n", + " 2.855683\n", + " 85.670496\n", " \n", " \n", " North Carolina\n", @@ -5091,12 +5081,12 @@ " 2.082713e+07\n", " 1.068939e+07\n", " 1.013774e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 2431.416\n", " 209.000\n", - " 8104.430890\n", - " 696.641815\n", + " 6943.353794\n", + " 596.837786\n", " \n", " \n", " North Dakota\n", @@ -5104,12 +5094,12 @@ " 2.399374e+06\n", " 1.112050e+07\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 1.000\n", " 2828.402\n", - " 3.333214\n", - " 9427.670353\n", + " 2.855683\n", + " 8077.020040\n", " \n", " \n", " Nebraska\n", @@ -5117,12 +5107,12 @@ " 0.000000e+00\n", " 4.619616e+06\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 6.300\n", " 1318.899\n", - " 20.999251\n", - " 4396.173175\n", + " 17.990804\n", + " 3766.357701\n", " \n", " \n", " New Hampshire\n", @@ -5130,12 +5120,12 @@ " 2.661895e+06\n", " 5.193983e+05\n", " 2.142497e+06\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 1.000\n", " 185.300\n", - " 3.333214\n", - " 617.644633\n", + " 2.855683\n", + " 529.158095\n", " \n", " \n", " New Jersey\n", @@ -5143,12 +5133,12 @@ " 5.707188e+07\n", " 1.690058e+06\n", " 5.538182e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 613.906\n", " 9.000\n", - " 2046.280336\n", - " 29.998930\n", + " 1753.121043\n", + " 25.701149\n", " \n", " \n", " New Mexico Eastern\n", @@ -5156,12 +5146,12 @@ " 0.000000e+00\n", " 2.023704e+06\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 165.000\n", " 483.601\n", - " 549.980381\n", - " 1611.945830\n", + " 471.187726\n", + " 1381.011245\n", " \n", " \n", " New York\n", @@ -5169,12 +5159,12 @@ " 1.135637e+08\n", " 3.367330e+07\n", " 7.989044e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 110.300\n", " 1829.801\n", - " 367.653551\n", - " 6099.119093\n", + " 314.981856\n", + " 5225.331953\n", " \n", " \n", " Ohio\n", @@ -5182,12 +5172,12 @@ " 1.314764e+07\n", " 2.446017e+06\n", " 1.070162e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 48.800\n", " 533.902\n", - " 162.660864\n", - " 1779.609849\n", + " 139.357340\n", + " 1524.654965\n", " \n", " \n", " Oklahoma\n", @@ -5195,12 +5185,12 @@ " 1.208196e+07\n", " 2.569219e+07\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 2.500\n", " 6654.801\n", - " 8.333036\n", - " 22181.878705\n", + " 7.139208\n", + " 19004.003334\n", " \n", " \n", " Pennsylvania\n", @@ -5208,12 +5198,12 @@ " 2.773875e+07\n", " 9.854241e+06\n", " 1.788451e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 53.698\n", " 1373.400\n", - " 178.986948\n", - " 4577.836695\n", + " 153.344476\n", + " 3921.995290\n", " \n", " \n", " Rhode Island\n", @@ -5221,12 +5211,12 @@ " 2.085429e+06\n", " 2.055025e+05\n", " 1.879927e+06\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 10.201\n", " 51.000\n", - " 34.002120\n", - " 169.993936\n", + " 29.130824\n", + " 145.639843\n", " \n", " \n", " South Carolina\n", @@ -5234,12 +5224,12 @@ " 1.908121e+06\n", " 5.478181e+06\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 19.300\n", " 1.000\n", - " 64.331038\n", - " 3.333214\n", + " 55.114686\n", + " 2.855683\n", " \n", " \n", " South Dakota\n", @@ -5247,12 +5237,12 @@ " 2.244648e+06\n", " 6.526782e+06\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 1.000\n", " 627.800\n", - " 3.333214\n", - " 2092.592018\n", + " 2.855683\n", + " 1792.797905\n", " \n", " \n", " Tennessee\n", @@ -5260,12 +5250,12 @@ " 0.000000e+00\n", " 2.213095e+05\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 72.600\n", " 28.800\n", - " 241.991367\n", - " 95.996576\n", + " 207.322599\n", + " 82.243676\n", " \n", " \n", " Texas\n", @@ -5273,12 +5263,12 @@ " 0.000000e+00\n", " 4.212626e+06\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 2.000\n", " 1247.599\n", - " 6.666429\n", - " 4158.514986\n", + " 5.711366\n", + " 3562.747489\n", " \n", " \n", " Virginia\n", @@ -5286,12 +5276,12 @@ " 2.104425e+07\n", " 6.530895e+06\n", " 1.451336e+07\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 139.000\n", " 2.000\n", - " 463.316805\n", - " 6.666429\n", + " 396.939963\n", + " 5.711366\n", " \n", " \n", " Vermont\n", @@ -5299,12 +5289,12 @@ " 3.330435e+06\n", " 1.619402e+06\n", " 1.711033e+06\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 65.997\n", " 121.000\n", - " 219.982153\n", - " 403.318946\n", + " 188.466523\n", + " 345.537666\n", " \n", " \n", " Wisconsin\n", @@ -5312,12 +5302,12 @@ " 8.720262e+06\n", " 4.816550e+06\n", " 3.903712e+06\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 3.100\n", " 637.500\n", - " 10.332965\n", - " 2124.924197\n", + " 8.852618\n", + " 1820.498032\n", " \n", " \n", " West Virginia\n", @@ -5325,12 +5315,12 @@ " 0.000000e+00\n", " 1.940154e+06\n", " 0.000000e+00\n", - " 3.333214\n", - " 3.333214\n", + " 2.855683\n", + " 2.855683\n", " 1.000\n", " 686.300\n", - " 3.333214\n", - " 2287.585062\n", + " 2.855683\n", + " 1959.855372\n", " \n", " \n", "\n", @@ -5381,45 +5371,45 @@ "\n", " clean_energy_shortfall solar_scaling wind_scaling \\\n", "region_name \n", - "Alabama 0.000000e+00 3.333214 3.333214 \n", - "Arkansas 0.000000e+00 3.333214 3.333214 \n", - "Connecticut 1.315488e+07 3.333214 3.333214 \n", - "Delaware 3.543078e+06 3.333214 3.333214 \n", - "Florida 0.000000e+00 3.333214 3.333214 \n", - "Georgia 0.000000e+00 3.333214 3.333214 \n", - "Iowa 0.000000e+00 3.333214 3.333214 \n", - "Illinois 3.135955e+07 3.333214 3.333214 \n", - "Indiana 4.982189e+06 3.333214 3.333214 \n", - "Kansas 0.000000e+00 3.333214 3.333214 \n", - "Kentucky 0.000000e+00 3.333214 3.333214 \n", - "Louisiana 0.000000e+00 3.333214 3.333214 \n", - "Massachusetts 1.565004e+07 3.333214 3.333214 \n", - "Maryland 3.970189e+07 3.333214 3.333214 \n", - "Maine 2.792895e+06 3.333214 3.333214 \n", - "Michigan 3.141795e+07 3.333214 3.333214 \n", - "Minnesota 6.191684e+06 3.333214 3.333214 \n", - "Missouri 1.063888e+07 3.333214 3.333214 \n", - "Mississippi 0.000000e+00 3.333214 3.333214 \n", - "Montana Eastern 0.000000e+00 3.333214 3.333214 \n", - "North Carolina 1.013774e+07 3.333214 3.333214 \n", - "North Dakota 0.000000e+00 3.333214 3.333214 \n", - "Nebraska 0.000000e+00 3.333214 3.333214 \n", - "New Hampshire 2.142497e+06 3.333214 3.333214 \n", - "New Jersey 5.538182e+07 3.333214 3.333214 \n", - "New Mexico Eastern 0.000000e+00 3.333214 3.333214 \n", - "New York 7.989044e+07 3.333214 3.333214 \n", - "Ohio 1.070162e+07 3.333214 3.333214 \n", - "Oklahoma 0.000000e+00 3.333214 3.333214 \n", - "Pennsylvania 1.788451e+07 3.333214 3.333214 \n", - "Rhode Island 1.879927e+06 3.333214 3.333214 \n", - "South Carolina 0.000000e+00 3.333214 3.333214 \n", - "South Dakota 0.000000e+00 3.333214 3.333214 \n", - "Tennessee 0.000000e+00 3.333214 3.333214 \n", - "Texas 0.000000e+00 3.333214 3.333214 \n", - "Virginia 1.451336e+07 3.333214 3.333214 \n", - "Vermont 1.711033e+06 3.333214 3.333214 \n", - "Wisconsin 3.903712e+06 3.333214 3.333214 \n", - "West Virginia 0.000000e+00 3.333214 3.333214 \n", + "Alabama 0.000000e+00 2.855683 2.855683 \n", + "Arkansas 0.000000e+00 2.855683 2.855683 \n", + "Connecticut 1.315488e+07 2.855683 2.855683 \n", + "Delaware 3.543078e+06 2.855683 2.855683 \n", + "Florida 0.000000e+00 2.855683 2.855683 \n", + "Georgia 0.000000e+00 2.855683 2.855683 \n", + "Iowa 0.000000e+00 2.855683 2.855683 \n", + "Illinois 3.135955e+07 2.855683 2.855683 \n", + "Indiana 4.982189e+06 2.855683 2.855683 \n", + "Kansas 0.000000e+00 2.855683 2.855683 \n", + "Kentucky 0.000000e+00 2.855683 2.855683 \n", + "Louisiana 0.000000e+00 2.855683 2.855683 \n", + "Massachusetts 1.565004e+07 2.855683 2.855683 \n", + "Maryland 3.970189e+07 2.855683 2.855683 \n", + "Maine 2.792895e+06 2.855683 2.855683 \n", + "Michigan 3.141795e+07 2.855683 2.855683 \n", + "Minnesota 6.191684e+06 2.855683 2.855683 \n", + "Missouri 1.063888e+07 2.855683 2.855683 \n", + "Mississippi 0.000000e+00 2.855683 2.855683 \n", + "Montana Eastern 0.000000e+00 2.855683 2.855683 \n", + "North Carolina 1.013774e+07 2.855683 2.855683 \n", + "North Dakota 0.000000e+00 2.855683 2.855683 \n", + "Nebraska 0.000000e+00 2.855683 2.855683 \n", + "New Hampshire 2.142497e+06 2.855683 2.855683 \n", + "New Jersey 5.538182e+07 2.855683 2.855683 \n", + "New Mexico Eastern 0.000000e+00 2.855683 2.855683 \n", + "New York 7.989044e+07 2.855683 2.855683 \n", + "Ohio 1.070162e+07 2.855683 2.855683 \n", + "Oklahoma 0.000000e+00 2.855683 2.855683 \n", + "Pennsylvania 1.788451e+07 2.855683 2.855683 \n", + "Rhode Island 1.879927e+06 2.855683 2.855683 \n", + "South Carolina 0.000000e+00 2.855683 2.855683 \n", + "South Dakota 0.000000e+00 2.855683 2.855683 \n", + "Tennessee 0.000000e+00 2.855683 2.855683 \n", + "Texas 0.000000e+00 2.855683 2.855683 \n", + "Virginia 1.451336e+07 2.855683 2.855683 \n", + "Vermont 1.711033e+06 2.855683 2.855683 \n", + "Wisconsin 3.903712e+06 2.855683 2.855683 \n", + "West Virginia 0.000000e+00 2.855683 2.855683 \n", "\n", " solar_prev_capacity wind_prev_capacity \\\n", "region_name \n", @@ -5465,48 +5455,48 @@ "\n", " next_solar_capacity next_wind_capacity \n", "region_name \n", - "Alabama 249.991082 3.333214 \n", - "Arkansas 43.331788 3.333214 \n", - "Connecticut 83.997004 16.666072 \n", - "Delaware 102.659671 6.666429 \n", - "Florida 1105.290571 9.999643 \n", - "Georgia 3260.217031 6.666429 \n", - "Iowa 8.666358 23116.852018 \n", - "Illinois 113.662612 13361.190032 \n", - "Indiana 535.304237 6298.778637 \n", - "Kansas 3.333214 14898.805181 \n", - "Kentucky 33.332144 3.333214 \n", - "Louisiana 3.333214 3.333214 \n", - "Massachusetts 1607.599319 321.321871 \n", - "Maryland 481.316163 633.310741 \n", - "Maine 3.333214 2995.893127 \n", - "Michigan 41.665180 5366.145240 \n", - "Minnesota 853.969536 11722.988472 \n", - "Missouri 88.996825 2201.254808 \n", - "Mississippi 10.332965 3.333214 \n", - "Montana Eastern 3.333214 99.996433 \n", - "North Carolina 8104.430890 696.641815 \n", - "North Dakota 3.333214 9427.670353 \n", - "Nebraska 20.999251 4396.173175 \n", - "New Hampshire 3.333214 617.644633 \n", - "New Jersey 2046.280336 29.998930 \n", - "New Mexico Eastern 549.980381 1611.945830 \n", - "New York 367.653551 6099.119093 \n", - "Ohio 162.660864 1779.609849 \n", - "Oklahoma 8.333036 22181.878705 \n", - "Pennsylvania 178.986948 4577.836695 \n", - "Rhode Island 34.002120 169.993936 \n", - "South Carolina 64.331038 3.333214 \n", - "South Dakota 3.333214 2092.592018 \n", - "Tennessee 241.991367 95.996576 \n", - "Texas 6.666429 4158.514986 \n", - "Virginia 463.316805 6.666429 \n", - "Vermont 219.982153 403.318946 \n", - "Wisconsin 10.332965 2124.924197 \n", - "West Virginia 3.333214 2287.585062 " + "Alabama 214.176239 2.855683 \n", + "Arkansas 37.123881 2.855683 \n", + "Connecticut 71.963216 14.278416 \n", + "Delaware 87.952187 5.711366 \n", + "Florida 946.941689 8.567050 \n", + "Georgia 2793.143726 5.711366 \n", + "Iowa 7.424776 19805.028180 \n", + "Illinois 97.378797 11447.006059 \n", + "Indiana 458.614153 5396.387376 \n", + "Kansas 2.855683 12764.335569 \n", + "Kentucky 28.556832 2.855683 \n", + "Louisiana 2.855683 2.855683 \n", + "Massachusetts 1377.287434 275.287859 \n", + "Maryland 412.360652 542.579806 \n", + "Maine 2.855683 2566.688049 \n", + "Michigan 35.696040 4597.367220 \n", + "Minnesota 731.626033 10043.500597 \n", + "Missouri 76.246741 1885.893177 \n", + "Mississippi 8.852618 2.855683 \n", + "Montana Eastern 2.855683 85.670496 \n", + "North Carolina 6943.353794 596.837786 \n", + "North Dakota 2.855683 8077.020040 \n", + "Nebraska 17.990804 3766.357701 \n", + "New Hampshire 2.855683 529.158095 \n", + "New Jersey 1753.121043 25.701149 \n", + "New Mexico Eastern 471.187726 1381.011245 \n", + "New York 314.981856 5225.331953 \n", + "Ohio 139.357340 1524.654965 \n", + "Oklahoma 7.139208 19004.003334 \n", + "Pennsylvania 153.344476 3921.995290 \n", + "Rhode Island 29.130824 145.639843 \n", + "South Carolina 55.114686 2.855683 \n", + "South Dakota 2.855683 1792.797905 \n", + "Tennessee 207.322599 82.243676 \n", + "Texas 5.711366 3562.747489 \n", + "Virginia 396.939963 5.711366 \n", + "Vermont 188.466523 345.537666 \n", + "Wisconsin 8.852618 1820.498032 \n", + "West Virginia 2.855683 1959.855372 " ] }, - "execution_count": 14, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } @@ -5516,15 +5506,6 @@ "collaborative_next_capacities" ] }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [], - "source": [ - "#collaborative_next_capacities.to_csv(\"Eastern_Collaborative.csv\")" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -5535,7 +5516,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -7224,7 +7205,7 @@ "[39 rows x 79 columns]" ] }, - "execution_count": 16, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -7243,16 +7224,7 @@ }, { "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [], - "source": [ - "#cap_planning_df.to_excel(\"Eastern_Capacity_Inputs.xlsx\")" - ] - }, - { - "cell_type": "code", - "execution_count": 18, + "execution_count": 15, "metadata": {}, "outputs": [ { @@ -7776,7 +7748,7 @@ "West Virginia NaN 1.000 " ] }, - "execution_count": 18, + "execution_count": 15, "metadata": {}, "output_type": "execute_result" } @@ -7803,7 +7775,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 16, "metadata": {}, "outputs": [ { @@ -8080,7 +8052,7 @@ "West Virginia 1.000000 686.300000 " ] }, - "execution_count": 19, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -8092,7 +8064,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 17, "metadata": { "scrolled": true }, @@ -8742,7 +8714,7 @@ "West Virginia 686.300000 " ] }, - "execution_count": 20, + "execution_count": 17, "metadata": {}, "output_type": "execute_result" } @@ -8752,29 +8724,13 @@ "merged_capacities = merged_capacities.fillna(0.0)\n", "merged_capacities" ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [], - "source": [ - "#merged_capacities.to_excel(\"Next_Capacity_Outputs.xlsx\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python [conda env:powersimdata] *", + "display_name": "v1", "language": "python", - "name": "conda-env-powersimdata-py" + "name": "v1" }, "language_info": { "codemirror_mode": { diff --git a/powersimdata/design/tests/test_case_input_output.csv b/powersimdata/design/tests/test_case_input_output.csv deleted file mode 100644 index 3b1c61b89..000000000 --- a/powersimdata/design/tests/test_case_input_output.csv +++ /dev/null @@ -1,8 +0,0 @@ -region_name,ce_target_fraction,CE_Type,allowed_resources,geothermal_generation,hydro_generation,nuclear_generation,solar_generation,wind_generation,Externally Calculated CE_Total Gen (if any),Previous Case's CE-eligible Gen,geothermal_capacity,hydro_capacity,nuclear_capacity,solar_capacity,wind_capacity,no_cong_solar_cf,no_cong_wind_cf,prev_sim_solar_cf,prev_sim_wind_cf,prev_solar_curtailment,prev_wind_curtailment,total_demand,strategy,solar_percentage,solar_addl_curtailment,wind_addl_curtailment,ce_target,ce_shortfall,ce_overgeneration,solar_expected_capacity_factor,wind_expected_capacity_factor,solar_added_capacity,wind_added_capacity,next_case_solar_capacity,next_case_wind_capacity,,, -Pacific1,0.25,Renewables,"Geothermal, Solar, Wind",8000,7000,6000,8125.2,12648.96,,28774.16,4000,3900,3800,3700,3600,0.25,0.4,0.25,0.4,0,0,200000,Independently,0.75,0.4,0,50000,21225.84,0,0.15,0.4,8528.543877,2842.847959,12228.54388,6442.847959,,, -Atlantic1,0.3,Renewables,"Geothermal, Hydro, Solar, Wind",8500,7500,6500,11067.84,12605.04,,39672.88,4500,4400,4300,4200,4100,0.3,0.35,0.3,0.35,0,0,300000,Independently,0.506024096,0,0,90000,50327.12,0,0.3,0.35,8928.947555,8716.353566,13128.94756,12816.35357,,, -Pacific2,0.25,Renewables,"Geothermal, Solar, Wind",8000,7000,6000,7000,11000,,26000,4000,3900,3800,3700,3600,0.25,0.4,0.215379314,0.347854685,0.138482745,0.130363287,200000,Independently,0.506849315,0,0,50000,24000,0,0.215379314,0.347854685,4933.333333,4800,8633.333333,8400,,, -Atlantic2,0.4,Clean,"Geothermal, Hydro, Nuclear, Solar, Wind",8500,7500,6500,10500,11500,,44500,4500,4400,4300,4200,4100,0.3,0.35,0.284608379,0.319316718,0.051305404,0.087666521,300000,Independently,0.506024096,0,0,120000,75500,0,0.284608379,0.319316718,14413.63636,14070.45455,18613.63636,18170.45455,,, -Pacific3,0.25,Renewables,"Geothermal, Solar, Wind",8000,7000,6000,7000,11000,,26000,4000,3900,3800,3700,3600,0.25,0.4,0.215379314,0.347854685,0.138482745,0.130363287,200000,Independently,1,0,0,50000,24000,0,0.215379314,0.347854685,12685.71429,0,16385.71429,3600,,, -Atlantic3,0.4,Clean,"Geothermal, Hydro, Nuclear, Solar, Wind",8500,7500,6500,10500,11500,,44500,4500,4400,4300,4200,4100,0.3,0.35,0.284608379,0.319316718,0.051305404,0.087666521,300000,Independently,0.506024096,0,0,120000,75500,0,0.284608379,0.319316718,14413.63636,14070.45455,18613.63636,18170.45455,,, -,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/powersimdata/design/tests/test_design_transmission.py b/powersimdata/design/tests/test_transmission.py similarity index 99% rename from powersimdata/design/tests/test_design_transmission.py rename to powersimdata/design/tests/test_transmission.py index aa4748b08..024484631 100644 --- a/powersimdata/design/tests/test_design_transmission.py +++ b/powersimdata/design/tests/test_transmission.py @@ -6,7 +6,7 @@ from powersimdata.tests.mock_grid import MockGrid from postreise.tests.mock_scenario import MockScenario from powersimdata.tests.mock_change_table import MockChangeTable -from powersimdata.design.design_transmission import ( +from powersimdata.design.transmission import ( _find_branches_connected_to_bus, _find_first_degree_branches, _find_stub_degree, _find_capacity_at_bus, scale_renewable_stubs, _identify_mesh_branch_upgrades, _increment_branch_scaling) diff --git a/powersimdata/design/design_transmission.py b/powersimdata/design/transmission.py similarity index 100% rename from powersimdata/design/design_transmission.py rename to powersimdata/design/transmission.py diff --git a/powersimdata/input/__init__.py b/powersimdata/input/__init__.py index deea6c0ae..f89935d6a 100644 --- a/powersimdata/input/__init__.py +++ b/powersimdata/input/__init__.py @@ -1,3 +1,3 @@ -__all__ = ['abstract_grid', 'change_table', 'csv_reader', 'design_transmission', +__all__ = ['abstract_grid', 'change_table', 'csv_reader', 'grid', 'helpers', 'mat_reader', 'profiles', 'scaler', 'usa_tamu_model'] diff --git a/powersimdata/input/change_table.py b/powersimdata/input/change_table.py index a1841fc8b..6d0f91995 100644 --- a/powersimdata/input/change_table.py +++ b/powersimdata/input/change_table.py @@ -1,7 +1,7 @@ import os import pickle -from powersimdata.design.design_transmission import ( +from powersimdata.design.transmission import ( scale_congested_mesh_branches, scale_renewable_stubs) from powersimdata.input.grid import Grid from powersimdata.utility import const @@ -296,7 +296,9 @@ def scale_demand(self, zone_name=None, zone_id=None): def scale_renewable_stubs(self, **kwargs): """Scales undersized stub branches connected to renewable generators. - Optional kwargs as documented in powersimdata.design.design_transmission + + Optional kwargs as documented in the + :mod:`powersimdata.design.transmission` module. """ scale_renewable_stubs(self, **kwargs) @@ -304,7 +306,9 @@ def scale_congested_mesh_branches(self, ref_scenario, **kwargs): """Scales congested branches based on previous scenario results. :param powersimdata.scenario.scenario.Scenario ref_scenario: the reference scenario to be used in determining branch scaling. - Optional kwargs as documented in powersimdata.design.design_transmission + + Optional kwargs as documented in the + :mod:`powersimdata.design.transmission` module. """ scale_congested_mesh_branches(self, ref_scenario, **kwargs)