def test_define_availability_of_peak_demand_pricing_assets_yearly(): dict_availability_timeseries = C0.define_availability_of_peak_demand_pricing_assets( dict_test_avilability, 1, 12) assert ( len(dict_availability_timeseries) == 1 ), f"Function does not create a single availability_timeseries for the whole year." assert ( dict_availability_timeseries[1].values.sum() == 8760 ), f"Availablity of a single dict_availability_timeseries is not ensured for every hour of the year."
def test_define_availability_of_peak_demand_pricing_assets_quarterly(): dict_availability_timeseries = C0.define_availability_of_peak_demand_pricing_assets( dict_test_avilability, 4, 3) assert ( len(dict_availability_timeseries) == 4 ), f"Function does not create 4 individual availability_timeseries for the whole year." total = 0 for key in dict_availability_timeseries: total += dict_availability_timeseries[key].values.sum() assert ( total == 8760 ), f"Availablity of all 12 availability_timeseries does not insure availability every hour of the year."
def test_define_availability_of_peak_demand_pricing_assets_monthly(): dict_availability_timeseries = C0.define_availability_of_peak_demand_pricing_assets( dict_test_avilability, 12, 1) assert ( len(dict_availability_timeseries) == 12 ), f"Function does not create 12 individual availability_timeseries for the whole year." assert ( dict_availability_timeseries[1].values.sum() == 31 * 24 ), f"Availability timeseries that is supposed to be 1 for January alone has an unexpected number of available hours." total = 0 for key in dict_availability_timeseries: total += dict_availability_timeseries[key].values.sum() assert ( total == 8760 ), f"Availablity of all 12 availability_timeseries does not insure availability every hour of the year."