Skip to content

Commit

Permalink
Merge pull request #229 from rl-institut/feature/227_report_max_nr_cs
Browse files Browse the repository at this point in the history
same number for max cs in reports
solves #227
  • Loading branch information
j-brendel authored Nov 28, 2024
2 parents ebac950 + 77ad3d5 commit f67e1c3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions simba/costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down

0 comments on commit f67e1c3

Please sign in to comment.