From 65790cd065f32934739a51248bcaf74ba0bdb760 Mon Sep 17 00:00:00 2001 From: Fabian Date: Fri, 8 Apr 2022 14:34:52 +0200 Subject: [PATCH] build_powerplants: remove non-assigned ppls --- scripts/build_powerplants.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build_powerplants.py b/scripts/build_powerplants.py index cc01d373..74f53d80 100755 --- a/scripts/build_powerplants.py +++ b/scripts/build_powerplants.py @@ -146,7 +146,9 @@ if __name__ == "__main__": bus_null_b = ppl["bus"].isnull() if bus_null_b.any(): - logging.warning(f"Couldn't find close bus for {bus_null_b.sum()} powerplants") + logging.warning(f"Couldn't find close bus for {bus_null_b.sum()} powerplants. " + "Removing them from the powerplants list.") + ppl = ppl[~bus_null_b] # TODO: This has to fixed in PPM, some powerplants are still duplicated cumcount = ppl.groupby(['bus', 'Fueltype']).cumcount() + 1