handle rir pps filtering

This commit is contained in:
Khalim Conn-Kowlessar 2025-11-14 23:47:56 +00:00
parent 4d6a73fd7b
commit 3acad1e049

View file

@ -603,6 +603,8 @@ class Funding:
code = "RIRI_res_unin"
pps = filtered_pps_matrix[filtered_pps_matrix["Measure_Type"] == code]
if pps.shape[0] != 1:
if pps.empty and self.starting_sap_band in ["Low_C", "High_C", "Low_B", "High_B", "Low_A", "High_A"]:
return 0
raise ValueError(f"Invalid RIRI category: {code}")
return pps.squeeze()["Cost Savings"]