message
stringlengths
5
481
model_input
stringlengths
47
2.9k
input_ids
list
attention_mask
list
labels
list
Fix test assertion Existing gen profiles should really be >=0 but some hydro ended up with very small negative profiles.
MODIFY tests/generation_test.py tests/generation_test.py @@ -485,4 +485,4 @@ def test_existing_gen_profiles(): ) existing_gen = gc.create_region_technology_clusters() gen_variability = make_generator_variability(existing_gen) - assert (gen_variability >= 0.01).all().all() + assert (gen_variability >= -0.01).all().all()...
[ 1, 6720, 12096, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 30989, 300, 24, 7140, 16, 24, 397, 24, 7140, 16, 24, 22175, 1652, 1842, 67, 11711, 67, 4507, 67, 18314, 13332, 203, 13, 203...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 1842, 11240, 203, 9895, 3157, 11788, 1410, 8654, 506, 1545, 20, 1496, 2690, 4855, 9005, 16926, 731, 598, 8572, 5264, 6092, 11788, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Minor version bump with bug fix and expanded testing
MODIFY setup.py setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup setup( name="powergenome", packages=find_packages(), - version="0.5.1", + version="0.5.2", description="Extract PUDL data for use in power system models", author="Greg Schivley", entry_points={
[ 1, 6720, 12096, 203, 8401, 18, 2074, 203, 8401, 18, 2074, 203, 30989, 300, 23, 16, 27, 397, 23, 16, 27, 22175, 628, 444, 30693, 1930, 1104, 67, 10308, 16, 3875, 203, 8401, 12, 203, 529, 1546, 12238, 23220, 3113, 203, 10308, 33, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19549, 1177, 23559, 598, 7934, 2917, 471, 8406, 7769, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Add offshore wind tech_detail with Class number Used to only be otrg but ATB has multiple names.
MODIFY powergenome/resource_clusters.py powergenome/resource_clusters.py @@ -38,14 +38,28 @@ NREL_ATB_TECHNOLOGY_MAP = { "technology": "offshorewind", "turbine_type": "fixed", } - for x in range(1, 6) + for x in range(1, 8) + }, + **{ + ("offshorewind", f"class{x}"): { + "technology": "offshorewind", + "turbine_type": ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 3146, 67, 16806, 18, 2074, 203, 12238, 23220, 19, 3146, 67, 16806, 18, 2074, 203, 30989, 300, 7414, 16, 3461, 397, 7414, 16, 6030, 22175, 423, 15868, 67, 789, 38, 67, 1448, 1792, 3417, 4842, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 3397, 674, 479, 17064, 13878, 67, 8992, 598, 1659, 1300, 203, 6668, 358, 1338, 506, 320, 313, 75, 1496, 14464, 38, 711, 3229, 1257, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Updated to v0.5.2 PG now returns representative point.
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -354,7 +354,7 @@ def reduce_time_domain( include_peak_day = settings["include_peak_day"] load_weight = settings["demand_weight_factor"] - results, _, _ = kmeans_time_clustering( + results, representative_point, _ = kmeans_time_clustering( resource_profiles=resource_prof...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 4763, 24, 16, 27, 397, 4763, 24, 16, 27, 22175, 1652, 5459, 67, 957, 67, 4308, 12, 203, 6702, 67, 10244, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7381, 358, 331, 20, 18, 25, 18, 22, 203, 18679, 2037, 1135, 23174, 1634, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Update time_reduction.py So that representative point can be printed.
MODIFY powergenome/time_reduction.py powergenome/time_reduction.py @@ -325,6 +325,7 @@ def kmeans_time_clustering( pass resource_df = resource_df.fillna(value=1) + # load_df["Sub_Weights"] = np.nan # load_df.loc[: len(EachClusterWeight) - 1, "Sub_Weights"] = ( # np.array(EachClusterWeight) * NumGrpDays * 24 @@ -336,7 +...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 957, 67, 1118, 4062, 18, 2074, 203, 12238, 23220, 19, 957, 67, 1118, 4062, 18, 2074, 203, 30989, 300, 1578, 25, 16, 26, 397, 1578, 25, 16, 27, 22175, 1652, 417, 18408, 67, 957, 67, 7967, 310,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1891, 813, 67, 1118, 4062, 18, 2074, 203, 10225, 716, 23174, 1634, 848, 506, 14099, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Add representative_point output to reduce_time_domain func
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -389,7 +389,12 @@ def reduce_time_domain( axis=1, ) - return reduced_resource_profile, reduced_load_output, time_series_mapping, representative_point + return ( + reduced_resource_profile, + reduced_load_output, + time_series_mapping, + representative_point, + ) else: t...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 23, 6675, 16, 27, 397, 23, 6675, 16, 2138, 22175, 1652, 5459, 67, 957, 67, 4308, 12, 203, 4890, 33, 21, 16, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 23174, 67, 1153, 876, 358, 5459, 67, 957, 67, 4308, 1326, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Add basic test checks for reduced time outputs
MODIFY tests/generation_test.py tests/generation_test.py @@ -332,6 +332,15 @@ def test_gen_integration(CA_AZ_settings, tmp_path): time_series_mapping, representative_point, ) = reduce_time_domain(gen_variability, load, gc.settings) + if gc.settings["reduce_time_domain"]: + assert len(representative_point) == gc.setting...
[ 1, 6720, 12096, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 30989, 300, 23, 1578, 16, 26, 397, 23, 1578, 16, 3600, 22175, 1652, 1842, 67, 4507, 67, 27667, 12, 3587, 67, 26315, 67, 427...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 5337, 1842, 4271, 364, 13162, 813, 6729, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Test min/max cap requirement functions
MODIFY tests/generation_test.py tests/generation_test.py @@ -7,6 +7,7 @@ from powergenome.GenX import ( add_cap_res_network, create_policy_req, create_regional_cap_res, + max_cap_req, min_cap_req, network_line_loss, network_max_reinforcement, @@ -496,3 +497,25 @@ def test_existing_gen_profiles(): existing_gen = gc.crea...
[ 1, 6720, 12096, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 30989, 300, 27, 16, 26, 397, 27, 16, 27, 22175, 628, 7212, 23220, 18, 7642, 60, 1930, 261, 203, 1289, 67, 5909, 67, 455, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 4709, 1131, 19, 1896, 3523, 12405, 4186, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Fix fuel name bug through eia/atb tech map If the ATB technology in eia_atb_tech_map parameter could string match with an existing technology, it could assign the wrong fuel. This came up when coal plants were being assigned distillate fuel because of a Petroleum Liquids: Coal_newAvgCF mapping.
MODIFY powergenome/generators.py powergenome/generators.py @@ -2036,7 +2036,7 @@ def add_fuel_labels(df, fuel_prices, settings): corresponding fuel (coal, natural_gas, uranium, or distillate) or "None". """ - df["Fuel"] = "None" + df["Fuel"] = np.nan for eia_tech, fuel in (settings.get("tech_fuel_map") or {}).items(): ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 3462, 5718, 16, 27, 397, 3462, 5718, 16, 27, 22175, 1652, 527, 67, 74, 20317, 67, 5336, 12, 2180, 16, 284, 20317, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 284, 20317, 508, 7934, 3059, 425, 1155, 19, 270, 70, 13878, 852, 203, 2047, 326, 14464, 38, 17734, 4676, 316, 425, 1155, 67, 270, 70, 67, 28012, 67, 1458, 1569, 3377, 533, 845, 203, 1918, 392, 2062, 17734, 4676, 16, 518, ...
Updated nrelatb.py (1) now mod_atb_technology accept a single number for subsittution. (2) add default value for max_capacity_mwh
MODIFY powergenome/nrelatb.py powergenome/nrelatb.py @@ -882,6 +882,9 @@ def add_modified_atb_generators( gen["cost_case"] = mod_tech.pop("new_cost_case") for parameter, op_list in mod_tech.items(): + if isinstance(op_list, float) | isinstance(op_list, int): + gen[parameter] = op_list + else: assert len(op_list) == 2, ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 82, 2878, 270, 70, 18, 2074, 203, 12238, 23220, 19, 82, 2878, 270, 70, 18, 2074, 203, 30989, 300, 5482, 22, 16, 26, 397, 5482, 22, 16, 29, 22175, 1652, 527, 67, 7342, 67, 270, 70, 67, 25959...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7381, 290, 2878, 270, 70, 18, 2074, 203, 12, 21, 13, 2037, 681, 67, 270, 70, 67, 28012, 82, 4676, 2791, 279, 2202, 1300, 364, 11630, 305, 88, 1421, 18, 203, 12, 22, 13, 527, 805, 460, 364, 943, 67, 16017, 67, 81, 3350, 2, ...
Only check resource tags that are in df Tags not defined for any resources won't be columns in the df, will cause an error.
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -943,10 +943,10 @@ def check_resource_tags(df: pd.DataFrame) -> pd.DataFrame: pd.DataFrame An unaltered version of the input dataframe. """ - - if not (df[RESOURCE_TAGS].sum(axis=1) == 1).all(): + tags = [t for t in RESOURCE_TAGS if t in df.columns] + if not (df[tags].s...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 29, 8942, 16, 2163, 397, 29, 8942, 16, 2163, 22175, 1652, 866, 67, 3146, 67, 4156, 12, 2180, 30, 4863, 18, 2569...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3386, 866, 1058, 2342, 716, 854, 316, 3013, 203, 3453, 486, 2553, 364, 1281, 2703, 8462, 1404, 506, 2168, 316, 326, 3013, 16, 903, 4620, 392, 555, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Don't allow negative variable generation values This can cause infeasibilities in GenX. There is one IPM region with some very small negative hydro hourly gen values. Just make it zero instead. Also update the test for this.
MODIFY powergenome/external_data.py powergenome/external_data.py @@ -236,6 +236,8 @@ def make_generator_variability( hours = df["profile"].apply(profile_len).max() kwargs = {"remove_feb_29": remove_feb_29, "hours": hours} profiles = np.column_stack(df["profile"].apply(format_profile, **kwargs).values) + # Make sure val...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 9375, 67, 892, 18, 2074, 203, 12238, 23220, 19, 9375, 67, 892, 18, 2074, 203, 30989, 300, 29941, 16, 26, 397, 29941, 16, 28, 22175, 1652, 1221, 67, 8812, 67, 4093, 2967, 12, 203, 16814, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 22293, 1404, 1699, 6092, 2190, 9377, 924, 203, 2503, 848, 4620, 316, 3030, 345, 495, 5076, 316, 10938, 60, 18, 6149, 353, 1245, 2971, 49, 3020, 598, 2690, 203, 3242, 5264, 6092, 4855, 9005, 30662, 3157, 924, 18, 12526, 1221, 518, ...
Update GenX.py LDS can be 1 for STOR.
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -49,8 +49,8 @@ COL_ROUND_VALUES = { "Line_Loss_Percentage": 4, } -RESOURCE_TAGS = ["THERM", "VRE", "MUST_RUN", "STOR", "FLEX", "HYDRO", "LDS"] - +# RESOURCE_TAGS = ["THERM", "VRE", "MUST_RUN", "STOR", "FLEX", "HYDRO", "LDS"] +RESOURCE_TAGS = ["THERM", "VRE", "MUST_RUN",...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 7616, 16, 28, 397, 7616, 16, 28, 22175, 5597, 67, 15092, 67, 16386, 273, 288, 203, 6, 1670, 67, 20527, 67, 1639...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1891, 10938, 60, 18, 2074, 203, 48, 3948, 848, 506, 404, 364, 2347, 916, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Settings fix based on code errors Remove NDISP model tag Add NaturalGas_ to THERM and distributed_generation to MUST_RUN
MODIFY example_systems/CA_AZ/test_settings.yml example_systems/CA_AZ/test_settings.yml @@ -614,6 +614,7 @@ model_tag_values: Petroleum Coke: 1 Petroleum Liquids: 1 Wood/Wood Waste Biomass: 1 + NaturalGas_: 1 VRE: CSP: 1 LandbasedWind: 1 @@ -630,11 +631,6 @@ model_tag_values: Solar Photovoltaic: 1 Solar Thermal without ...
[ 1, 6720, 12096, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 3813, 67, 4272, 18, 10865, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 3813, 67, 4272, 18, 10865, 203, 30989, 300, 26, 3461, 16, 26, 397, 26, 3461, 16, 27, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 2628, 2917, 2511, 603, 981, 1334, 203, 3288, 423, 2565, 3118, 938, 1047, 203, 986, 423, 270, 3766, 27998, 67, 358, 399, 3891, 49, 471, 16859, 67, 25514, 358, 10685, 67, 15238, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
User fuel bug fixes The param "region" isn't always used and might cause an error Better string matching against user technologies.
MODIFY powergenome/eia_opendata.py powergenome/eia_opendata.py @@ -221,7 +221,7 @@ def add_user_fuel_prices(settings: dict, df: pd.DataFrame = None) -> pd.DataFram fuel_data["year"].extend(years) fuel_data["price"].extend([val] * len(years)) fuel_data["fuel"].extend([fuel] * len(years)) - fuel_data["region"].extend([re...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 73, 1155, 67, 556, 409, 396, 18, 2074, 203, 12238, 23220, 19, 73, 1155, 67, 556, 409, 396, 18, 2074, 203, 30989, 300, 3787, 21, 16, 27, 397, 3787, 21, 16, 27, 22175, 1652, 527, 67, 1355, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1299, 284, 20317, 7934, 24436, 203, 1986, 579, 315, 6858, 6, 5177, 1404, 3712, 1399, 471, 4825, 4620, 392, 555, 203, 38, 11214, 533, 3607, 5314, 729, 17734, 27854, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
FIx pandas regex default
MODIFY powergenome/util.py powergenome/util.py @@ -338,7 +338,7 @@ def snake_case_col(col: pd.Series) -> pd.Series: "Remove special characters and convert to snake case" clean = ( col.str.lower() - .str.replace(r"[^0-9a-zA-Z\-]+", " ") + .str.replace(r"[^0-9a-zA-Z\-]+", " ", regex=True) .str.replace("-", "") .str.strip...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 1367, 18, 2074, 203, 12238, 23220, 19, 1367, 18, 2074, 203, 30989, 300, 3707, 28, 16, 27, 397, 3707, 28, 16, 27, 22175, 1652, 16774, 67, 3593, 67, 1293, 12, 1293, 30, 4863, 18, 6485, 13, 317,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1653, 92, 12037, 3936, 805, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Bug fix for user fuel emission factors
MODIFY powergenome/fuels.py powergenome/fuels.py @@ -21,7 +21,7 @@ def fuel_cost_table(fuel_costs, generators, settings): for row in model_year_costs.itertuples(index=False, name="row") } - emission_dict = settings["fuel_emission_factors"] + emission_dict = settings.get("fuel_emission_factors", {}) or {} user_fuels = s...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 27074, 10558, 18, 2074, 203, 12238, 23220, 19, 27074, 10558, 18, 2074, 203, 30989, 300, 5340, 16, 27, 397, 5340, 16, 27, 22175, 1652, 284, 20317, 67, 12398, 67, 2121, 12, 74, 20317, 67, 12398, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 364, 729, 284, 20317, 801, 19710, 14490, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Update time_reduction.py change month to Rep_Period_Index
MODIFY powergenome/time_reduction.py powergenome/time_reduction.py @@ -216,11 +216,11 @@ def kmeans_time_clustering( time_series_mapping = time_series_mapping.reset_index(drop=True) # extract month corresponding to each time slot - time_series_mapping["Month"] = 0 + time_series_mapping["Rep_Period_Index"] = 0 for Perio...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 957, 67, 1118, 4062, 18, 2074, 203, 12238, 23220, 19, 957, 67, 1118, 4062, 18, 2074, 203, 30989, 300, 22, 2313, 16, 2499, 397, 22, 2313, 16, 2499, 22175, 1652, 417, 18408, 67, 957, 67, 7967, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1891, 813, 67, 1118, 4062, 18, 2074, 203, 3427, 3138, 358, 868, 84, 67, 5027, 67, 1016, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Only retire units with known retirement year before planning year Previous behavior retired units unless retirement year was after planning year. In cases of unknown retirement year, units were not retained.
MODIFY powergenome/generators.py powergenome/generators.py @@ -491,7 +491,7 @@ def label_retirement_year( """ start_len = len(df) - retirement_ages = settings[settings_retirement_table] + retirement_ages = settings.get(settings_retirement_table, {}) or {} for tech, life in retirement_ages.items(): try: @@ -2829,12 +282...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 7616, 21, 16, 27, 397, 7616, 21, 16, 27, 22175, 1652, 1433, 67, 1349, 577, 475, 67, 6874, 12, 203, 8395, 203, 1937, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3386, 325, 577, 4971, 598, 4846, 325, 577, 475, 3286, 1865, 886, 10903, 3286, 203, 8351, 6885, 325, 2921, 4971, 3308, 325, 577, 475, 3286, 1703, 1839, 886, 10903, 3286, 18, 203, 382, 6088, 434, 5917, 325, 577, 475, 3286, 16, 4971...
Bug fix when no retirement age is set
MODIFY powergenome/generators.py powergenome/generators.py @@ -492,6 +492,8 @@ def label_retirement_year( start_len = len(df) retirement_ages = settings.get(settings_retirement_table, {}) or {} + if "retirement_year" not in df.columns: + df["retirement_year"] = np.nan for tech, life in retirement_ages.items(): try:
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 7616, 22, 16, 26, 397, 7616, 22, 16, 28, 22175, 1652, 1433, 67, 1349, 577, 475, 67, 6874, 12, 203, 1937, 67, 1897, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 1347, 1158, 325, 577, 475, 9388, 353, 444, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Bug fix for resource clusters A change to allow sub-regions introduced a bug in the filter to select clusters
MODIFY powergenome/resource_clusters.py powergenome/resource_clusters.py @@ -610,7 +610,7 @@ class ResourceGroup: for t in tree: df["tree"] += df[t].astype(str) else: - df["tree"] = tree + df["tree"] = df[tree] selected = ( pd.Series(mask, index=df.index) .groupby(df["tree"])
[ 1, 6720, 12096, 203, 12238, 23220, 19, 3146, 67, 16806, 18, 2074, 203, 12238, 23220, 19, 3146, 67, 16806, 18, 2074, 203, 30989, 300, 26, 2163, 16, 27, 397, 26, 2163, 16, 27, 22175, 667, 2591, 1114, 30, 203, 1884, 268, 316, 2151, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 364, 1058, 9566, 203, 37, 2549, 358, 1699, 720, 17, 15923, 26339, 279, 7934, 316, 326, 1034, 358, 2027, 9566, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Bug fix model tag check If more than one tag was detected, the list of tags to check would be modified. This would create issues with subsequent checks, causing warnings about no valid tags.
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -959,11 +959,11 @@ def check_resource_tags(df: pd.DataFrame) -> pd.DataFrame: ) if num_tags > 1: s = row[RESOURCE_TAGS] - tags = list(s[s == 1].index) + _tags = list(s[s == 1].index) logger.warning( "\n*************************\n" f"The resource {row['technology']} in r...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 29, 6162, 16, 2499, 397, 29, 6162, 16, 2499, 22175, 1652, 866, 67, 3146, 67, 4156, 12, 2180, 30, 4863, 18, 2569...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 938, 1047, 866, 203, 2047, 1898, 2353, 1245, 1047, 1703, 8316, 16, 326, 666, 434, 2342, 358, 866, 4102, 506, 4358, 18, 203, 2503, 4102, 752, 8296, 598, 10815, 4271, 16, 25416, 5599, 2973, 203, 2135, 923, 2342, 18, 2,...
Correct Rep_Period assignment
MODIFY powergenome/time_reduction.py powergenome/time_reduction.py @@ -340,7 +340,10 @@ def kmeans_time_clustering( # renewable_df = renewable_df.drop(columns=["GrpWeight"]) # renewable_df.insert(loc=0, column="Resource", value=renewable_df.index + 1) # renewable_df.to_csv("renewables_time_reduced.csv", index=False) - ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 957, 67, 1118, 4062, 18, 2074, 203, 12238, 23220, 19, 957, 67, 1118, 4062, 18, 2074, 203, 30989, 300, 5026, 20, 16, 27, 397, 5026, 20, 16, 2163, 22175, 1652, 417, 18408, 67, 957, 67, 7967, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 16147, 868, 84, 67, 5027, 6661, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Update time_reduction.py
MODIFY powergenome/time_reduction.py powergenome/time_reduction.py @@ -224,7 +224,6 @@ def kmeans_time_clustering( dayOfYear = days_in_group * Period_Index d = datetime.datetime.strptime("{} {}".format(dayOfYear, 2011), "%j %Y") time_series_mapping["Month"][Period_Index - 1] = d.month - time_series_mapping["Rep_Period_...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 957, 67, 1118, 4062, 18, 2074, 203, 12238, 23220, 19, 957, 67, 1118, 4062, 18, 2074, 203, 30989, 300, 23622, 16, 27, 397, 23622, 16, 26, 22175, 1652, 417, 18408, 67, 957, 67, 7967, 310, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1891, 813, 67, 1118, 4062, 18, 2074, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Rework make gen variability to make more flexible Don't assume 8760 hours if remove_feb_29 is true -- check if 8784 hours. Came up when writing tests and using only a couple hours for sample profiles.
MODIFY powergenome/external_data.py powergenome/external_data.py @@ -209,7 +209,7 @@ def make_generator_variability( """ def profile_len(x: Any) -> int: - if isinstance(x, np.ndarray): + if isinstance(x, (list, np.ndarray)): return len(x) return 1 @@ -227,13 +227,12 @@ def make_generator_variability( if isinstance(x, l...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 9375, 67, 892, 18, 2074, 203, 12238, 23220, 19, 9375, 67, 892, 18, 2074, 203, 30989, 300, 3462, 29, 16, 27, 397, 3462, 29, 16, 27, 22175, 1652, 1221, 67, 8812, 67, 4093, 2967, 12, 203, 8395, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 17631, 778, 1221, 3157, 1394, 2967, 358, 1221, 1898, 16600, 1523, 203, 22293, 1404, 6750, 1725, 27, 4848, 7507, 309, 1206, 67, 3030, 70, 67, 5540, 353, 638, 1493, 866, 309, 1725, 27, 5193, 7507, 18, 203, 39, 339, 731, 1347, 7410,...
Remove partial CES calc and check for VRE col Minor fixes I'm tossing in now.
MODIFY powergenome/generators.py powergenome/generators.py @@ -3203,6 +3203,7 @@ class GeneratorClusters: self.all_resources.loc[i, "variable_CF"] = np.mean(p) # Set Min_Power of wind/solar to 0 + if "VRE" in self.all_resources.columns: self.all_resources.loc[self.all_resources["VRE"] == 1, "Min_Power"] = 0 self.all_re...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 1578, 4630, 16, 26, 397, 1578, 4630, 16, 27, 22175, 667, 10159, 13698, 30, 203, 2890, 18, 454, 67, 4683, 18, 1829, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3288, 4702, 385, 3991, 7029, 471, 866, 364, 776, 862, 645, 203, 19549, 24436, 467, 17784, 358, 1049, 310, 316, 2037, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Don't cluster existing units if num is None
MODIFY powergenome/generators.py powergenome/generators.py @@ -2861,6 +2861,9 @@ class GeneratorClusters: # correct clustering method. Can't keep doing if statements as the number of # methods grows. CHANGE LATER. if not alt_cluster_method: + # Allow users to set value as None and not cluster units. + if num_clusters[r...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 22, 5292, 21, 16, 26, 397, 22, 5292, 21, 16, 29, 22175, 667, 10159, 13698, 30, 203, 7, 3434, 18743, 707, 18, 4480, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 22293, 1404, 2855, 2062, 4971, 309, 818, 353, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Wrap efs data path in try/except If the EFS_DATA variable isn't in the .env file this would have raised a TypeError when defining path_in.
MODIFY powergenome/load_construction.py powergenome/load_construction.py @@ -18,7 +18,12 @@ from powergenome.util import ( ) from powergenome.params import DATA_PATHS, SETTINGS +logger = logging.getLogger(__name__) + +try: path_in = Path(SETTINGS["EFS_DATA"]) +except TypeError: + logger.warning("The variable 'EFS_DATA'...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 591, 4549, 18, 2074, 203, 12238, 23220, 19, 945, 67, 591, 4549, 18, 2074, 203, 30989, 300, 2643, 16, 27, 397, 2643, 16, 2138, 22175, 628, 7212, 23220, 18, 1367, 1930, 261, 203, 13, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 2964, 425, 2556, 501, 589, 316, 775, 19, 14137, 203, 2047, 326, 512, 4931, 67, 4883, 2190, 5177, 1404, 316, 326, 263, 3074, 585, 333, 4102, 1240, 11531, 279, 203, 19030, 1347, 9364, 589, 67, 267, 18, 2, -100, -100, -100, -100, ...
Fix bug when model tags have value > 1 The model tag check looked for a sum of values == 1, but tags can have values other than 1 or 0. Fix the check and expand the test for this use case.
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -946,8 +946,10 @@ def check_resource_tags(df: pd.DataFrame) -> pd.DataFrame: An unaltered version of the input dataframe. """ tags = [t for t in RESOURCE_TAGS if t in df.columns] - if not (df[tags].sum(axis=1) == 1).all(): - for idx, row in df.iterrows(): + df_copy = df...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 29, 8749, 16, 28, 397, 29, 8749, 16, 2163, 22175, 1652, 866, 67, 3146, 67, 4156, 12, 2180, 30, 4863, 18, 25696,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 7934, 1347, 938, 2342, 1240, 460, 405, 404, 203, 1986, 938, 1047, 866, 27321, 364, 279, 2142, 434, 924, 422, 404, 16, 1496, 2342, 848, 1240, 924, 203, 3011, 2353, 404, 578, 374, 18, 12139, 326, 866, 471, 4542, 326, 1842, ...
Remove model region from ipm region list The model region has been added to the list of aggregate IPM regions elsewhere, but it raises an error here.
MODIFY powergenome/generators.py powergenome/generators.py @@ -2508,6 +2508,7 @@ def load_demand_response_efs_profile( ) dr_profile.columns = dr_profile.columns.droplevel() for mod_r, ipm_regs in region_aggregations.items(): + ipm_regs = [r for r in ipm_regs if r != mod_r] dr_profile[mod_r] = dr_profile[ipm_regs].sum(a...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 2947, 6840, 16, 26, 397, 2947, 6840, 16, 27, 22175, 1652, 1262, 67, 323, 889, 67, 2740, 67, 73, 2556, 67, 5040, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3288, 938, 3020, 628, 2359, 81, 3020, 666, 203, 1986, 938, 3020, 711, 2118, 3096, 358, 326, 666, 434, 7047, 2971, 49, 10085, 25795, 16, 203, 12885, 518, 14183, 392, 555, 2674, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100...
Add load from start_year using a different AEO data year As new AEO data is released, there is a growing gap between the first year with current EMM regions and the first year of data available from the newest AEO data. Fix this by getting data from the year after start_year.
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -219,6 +219,26 @@ def calc_growth_factors( for ipm_region in keep_regions } + # Check to make sure start_year is in the list of data years. If not, use data from + # the year after start_year + if start_year not in list(load_growth_dict.values())[0].in...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 22, 3657, 16, 26, 397, 22, 3657, 16, 5558, 22175, 1652, 7029, 67, 75, 492, 451, 67, 22108, 12, 203,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 1262, 628, 787, 67, 6874, 1450, 279, 3775, 432, 41, 51, 501, 3286, 203, 1463, 394, 432, 41, 51, 501, 353, 15976, 16, 1915, 353, 279, 13334, 310, 9300, 3086, 326, 1122, 3286, 203, 1918, 783, 7141, 49, 10085, 471, 326, 1122,...
Add windows to testing matrix
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -3,8 +3,8 @@ name: pytest on: [push] jobs: - build-linux: - runs-on: ubuntu-latest + build: + runs-on: ${{ matrix.os }} defaults: run: shell: bash @@ -12,6 +12,7 @@ jobs: max-parallel: 5 matrix: python-version: ["3.9", "3.10"] + os: [ubuntu-latest, win...
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 23, 16, 28, 397, 23, 16, 28, 22175, 508, 30, 2395, 3813, 203, 265, 30, 306, 6206,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 9965, 358, 7769, 3148, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Try to fix windows conda workflow Use the setup-miniconda action, hopefully with mamba
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -16,20 +16,27 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 + - uses: conda-incubator/setup-miniconda@v2 with: - python-version: 3.9 - - name: Add conda to system path - run: | - # $CONDA is an ...
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 2313, 16, 3462, 397, 2313, 16, 5324, 22175, 6550, 30, 203, 8986, 30, 203, 17, 4692,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7833, 358, 2917, 9965, 356, 2414, 6095, 203, 3727, 326, 3875, 17, 1154, 335, 1434, 69, 1301, 16, 27370, 4095, 598, 312, 2536, 69, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Switch to a GH for flake8 linting
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -40,13 +40,15 @@ jobs: - name: install powergenome run: | pip install -e . - - name: Lint with flake8 - run: | - mamba install flake8 - # stop the build if there are Python syntax errors or undefined names - flake8 . --count --select=E9,F63,F7,F82 --sh...
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 7132, 16, 3437, 397, 7132, 16, 3600, 22175, 6550, 30, 203, 17, 508, 30, 3799, 7212,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 10200, 358, 279, 611, 44, 364, 1183, 911, 28, 19477, 310, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Add flake8 exit-zero arg
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -42,6 +42,9 @@ jobs: pip install -e . - name: flake8 Lint uses: py-actions/flake8@v2 + with: + max-line-length: 127 + args: "--count --exit-zero --max-complexity=10 --statistics" # - name: Lint with flake8 # run: | # mamba install flake8
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 9452, 16, 26, 397, 9452, 16, 29, 22175, 6550, 30, 203, 16104, 3799, 300, 73, 263, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 1183, 911, 28, 2427, 17, 7124, 1501, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
activate pg env
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -21,6 +21,7 @@ jobs: mamba-version: "*" channels: conda-forge,defaults environment-file: environment.yml + activate-environment: powergenome # - name: Set up Python 3.9 # uses: actions/setup-python@v2 # with:
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 5340, 16, 26, 397, 5340, 16, 27, 22175, 6550, 30, 203, 81, 2536, 69, 17, 1589, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 10014, 7184, 1550, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Add todo issue
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -237,6 +237,7 @@ def add_cap_res_network(tx_df: pd.DataFrame, settings: dict) -> pd.DataFrame: for cap_res in settings.get("regional_capacity_reserves", {}): cap_res_num = int(cap_res.split("_")[-1]) # the number of the capres constraint policy_nums.append(cap_res_num) ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 4366, 27, 16, 26, 397, 4366, 27, 16, 27, 22175, 1652, 527, 67, 5909, 67, 455, 67, 5185, 12, 978, 67, 2180, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 10621, 5672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Fix and speed up no clustering Skip kmeans and assign each unit a cluster number. Skip weighted average calcs.
MODIFY powergenome/generators.py powergenome/generators.py @@ -1259,6 +1259,13 @@ def calc_unit_cluster_values(df, settings, technology=None): dataframe Aggragate values for generators in a technology cluster """ + # if not clustering units no need to calulate cluster average values + if df["cluster"].max() == len(df):...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 2138, 6162, 16, 26, 397, 2138, 6162, 16, 3437, 22175, 1652, 7029, 67, 4873, 67, 7967, 67, 2372, 12, 2180, 16, 1947, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 471, 8632, 731, 1158, 18743, 203, 6368, 417, 18408, 471, 2683, 1517, 2836, 279, 2855, 1300, 18, 203, 6368, 13747, 8164, 1443, 2143, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Fix bug with no-cluster/cluster columns to index
MODIFY powergenome/generators.py powergenome/generators.py @@ -2981,10 +2981,11 @@ class GeneratorClusters: # logger.info("Setting existing wind/pv using external file") # self.results = overwrite_wind_pv_capacity(self.results, self.settings) + for col in ["region", "technology", "cluster"]: + if col in self.results.in...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 5540, 11861, 16, 2163, 397, 5540, 11861, 16, 2499, 22175, 667, 10159, 13698, 30, 203, 7, 1194, 18, 1376, 2932, 5568, 2062...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 7934, 598, 1158, 17, 7967, 19, 7967, 2168, 358, 770, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Try different mamba install method Getting errors with the old/existing method
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -10,8 +10,8 @@ jobs: shell: bash strategy: max-parallel: 5 - matrix: - python-version: ["3.9", "3.10"] + # matrix: + # python-version: ["3.9", "3.10"] steps: - uses: actions/checkout@v2 @@ -19,16 +19,28 @@ jobs: uses: actions/setup-python@v2 with: pyth...
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 2163, 16, 28, 397, 2163, 16, 28, 22175, 6550, 30, 203, 10304, 30, 24817, 203, 14914...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7833, 3775, 312, 2536, 69, 3799, 707, 203, 19213, 1334, 598, 326, 1592, 19, 11711, 707, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
More GH attempts
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -28,8 +28,14 @@ jobs: channel-priority: true activate-environment: powergenome environment-file: environment.yml + auto-activate-base: false - run: | + conda activate powergenome conda info + conda list + conda config --show-sources + conda config --sh...
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 6030, 16, 28, 397, 6030, 16, 3461, 22175, 6550, 30, 203, 4327, 17, 8457, 30, 638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7417, 611, 44, 7531, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
More attepted fixes
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - shell: bash + shell: bash -l {0} strategy: max-parallel: 5 # matrix: @@ -28,9 +28,8 @@ jobs: channel-priority: true activate-environment: powergenome environment-file: environment.yml - auto-ac...
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 27, 16, 27, 397, 27, 16, 27, 22175, 6550, 30, 203, 20152, 17, 265, 30, 13910, 253...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7417, 622, 736, 337, 329, 24436, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Add option to load multiple settings files from folder
MODIFY powergenome/util.py powergenome/util.py @@ -22,11 +22,32 @@ logger = logging.getLogger(__name__) def load_settings(path: Union[str, Path]) -> dict: + """Load a YAML file or a dictionary of YAML files with settings parameters + Parameters + ---------- + path : Union[str, Path] + Name of the settings file or folde...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 1367, 18, 2074, 203, 12238, 23220, 19, 1367, 18, 2074, 203, 30989, 300, 3787, 16, 2499, 397, 3787, 16, 1578, 22175, 1194, 273, 2907, 18, 588, 3328, 12, 972, 529, 972, 13, 203, 536, 1262, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 1456, 358, 1262, 3229, 1947, 1390, 628, 3009, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Add load settings test (single/multiple files)
MODIFY tests/generation_test.py tests/generation_test.py @@ -183,6 +183,21 @@ class MockPudlOut: return bga +def test_load_single_settings(): + settings = load_settings( + DATA_PATHS["powergenome"].parent + / "example_systems" + / "CA_AZ" + / "test_settings_atb2020.yml" + ) + + +def test_load_multiple_settings(): + set...
[ 1, 6720, 12096, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 30989, 300, 31672, 16, 26, 397, 31672, 16, 5340, 22175, 667, 7867, 52, 1100, 80, 1182, 30, 203, 2463, 7611, 69, 203, 15, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 1262, 1947, 1842, 261, 7526, 19, 9622, 1390, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Add utc_offset parameter to model definition
MODIFY example_systems/CA_AZ/settings/model_definition.yml example_systems/CA_AZ/settings/model_definition.yml @@ -25,6 +25,10 @@ target_usd_year: 2020 model_year: [2030, 2045] model_first_planning_year: [2020, 2031] +# HOURS OFFSET FROM UTC +# All time profile data are stored in UTC. Provide an offset for the model ti...
[ 1, 6720, 12096, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 4272, 19, 2284, 67, 6907, 18, 10865, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 4272, 19, 2284, 67, 6907, 18, 10865, 203, 30989, 300, 2947, 16, 26, 397, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 9439, 67, 3348, 1569, 358, 938, 2379, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Remove cluster method and alt method params They aren't used and are only clutter right now
MODIFY example_systems/CA_AZ/settings/resources.yml example_systems/CA_AZ/settings/resources.yml @@ -14,9 +14,6 @@ capacity_col: winter_capacity_mw # of thermal plant as a default and then specify specific values for any regions # that are different. -# Won't show up if not listed here (expand) -cluster_method: kmeans ...
[ 1, 6720, 12096, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 4272, 19, 4683, 18, 10865, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 4272, 19, 4683, 18, 10865, 203, 30989, 300, 3461, 16, 29, 397, 3461, 16, 26, 22175, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3288, 2855, 707, 471, 3770, 707, 859, 203, 1315, 402, 11526, 1404, 1399, 471, 854, 1338, 927, 18220, 2145, 2037, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Copy split pg settings into a folder Previous behavior assumed a single settings file.
MODIFY powergenome/run_powergenome_multiple_outputs_cli.py powergenome/run_powergenome_multiple_outputs_cli.py @@ -159,7 +159,12 @@ def main(): settings = load_settings(path=args.settings_file) # Copy the settings file to results folder + if Path(args.settings_file).is_file(): shutil.copy(args.settings_file, out_folder...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 2681, 67, 12238, 23220, 67, 9622, 67, 12295, 67, 4857, 18, 2074, 203, 12238, 23220, 19, 2681, 67, 12238, 23220, 67, 9622, 67, 12295, 67, 4857, 18, 2074, 203, 30989, 300, 24872, 16, 27, 397, 248...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 2951, 1416, 7184, 1947, 1368, 279, 3009, 203, 8351, 6885, 12034, 279, 2202, 1947, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Don't specify which columns to keep. Users can add columns via atb_modifers, which will get dropped if not in list.
MODIFY powergenome/nrelatb.py powergenome/nrelatb.py @@ -1074,22 +1074,6 @@ def atb_new_generators(atb_costs, atb_hr, settings): cap_rec_years=new_gen_df["cap_recovery_years"], ) - keep_cols = [ - "technology", - "basis_year", - "Fixed_OM_Cost_per_MWyr", - "Fixed_OM_Cost_per_MWhyr", - "Var_OM_Cost_per_MWh", - "capex_mw...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 82, 2878, 270, 70, 18, 2074, 203, 12238, 23220, 19, 82, 2878, 270, 70, 18, 2074, 203, 30989, 300, 2163, 5608, 16, 3787, 397, 2163, 5608, 16, 26, 22175, 1652, 622, 70, 67, 2704, 67, 25959, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 22293, 1404, 4800, 1492, 2168, 358, 3455, 18, 203, 6588, 848, 527, 2168, 3970, 622, 70, 67, 1711, 430, 414, 16, 1492, 903, 336, 14611, 309, 486, 316, 666, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Missing "cluster" col caused error in tests
MODIFY powergenome/generators.py powergenome/generators.py @@ -3178,7 +3178,8 @@ class GeneratorClusters: add_genx_model_tags, self.settings ) self.new_generators = pd.concat([self.new_generators, dr_rows], sort=False) - + if "cluster" not in self.new_generators.columns: + self.new_generators["cluster"] = 1 self.new_ge...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 23, 4033, 28, 16, 27, 397, 23, 4033, 28, 16, 28, 22175, 667, 10159, 13698, 30, 203, 1289, 67, 4507, 92, 67, 2284, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 4841, 315, 7967, 6, 645, 15848, 555, 316, 7434, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Accept None (~) for region_aggregations param
MODIFY powergenome/generators.py powergenome/generators.py @@ -3121,7 +3121,7 @@ class GeneratorClusters: if group.profiles is None: # Resource group has no profiles continue - if row.region in self.settings.get("region_aggregations", {}): + if row.region in (self.settings.get("region_aggregations", {}) or {}): ipm_reg...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 23, 26009, 16, 27, 397, 23, 26009, 16, 27, 22175, 667, 10159, 13698, 30, 203, 430, 1041, 18, 18314, 353, 599, 30, 203, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 5933, 599, 261, 98, 13, 364, 3020, 67, 10751, 1012, 579, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Allow None value for regional hydro factors
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -1095,7 +1095,7 @@ def hydro_energy_to_power( avg_inflow > 1, 1 ) - for region, factor in regional_factors.items(): + for region, factor in (regional_factors or {}).items(): region_mask = df["region"] == region if region_mask.any(): avg_inflow = (
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 2163, 8778, 16, 27, 397, 2163, 8778, 16, 27, 22175, 1652, 4855, 9005, 67, 15358, 67, 869, 67, 12238, 12, 203, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7009, 599, 460, 364, 29734, 4855, 9005, 14490, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Update wiki docs for split settings
MODIFY wiki/settings.md wiki/settings.md @@ -51,6 +51,8 @@ Existing generating units are clustered within each region, with the default num If you want to combine technologies (maybe each individual technology has very little capacity), technology groups can be defined in `tech_groups`. Be sure to set `group_technologi...
[ 1, 6720, 12096, 203, 13044, 19, 4272, 18, 1264, 203, 13044, 19, 4272, 18, 1264, 203, 30989, 300, 10593, 16, 26, 397, 10593, 16, 28, 22175, 28257, 12516, 4971, 854, 2855, 329, 3470, 1517, 3020, 16, 598, 326, 805, 818, 203, 2047, 1846...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1891, 9050, 3270, 364, 1416, 1947, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Allow None regional hydro factor
MODIFY powergenome/run_powergenome_multiple_outputs_cli.py powergenome/run_powergenome_multiple_outputs_cli.py @@ -256,7 +256,7 @@ def main(): gen_clusters = hydro_energy_to_power( gen_clusters, _settings.get("hydro_factor"), - _settings.get("regional_hydro_factor"), + _settings.get("regional_hydro_factor", {}), ) # Sa...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 2681, 67, 12238, 23220, 67, 9622, 67, 12295, 67, 4857, 18, 2074, 203, 12238, 23220, 19, 2681, 67, 12238, 23220, 67, 9622, 67, 12295, 67, 4857, 18, 2074, 203, 30989, 300, 5034, 16, 27, 397, 5034...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7009, 599, 29734, 4855, 9005, 5578, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Fix pytest GH Not using an OS matrix, need to specify ubuntu-latest
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -4,7 +4,7 @@ on: [push] jobs: build: - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest defaults: run: shell: bash -l {0} @@ -34,16 +34,6 @@ jobs: conda config --show-sources conda config --show printenv | sort - # - name: Add conda to system path - ...
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 24, 16, 27, 397, 24, 16, 27, 22175, 603, 30, 306, 6206, 65, 203, 10088, 30, 203, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 2395, 3813, 611, 44, 203, 1248, 1450, 392, 5932, 3148, 16, 1608, 358, 4800, 13910, 25348, 17, 13550, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Set param to empty dict if None If "regional_capacity_reserves" was missing it would become an empty dict, but if it is None then a TypeError will be raised (not iterable).
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -234,7 +234,7 @@ def add_cap_res_network(tx_df: pd.DataFrame, settings: dict) -> pd.DataFrame: # Loop through capacity reserve constraints (CapRes_*) and determine network # parameters for each - for cap_res in settings.get("regional_capacity_reserves", {}): + for cap_r...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 17959, 16, 27, 397, 17959, 16, 27, 22175, 1652, 527, 67, 5909, 67, 455, 67, 5185, 12, 978, 67, 2180, 30, 4863, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 694, 579, 358, 1008, 2065, 309, 599, 203, 2047, 315, 6858, 287, 67, 16017, 67, 455, 264, 3324, 6, 1703, 3315, 518, 4102, 12561, 392, 1008, 2065, 16, 203, 12885, 309, 518, 353, 599, 1508, 279, 3580, 903, 506, 11531, 261, 902, 60...
Fix glob search of pop weight filename
MODIFY powergenome/load_construction.py powergenome/load_construction.py @@ -338,7 +338,7 @@ def AddElectrification( except: pass # Creating Time-series - pop_files = path_in.glob("pop_weight*") + pop_files = path_in.glob("*pop_weight*") newest_pop_file = max(pop_files, key=os.path.getctime) pop = load_region_pop_frac(...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 591, 4549, 18, 2074, 203, 12238, 23220, 19, 945, 67, 591, 4549, 18, 2074, 203, 30989, 300, 3707, 28, 16, 27, 397, 3707, 28, 16, 27, 22175, 1652, 1436, 17817, 86, 1480, 12, 203, 14137...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 4715, 1623, 434, 1843, 3119, 1544, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Bug fix: retain "cluster" col for existing gen Previous change made it the index, where it gets dropped. The unique cluster num is needed for gen variability and time reduction.
MODIFY powergenome/generators.py powergenome/generators.py @@ -1291,7 +1291,7 @@ def calc_unit_cluster_values( cap_diff = start_cap - end_cap logger.warning(f"dropped {cap_diff}MW because of null heat rate values") - df_values = df.groupby("cluster").agg( + df_values = df.groupby("cluster", as_index=False).agg( { capac...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 2138, 12416, 16, 27, 397, 2138, 12416, 16, 27, 22175, 1652, 7029, 67, 4873, 67, 7967, 67, 2372, 12, 203, 5909, 67, 5413...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 30, 15096, 315, 7967, 6, 645, 364, 2062, 3157, 203, 8351, 2549, 7165, 518, 326, 770, 16, 1625, 518, 5571, 14611, 18, 1021, 3089, 2855, 203, 2107, 353, 3577, 364, 3157, 1394, 2967, 471, 813, 20176, 18, 2, -100, -100, ...
sort load profiles
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -230,6 +230,10 @@ def make_final_load_curves( final_load_curves = final_load_curves.astype(int) + # change order to match model regions + model_regions = settings.get("model_regions") + final_load_curves = final_load_curves[model_regions] + return fina...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 29157, 16, 26, 397, 29157, 16, 2163, 22175, 1652, 1221, 67, 6385, 67, 945, 67, 1397, 3324, 12, 203, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3804, 1262, 11788, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Define a few variables to None if there is not an emission_policies_fn to avoid NameError
MODIFY powergenome/run_powergenome_multiple_outputs_cli.py powergenome/run_powergenome_multiple_outputs_cli.py @@ -396,6 +396,9 @@ def main(): if _settings.get("emission_policies_fn"): energy_share_req = create_policy_req(_settings, col_str_match="ESR") co2_cap = create_policy_req(_settings, col_str_match="CO_2") + els...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 2681, 67, 12238, 23220, 67, 9622, 67, 12295, 67, 4857, 18, 2074, 203, 12238, 23220, 19, 2681, 67, 12238, 23220, 67, 9622, 67, 12295, 67, 4857, 18, 2074, 203, 30989, 300, 5520, 26, 16, 26, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 11644, 279, 11315, 3152, 358, 599, 309, 1915, 353, 486, 392, 801, 19710, 67, 17407, 67, 4293, 358, 4543, 25473, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
include reverse direction of user inputted tx lines
MODIFY powergenome/transmission.py powergenome/transmission.py @@ -38,9 +38,17 @@ def agg_transmission_constraints( / settings["user_transmission_constraints_fn"] ) + # user constraints are needed bidirectionaly transmission_constraints_table = pd.concat( - [transmission_constraints_table, user_tx_constraints] + [ + tr...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 2338, 3951, 18, 2074, 203, 12238, 23220, 19, 2338, 3951, 18, 2074, 203, 30989, 300, 7414, 16, 29, 397, 7414, 16, 4033, 22175, 1652, 10421, 67, 2338, 3951, 67, 11967, 12, 203, 19, 1947, 9614, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 6702, 4219, 4068, 434, 729, 810, 2344, 2229, 2362, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Add missing parameter with input data path
MODIFY powergenome/load_construction.py powergenome/load_construction.py @@ -370,7 +370,7 @@ def AddElectrification( subsector_ts_dfs = {} for name, (sector, subsector) in running_sectors.items(): subsector_ts_dfs[name] = create_subsector_ts( - sector, subsector, year, scenario_stock + sector, subsector, year, scenario...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 591, 4549, 18, 2074, 203, 12238, 23220, 19, 945, 67, 591, 4549, 18, 2074, 203, 30989, 300, 6418, 20, 16, 27, 397, 6418, 20, 16, 27, 22175, 1652, 1436, 17817, 86, 1480, 12, 203, 1717,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 3315, 1569, 598, 810, 501, 589, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Add test of user tx constraints
MODIFY tests/generation_test.py tests/generation_test.py @@ -730,3 +730,24 @@ def test_hydro_energy_to_power(): assert df.equals(df_hydro_ratio[df.columns]) hydro_ratio = pd.Series([2, 0, 0, 1, 0, 0, 1.2]) assert hydro_ratio.equals(df_hydro_ratio["Hydro_Energy_to_Power_Ratio"]) + + +def test_usr_tx(tmp_path): + setting...
[ 1, 6720, 12096, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 30989, 300, 27, 5082, 16, 23, 397, 27, 5082, 16, 3247, 22175, 1652, 1842, 67, 18112, 9005, 67, 15358, 67, 869, 67, 12238, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 1842, 434, 729, 2229, 6237, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
change sqlite prefix based on operating system
MODIFY tests/generation_test.py tests/generation_test.py @@ -82,12 +82,16 @@ logger.addHandler(handler) # pg_engine = sqlalchemy.create_engine( # "sqlite:////" + str(DATA_PATHS["test_data"] / "pg_misc_tables.sqlite3") # ) - +if os.name == "nt": + # if user is using a windows system + sql_prefix = "sqlite:///" +else: + ...
[ 1, 6720, 12096, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 30989, 300, 11149, 16, 2138, 397, 11149, 16, 2313, 22175, 1194, 18, 1289, 1503, 12, 4176, 13, 203, 7, 7184, 67, 8944, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3427, 16184, 1633, 2511, 603, 16929, 2619, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Bug fix: incorrect param name for read csv
MODIFY powergenome/load_construction.py powergenome/load_construction.py @@ -145,7 +145,7 @@ def load_region_pop_frac( # how much state load should be distributed to GenXRegion pop_cols = ["ipm_region", "state", "state_prop"] if (path_in / fn).suffix == ".csv": - pop = pd.read_csv(path_in / fn, columns=pop_cols) + pop ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 591, 4549, 18, 2074, 203, 12238, 23220, 19, 945, 67, 591, 4549, 18, 2074, 203, 30989, 300, 30379, 16, 27, 397, 30379, 16, 27, 22175, 1652, 1262, 67, 6858, 67, 5120, 67, 22187, 12, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 30, 11332, 579, 508, 364, 855, 6101, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Search for region names in user_region_geodata_fn with the property 'name'
MODIFY powergenome/generators.py powergenome/generators.py @@ -1398,6 +1398,19 @@ def load_ipm_shapefile(settings, path=IPM_GEOJSON_PATH): user_regions = gpd.read_file( Path(settings["input_folder"]) / settings["user_region_geodata_fn"] ) + try: + # The rest of PowerGenome uses the column "IPM_Region" for the name of +...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 3437, 10689, 16, 26, 397, 3437, 10689, 16, 3657, 22175, 1652, 1262, 67, 625, 81, 67, 4867, 768, 12, 4272, 16, 589, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 2979, 364, 3020, 1257, 316, 729, 67, 6858, 67, 908, 18229, 67, 4293, 598, 326, 1272, 296, 529, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
add IPM_only option to util.regions_to_keep()
MODIFY powergenome/util.py powergenome/util.py @@ -596,7 +596,7 @@ def find_centroid(gdf): return centroid -def regions_to_keep(settings: dict) -> Tuple[list, dict]: +def regions_to_keep(settings: dict, IPM_only=False) -> Tuple[list, dict]: """Create a list of all IPM regions that are used in the model, either as singl...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 1367, 18, 2074, 203, 12238, 23220, 19, 1367, 18, 2074, 203, 30989, 300, 6162, 26, 16, 27, 397, 6162, 26, 16, 27, 22175, 1652, 1104, 67, 2998, 5560, 12, 75, 2180, 4672, 203, 2463, 16767, 203, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1289, 2971, 49, 67, 3700, 1456, 358, 1709, 18, 15923, 67, 869, 67, 10102, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
adjust index of user load to match make_load_curves()
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -181,6 +181,9 @@ def load_usr_demand_profiles(settings): if len(hourly_load_profiles) == 8784: remove_feb_29(hourly_load_profiles) + hourly_load_profiles.index.name = "time_index" + hourly_load_profiles.index = hourly_load_profiles.index + 1 + return h...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 2643, 21, 16, 26, 397, 2643, 21, 16, 29, 22175, 1652, 1262, 67, 13640, 67, 323, 889, 67, 18314, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 13362, 770, 434, 729, 1262, 358, 845, 1221, 67, 945, 67, 1397, 3324, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Add option for AEO load sector type e.g. residential, commercial, industrial...
MODIFY powergenome/eia_opendata.py powergenome/eia_opendata.py @@ -258,7 +258,10 @@ def add_user_fuel_prices(settings: dict, df: pd.DataFrame = None) -> pd.DataFram def get_aeo_load( - region: str, aeo_year: Union[str, numeric], scenario_series: str + region: str, + aeo_year: Union[str, numeric], + scenario_series: str...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 73, 1155, 67, 556, 409, 396, 18, 2074, 203, 12238, 23220, 19, 73, 1155, 67, 556, 409, 396, 18, 2074, 203, 30989, 300, 2947, 28, 16, 27, 397, 2947, 28, 16, 2163, 22175, 1652, 527, 67, 1355, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 1456, 364, 432, 41, 51, 1262, 16323, 618, 203, 73, 18, 75, 18, 10043, 2001, 16, 1543, 12610, 649, 16, 1547, 407, 17493, 2777, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
Make EFS the default data source I'm still not sure if this is the best implementation but will stick with it for now.
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -25,8 +25,8 @@ def filter_load_by_region(load_source): # "decorator factory" If settings["regional_load_source"] exists and settings["regional_load_source"][load_source] is null, return None. - If settings["regional_load_source"] DNE, return the load p...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 2947, 16, 28, 397, 2947, 16, 28, 22175, 1652, 1034, 67, 945, 67, 1637, 67, 6858, 12, 945, 67, 3168,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 6464, 512, 4931, 326, 805, 501, 1084, 203, 45, 17784, 4859, 486, 3071, 309, 333, 353, 326, 3796, 4471, 1496, 903, 25608, 598, 518, 364, 2037, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Reset user load index, check for same index Start at 1, matching database load tables. Check to make sure all load curves have identical indices.
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -482,7 +482,9 @@ def load_usr_demand_profiles(settings): remove_feb_29(hourly_load_profiles) hourly_load_profiles.index.name = "time_index" - hourly_load_profiles.index = hourly_load_profiles.index + 1 + hourly_load_profiles.index = pd.RangeIndex( + st...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 8875, 22, 16, 27, 397, 8875, 22, 16, 29, 22175, 1652, 1262, 67, 13640, 67, 323, 889, 67, 18314, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7013, 729, 1262, 770, 16, 866, 364, 1967, 770, 203, 1685, 622, 404, 16, 3607, 2063, 1262, 4606, 18, 203, 1564, 358, 1221, 3071, 777, 1262, 24106, 1240, 12529, 4295, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Add multi-source load test, check regions in user file.
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -485,6 +485,11 @@ def load_usr_demand_profiles(settings): regional_load_sources = settings.get("regional_load_source") if regional_load_sources is not None: cols = regional_load_sources.get("USER") + if not all([col in hourly_load_profiles.columns for ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 24, 7140, 16, 26, 397, 24, 7140, 16, 2499, 22175, 1652, 1262, 67, 13640, 67, 323, 889, 67, 18314, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 3309, 17, 3168, 1262, 1842, 16, 866, 10085, 316, 729, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Finish tx value col warning message
MODIFY powergenome/transmission.py powergenome/transmission.py @@ -67,7 +67,7 @@ def agg_transmission_constraints( "No transmission value column (e.g. firm vs non-firm) was specified in the " "settings. The column 'firm_ttc_mw' will be used as a default. This is a change " "from previous versions of PG, where 'nonfirm_...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 2338, 3951, 18, 2074, 203, 12238, 23220, 19, 2338, 3951, 18, 2074, 203, 30989, 300, 9599, 16, 27, 397, 9599, 16, 27, 22175, 1652, 10421, 67, 2338, 3951, 67, 11967, 12, 203, 6, 2279, 27940, 460,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 11641, 2229, 460, 645, 3436, 883, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Add Braden to the zenodo author list
MODIFY .zenodo.json .zenodo.json "name": "Aneesha Manocha", "affiliation": "Princeton University" }, + { + "name": "Braden Pecora", + "affiliation": "IdeaSmiths LLC", + "orcid": "0000-0003-3555-3708" + }, { "name": "Jesse D. Jenkins", "affiliation": "Princeton University",
[ 1, 6720, 12096, 203, 18, 8396, 7370, 18, 1977, 203, 18, 8396, 7370, 18, 1977, 203, 6, 529, 6877, 315, 979, 25521, 3395, 8660, 83, 8838, 3113, 203, 6, 7329, 16278, 6877, 315, 2050, 9523, 278, 265, 1351, 6760, 560, 6, 203, 5779, 203...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 605, 6012, 275, 358, 326, 22759, 7370, 2869, 666, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Add Riti to zenodo authors list for EFS work.
MODIFY .zenodo.json .zenodo.json "affiliation": "IdeaSmiths LLC", "orcid": "0000-0003-3555-3708" }, + { + "name": "Riti Bhandarkar", + "affiliation": "Princeton University", + "orcid": "0000-0003-3888-2144" + }, { "name": "Jesse D. Jenkins", "affiliation": "Princeton University",
[ 1, 6720, 12096, 203, 18, 8396, 7370, 18, 1977, 203, 18, 8396, 7370, 18, 1977, 203, 6, 7329, 16278, 6877, 315, 45, 323, 69, 9552, 483, 87, 511, 13394, 3113, 203, 6, 280, 13478, 6877, 315, 2787, 17, 30770, 17, 23, 2539, 25, 17, 64...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 534, 305, 77, 358, 22759, 7370, 14494, 666, 364, 512, 4931, 1440, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Fix CPI bug When deflating costs, need to check if both the base and target years are in data.
MODIFY powergenome/price_adjustment.py powergenome/price_adjustment.py @@ -192,7 +192,7 @@ def inflation_price_adjustment( target_year = int(target_year) cpi_data = load_cpi_data() - if cpi_data["year"].max() < target_year: + if cpi_data["year"].max() < max(target_year, base_year): logger.info("Updating CPI data") cpi_...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 8694, 67, 13362, 475, 18, 2074, 203, 12238, 23220, 19, 8694, 67, 13362, 475, 18, 2074, 203, 30989, 300, 15561, 16, 27, 397, 15561, 16, 27, 22175, 1652, 13947, 367, 67, 8694, 67, 13362, 475, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 385, 1102, 7934, 203, 9434, 1652, 80, 1776, 22793, 16, 1608, 358, 866, 309, 3937, 326, 1026, 471, 1018, 11387, 203, 834, 316, 501, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Bug fix load profiles
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -579,6 +579,7 @@ def make_final_load_curves( for load_source, load_table in load_sources.items() ] load_curves_before_dr.append(user_load_curves) + load_curves_before_dr = [df for df in load_curves_before_dr if df is not None] if not all( [ len(load_cu...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 25, 7235, 16, 26, 397, 25, 7235, 16, 27, 22175, 1652, 1221, 67, 6385, 67, 945, 67, 1397, 3324, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 1262, 11788, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Bug fix user flexible load Need to make a list because dict_keys is not subscriptable.
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -446,7 +446,9 @@ def add_load_growth(load_curves: pd.DataFrame, settings: dict) -> pd.DataFrame: def add_demand_response_resource_load(load_curves, settings): dr_path = Path(settings["input_folder"]) / settings["demand_response_fn"] - dr_types = settin...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 6334, 26, 16, 27, 397, 6334, 26, 16, 29, 22175, 1652, 527, 67, 945, 67, 75, 492, 451, 12, 945, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 729, 16600, 1523, 1262, 203, 14112, 358, 1221, 279, 666, 2724, 2065, 67, 2452, 353, 486, 31855, 429, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Bug fix for flex resource model tags Don't add model tags until after flex resources are added!
MODIFY powergenome/generators.py powergenome/generators.py @@ -3256,7 +3256,6 @@ class GeneratorClusters: self.new_generators.pipe(startup_fuel, self.settings) .pipe(add_fuel_labels, self.fuel_prices, self.settings) .pipe(startup_nonfuel_costs, self.settings) - .pipe(add_genx_model_tags, self.settings) ) if self.sort_g...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 1578, 4313, 16, 27, 397, 1578, 4313, 16, 26, 22175, 667, 10159, 13698, 30, 203, 2890, 18, 2704, 67, 25959, 18, 14772, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 364, 16600, 1058, 938, 2342, 203, 22293, 1404, 527, 938, 2342, 3180, 1839, 16600, 2703, 854, 3096, 5, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Avoid warning if all load data from user
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -557,6 +557,10 @@ def make_final_load_curves( logger.info("Loading load curves") user_load_curves = load_usr_demand_profiles(settings) + if all([r in user_load_curves.columns for r in settings["model_regions"]]): + load_curves_before_dr = user_load_cur...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 2539, 27, 16, 26, 397, 2539, 27, 16, 2163, 22175, 1652, 1221, 67, 6385, 67, 945, 67, 1397, 3324, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3769, 839, 3436, 309, 777, 1262, 501, 628, 729, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Fix when no user demand data is loaded
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -557,7 +557,9 @@ def make_final_load_curves( logger.info("Loading load curves") user_load_curves = load_usr_demand_profiles(settings) - if all([r in user_load_curves.columns for r in settings["model_regions"]]): + if user_load_curves is not None and al...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 2539, 27, 16, 27, 397, 2539, 27, 16, 29, 22175, 1652, 1221, 67, 6385, 67, 945, 67, 1397, 3324, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 1347, 1158, 729, 23653, 501, 353, 4203, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Conditional to avoid error if instead of a dictionary
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -511,6 +511,9 @@ def load_usr_demand_profiles(settings): regional_load_sources = settings.get("regional_load_source") if regional_load_sources is not None: + if regional_load_sources == "USER": + cols = settings.get("model_regions") + else: cols = regi...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 25, 2499, 16, 26, 397, 25, 2499, 16, 29, 22175, 1652, 1262, 67, 13640, 67, 323, 889, 67, 18314, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 14132, 358, 4543, 555, 309, 225, 3560, 434, 279, 3880, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Rename energy capacity col in existing generators Set up function to rename multiple columns. In the future, have PG names for columns that are renamed for GenX and other models.
MODIFY powergenome/GenX.py powergenome/GenX.py @@ -1109,3 +1109,34 @@ def hydro_energy_to_power( ] = avg_inflow.where(avg_inflow > 1, 1) df["Hydro_Energy_to_Power_Ratio"] = df["Hydro_Energy_to_Power_Ratio"].fillna(0) return df + + +def rename_gen_cols( + df: pd.DataFrame, rename_cols: Dict[str, str] = None +) -> pd.Dat...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 12238, 23220, 19, 7642, 60, 18, 2074, 203, 30989, 300, 17506, 29, 16, 23, 397, 17506, 29, 16, 5026, 22175, 1652, 4855, 9005, 67, 15358, 67, 869, 67, 12238, 12, 203, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 16019, 12929, 7519, 645, 316, 2062, 13327, 203, 694, 731, 445, 358, 6472, 3229, 2168, 18, 657, 326, 3563, 16, 1240, 22116, 1257, 203, 1884, 2168, 716, 854, 17657, 364, 10938, 60, 471, 1308, 3679, 18, 2, -100, -100, -100, -100, -1...
Fix capacity_mwh bug - use sum in group not avg
MODIFY powergenome/generators.py powergenome/generators.py @@ -1301,7 +1301,7 @@ def calc_unit_cluster_values( df_values = df.groupby("cluster", as_index=False).agg( { capacity_col: "mean", - "capacity_mwh": wm, + "capacity_mwh": "sum", "minimum_load_mw": "mean", "heat_rate_mmbtu_mwh": wm, "Fixed_OM_Cost_per_MWyr": wm,...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 3437, 1611, 16, 27, 397, 3437, 1611, 16, 27, 22175, 1652, 7029, 67, 4873, 67, 7967, 67, 2372, 12, 203, 2180, 67, 2372, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 7519, 67, 81, 3350, 7934, 300, 999, 2142, 316, 1041, 486, 11152, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Add storage duration for existing batteries with no data
MODIFY example_systems/CA_AZ/settings/resources.yml example_systems/CA_AZ/settings/resources.yml @@ -119,6 +119,10 @@ regional_hydro_factor: # name is contained in the dataframe technology name. energy_storage_duration: Hydroelectric Pumped Storage: 15.5 + Batteries: + CA_S: 4 + CA_N: 4 + WECC_AZ: 2 # Generator cost da...
[ 1, 6720, 12096, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 4272, 19, 4683, 18, 10865, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 4272, 19, 4683, 18, 10865, 203, 30989, 300, 23635, 16, 26, 397, 23635, 16, 2163, 22175,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 2502, 3734, 364, 2062, 324, 9293, 606, 598, 1158, 501, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Fix test bug Make parent dir for aeo open data series
MODIFY powergenome/eia_opendata.py powergenome/eia_opendata.py @@ -36,7 +36,7 @@ def load_aeo_series(series_id: str, api_key: str, columns: list = None) -> pd.Da Data from EIA's AEO via their open data API. """ data_dir = DATA_PATHS["eia"] / "open_data" - data_dir.mkdir(exist_ok=True) + data_dir.mkdir(parents=True, exi...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 73, 1155, 67, 556, 409, 396, 18, 2074, 203, 12238, 23220, 19, 73, 1155, 67, 556, 409, 396, 18, 2074, 203, 30989, 300, 5718, 16, 27, 397, 5718, 16, 27, 22175, 1652, 1262, 67, 69, 4361, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 1842, 7934, 203, 6464, 982, 1577, 364, 279, 4361, 1696, 501, 4166, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Remove test assert of warning text failing GH action The assertion test passes on my local machine. It's just the text of a warning, don't worry about it for now.
MODIFY tests/fuel_test.py tests/fuel_test.py @@ -190,7 +190,7 @@ def test_fetch_fuel_price_errors(fuel_settings, caplog): fuel_settings["eia_series_scenario_names"] = eia_series_scenario_names caplog.set_level(logging.WARNING) fetch_fuel_prices(fuel_settings) - assert "Unable to inflate fuel prices" in caplog.text + # ...
[ 1, 6720, 12096, 203, 16341, 19, 74, 20317, 67, 3813, 18, 2074, 203, 16341, 19, 74, 20317, 67, 3813, 18, 2074, 203, 30989, 300, 30454, 16, 27, 397, 30454, 16, 27, 22175, 1652, 1842, 67, 5754, 67, 74, 20317, 67, 8694, 67, 4324, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 3288, 1842, 1815, 434, 3436, 977, 21311, 611, 44, 1301, 203, 1986, 11240, 1842, 11656, 603, 3399, 1191, 5228, 18, 2597, 1807, 2537, 326, 977, 434, 279, 3436, 16, 2727, 1404, 26784, 2973, 518, 364, 2037, 18, 2, -100, -100, -100, -...
Fix bug from testing
MODIFY powergenome/generators.py powergenome/generators.py @@ -2029,6 +2029,11 @@ def add_fuel_labels(df, fuel_prices, settings): DataFrame Same as input, but with a new column "Fuel" that is either the name of the corresponding fuel (coal, natural_gas, uranium, or distillate) or "None". + + Raises + ------ + KeyError ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 18212, 29, 16, 26, 397, 18212, 29, 16, 2499, 22175, 1652, 527, 67, 74, 20317, 67, 5336, 12, 2180, 16, 284, 20317, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 7934, 628, 7769, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Update pg_misc database link
MODIFY README.md README.md @@ -22,7 +22,7 @@ The goal of PowerGenome is to let a user make all of these choices in a settings ## Data -PowerGenome uses data from a number of different sources, including EIA, NREL, and EPA. The data are accessed through a combination of sqlite databases, CSV files, and parquet data file...
[ 1, 6720, 12096, 203, 6949, 958, 18, 1264, 203, 6949, 958, 18, 1264, 203, 30989, 300, 3787, 16, 27, 397, 3787, 16, 27, 22175, 1021, 17683, 434, 23783, 7642, 1742, 353, 358, 2231, 279, 729, 1221, 777, 434, 4259, 7246, 316, 279, 1947, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1891, 7184, 67, 23667, 2063, 1692, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Try provision with micromamba GH action
MODIFY .github/workflows/pytest.yml .github/workflows/pytest.yml @@ -15,19 +15,10 @@ jobs: steps: - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + - name: Install Conda environment with Micromamba + uses: mamba-org/provision-with-micromamba@main with: - python-version: 3.9 - - name: mamba - us...
[ 1, 6720, 12096, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 18, 6662, 19, 13815, 87, 19, 2074, 3813, 18, 10865, 203, 30989, 300, 3600, 16, 3657, 397, 3600, 16, 2163, 22175, 6550, 30, 203, 8986, 30, 203, 17, 4692,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 7833, 10595, 598, 312, 335, 520, 2536, 69, 611, 44, 1301, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
Import Tuple from typing
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -5,7 +5,7 @@ Hourly demand profiles import logging from inspect import signature from pathlib import Path -from typing import Dict, List +from typing import Dict, List, Tuple import numpy as np import pandas as pd
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 25, 16, 27, 397, 25, 16, 27, 22175, 20268, 715, 23653, 11788, 203, 5666, 2907, 203, 2080, 5334, 1930,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 5010, 7257, 628, 13408, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
bug fix of load profile preparation. add condition of testing "regional_load_includes_demand_response"
MODIFY powergenome/load_profiles.py powergenome/load_profiles.py @@ -598,6 +598,9 @@ def make_final_load_curves( raise ValueError("All load curves are null.") if settings.get("demand_response_fn"): + if settings.get("regional_load_includes_demand_response"): + load_curves_before_dg = load_curves_before_dr + else: load_...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 12238, 23220, 19, 945, 67, 18314, 18, 2074, 203, 30989, 300, 6162, 28, 16, 26, 397, 6162, 28, 16, 29, 22175, 1652, 1221, 67, 6385, 67, 945, 67, 1397, 3324, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 925, 2917, 434, 1262, 3042, 31981, 18, 203, 1289, 2269, 434, 7769, 315, 6858, 287, 67, 945, 67, 18499, 67, 323, 889, 67, 2740, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
BUG FIX: wrong start fuel caps
MODIFY powergenome/generators.py powergenome/generators.py @@ -199,9 +199,9 @@ def startup_fuel(df: pd.DataFrame, settings: dict) -> pd.DataFrame: Returns ------- DataFrame - Modified dataframe with the new column "Start_fuel_MMBTU_per_MW". + Modified dataframe with the new column "Start_Fuel_MMBTU_per_MW". """ - df["S...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 19818, 16, 29, 397, 19818, 16, 29, 22175, 1652, 11850, 67, 74, 20317, 12, 2180, 30, 4863, 18, 25696, 16, 1947, 30, 2065...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 4827, 8563, 30, 7194, 787, 284, 20317, 15788, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Specify RG metadata column dtype on read The column "metro_id" is usually mixed dtype, which is slower to read. Set it as str.
MODIFY powergenome/resource_clusters.py powergenome/resource_clusters.py @@ -309,7 +309,7 @@ class Table: cache = columns is None read_columns = None if cache else columns if self.format == "csv": - df = pd.read_csv(self.path, usecols=read_columns) + df = pd.read_csv(self.path, usecols=read_columns, dtype={"metro_id": ...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 3146, 67, 16806, 18, 2074, 203, 12238, 23220, 19, 3146, 67, 16806, 18, 2074, 203, 30989, 300, 5082, 29, 16, 27, 397, 5082, 29, 16, 27, 22175, 667, 3555, 30, 203, 2493, 273, 2168, 353, 599, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19302, 534, 43, 1982, 1057, 3182, 603, 855, 203, 1986, 1057, 315, 10578, 303, 67, 350, 6, 353, 11234, 7826, 3182, 16, 1492, 353, 27926, 358, 855, 18, 1000, 518, 487, 609, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
Minor example settings updates
MODIFY example_systems/CA_AZ/settings/resource_tags.yml example_systems/CA_AZ/settings/resource_tags.yml @@ -72,7 +72,8 @@ model_tag_values: Batteries: 1 Hydroelectric Pumped Storage: 1 FLEX: - ev_load_shifting: 1 + res_water_heat: 1 + trans_light_duty: 1 HYDRO: Conventional Hydroelectric: 1 Hydropower: 1 MODIFY exam...
[ 1, 6720, 12096, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 4272, 19, 3146, 67, 4156, 18, 10865, 203, 8236, 67, 4299, 87, 19, 3587, 67, 26315, 19, 4272, 19, 3146, 67, 4156, 18, 10865, 203, 30989, 300, 9060, 16, 27, 397, 90...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19549, 3454, 1947, 4533, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Reduce EIA API calls for fuel price in test. Also update to AEO 2022 to make sure API V2 works.
MODIFY tests/generation_test.py tests/generation_test.py @@ -488,28 +488,17 @@ def test_existing_gen_profiles(): retirement_ages={tech: 200 for tech in technologies}, atb_data_year=2022, atb_existing_year=2020, - fuel_eia_aeo_year=2020, + fuel_eia_aeo_year=2022, load_eia_aeo_year=2020, - aeo_fuel_usd_year=2019, + aeo_f...
[ 1, 6720, 12096, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 16341, 19, 25514, 67, 3813, 18, 2074, 203, 30989, 300, 24, 5482, 16, 6030, 397, 24, 5482, 16, 4033, 22175, 1652, 1842, 67, 11711, 67, 4507, 67, 18314, 13332, 203, 1349,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 12944, 512, 15188, 1491, 4097, 364, 284, 20317, 6205, 316, 1842, 18, 203, 1067, 2048, 1089, 358, 432, 41, 51, 26599, 22, 358, 1221, 3071, 1491, 776, 22, 6330, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Add gens from 860m to plant_region_map Some existing generators are missing from the NEEDS database mapping. Add them when getting the gens from 860m. Needed for capacity factor calculations. Also use the units_model region assignment in CF calculations
MODIFY powergenome/generators.py powergenome/generators.py @@ -1839,6 +1839,7 @@ def import_proposed_generators( "minimum_load_mw", "operational_status_code", "heat_rate_mmbtu_mwh", + "planned_operating_year", "retirement_year", ] @@ -3018,6 +3019,18 @@ class GeneratorClusters: settings=self.settings, model_regions_gdf...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 2643, 5520, 16, 26, 397, 2643, 5520, 16, 27, 22175, 1652, 1930, 67, 685, 7423, 67, 25959, 12, 203, 6, 15903, 67, 945, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 986, 314, 773, 628, 1725, 4848, 81, 358, 886, 970, 67, 6858, 67, 1458, 203, 17358, 2062, 13327, 854, 3315, 628, 326, 12901, 2056, 55, 2063, 2874, 18, 1436, 2182, 1347, 8742, 326, 314, 773, 628, 1725, 4848, 81, 18, 26480, 364, 7...
Bug fix - assign returned value
MODIFY powergenome/eia_opendata.py powergenome/eia_opendata.py @@ -134,7 +134,7 @@ def load_aeo_series(series_id: str, api_key: str, columns: list = None) -> pd.Da columns=["year", "price"], ) except FileNotFoundError: - read_eia_api(series_id, api_key, columns) + df = read_eia_api(series_id, api_key, columns) return d...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 73, 1155, 67, 556, 409, 396, 18, 2074, 203, 12238, 23220, 19, 73, 1155, 67, 556, 409, 396, 18, 2074, 203, 30989, 300, 25213, 16, 27, 397, 25213, 16, 27, 22175, 1652, 1262, 67, 69, 4361, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 19865, 2917, 300, 2683, 2106, 460, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Make arg type more specific Input shoudl be a sequence of strings, not just any iterator.
MODIFY powergenome/util.py powergenome/util.py @@ -878,7 +878,7 @@ def deep_freeze_args(func): return wrapped -def find_region_col(cols: Union[pd.Index, Iterable], context: str = None) -> str: +def find_region_col(cols: Union[pd.Index, List[str]], context: str = None) -> str: """Find the column name that identifies reg...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 1367, 18, 2074, 203, 12238, 23220, 19, 1367, 18, 2074, 203, 30989, 300, 28, 8285, 16, 27, 397, 28, 8285, 16, 27, 22175, 1652, 4608, 67, 29631, 67, 1968, 12, 644, 4672, 203, 2463, 5805, 203, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 6464, 1501, 618, 1898, 2923, 203, 1210, 699, 83, 1100, 80, 506, 279, 3102, 434, 2064, 16, 486, 2537, 1281, 2775, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
Improve error for dup col names in merge
MODIFY powergenome/resource_clusters.py powergenome/resource_clusters.py @@ -1392,7 +1392,9 @@ def get_merge_columns(merge: dict, df: pd.DataFrame = None) -> list: + (merge.get("uniques") or []) ) if len(columns) > len(set(columns)): - raise ValueError("Column names duplicated in merge") + visited = set() + dup = [x fo...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 3146, 67, 16806, 18, 2074, 203, 12238, 23220, 19, 3146, 67, 16806, 18, 2074, 203, 30989, 300, 3437, 9975, 16, 27, 397, 3437, 9975, 16, 29, 22175, 1652, 336, 67, 2702, 67, 5112, 12, 2702, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 1170, 685, 537, 555, 364, 9417, 645, 1257, 316, 2691, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Different merge "by" based on PUDL version
MODIFY powergenome/generators.py powergenome/generators.py @@ -2012,12 +2012,16 @@ def gentype_region_capacity_factor( """ generation = pd.read_sql_query(sql, pudl_engine, parse_dates={"report_date": "%Y"}) + if pudl.__version__ > "0.5.0": + by = ["plant_id_eia"] + else: + by = {"plant_id_eia": "eia"} capacity_factor =...
[ 1, 6720, 12096, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 12238, 23220, 19, 25959, 18, 2074, 203, 30989, 300, 6734, 22, 16, 2138, 397, 6734, 22, 16, 2313, 22175, 1652, 314, 319, 388, 67, 6858, 67, 16017, 67, 6812, 12, 203, 8395, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 26270, 2691, 315, 1637, 6, 2511, 603, 20790, 8914, 1177, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...