From 77ad3d5b5693f386e32d5e60a12bf4437cbfbac6 Mon Sep 17 00:00:00 2001 From: "stefan.schirmeister" Date: Wed, 20 Nov 2024 10:47:31 +0100 Subject: [PATCH] same number for max cs in reports --- simba/costs.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/simba/costs.py b/simba/costs.py index 7a2e0cf..690b45b 100644 --- a/simba/costs.py +++ b/simba/costs.py @@ -491,7 +491,6 @@ def set_various_kpis(self): :return: self :rtype: Costs """ - all_stations = self.schedule.scenario["components"]["charging_stations"] stepsPerHour = self.scenario.stepsPerHour # factor for scaling to a year scenario_duration_s = self.scenario.n_intervals * self.scenario.interval.total_seconds() @@ -509,10 +508,7 @@ def set_various_kpis(self): (sum(timeseries["grid supply [kW]"]) / stepsPerHour) * annual_factor self.costs_per_gc[gcID]["annual_kWh_from_feed_in"] = \ -sum(timeseries.get("local generation [kW]", [0])) / stepsPerHour * annual_factor - cs_at_station = len([cs for cs in all_stations.values() if cs["parent"] == gcID]) - if station["n_charging_stations"] is not None: - # get nr of CS in use at station - cs_at_station = min(cs_at_station, station["n_charging_stations"]) + cs_at_station = max(getattr(self.scenario, f"{gcID}_timeseries")["# CS in use [-]"]) self.costs_per_gc[gcID]["maximum Nr charging stations"] = cs_at_station # total_km_per_year