Skip to content

Commit

Permalink
some more tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
k-rieck committed Jan 16, 2024
1 parent 8202dc6 commit 972b162
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
1 change: 1 addition & 0 deletions hisim/postprocessing/compute_kpis.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def compute_consumption_production(
in output.postprocessing_flag
):
consumption_ids.append(index)

elif InandOutputType.CHARGE_DISCHARGE in output.postprocessing_flag:
if ComponentType.BATTERY in output.postprocessing_flag:
battery_charge_discharge_ids.append(index)
Expand Down
24 changes: 5 additions & 19 deletions hisim/postprocessing/pyam_data_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,22 +565,6 @@ def make_histogram_plot_for_pandas_dataframe(

plt.hist(x=np.array(filtered_data.value.values), bins="auto")

if max(filtered_data.value.values) != 0:
x_tick_locations = range(
0,
int(max(filtered_data.value.values)),
round(int(max(filtered_data.value.values) / 10), 0),
)
else:
x_tick_locations = None
plt.xticks(
ticks=x_tick_locations,
rotation=45,
fontsize=self.hisim_chartbase.fontsize_ticks,
rotation_mode="anchor",
ha="right",
)

plt.ylabel(
ylabel="Count", fontsize=self.hisim_chartbase.fontsize_label,
)
Expand Down Expand Up @@ -1198,7 +1182,7 @@ def get_variables_to_check(self):
"Production",
"Consumption",
"Self-consumption",
"Injection",
"Self-consumption rate",
"Autarky rate",
"Investment costs for equipment per simulated period",
"CO2 footprint for equipment per simulated period",
Expand All @@ -1222,8 +1206,10 @@ def get_variables_to_check(self):
"ElectricityMeter|Electricity|ElectricityToGrid",
"ElectricityMeter|Electricity|ElectricityFromGrid",
"ElectricityMeter|Electricity|ElectricityAvailable",
"ElectricityMeter|Electricity|ElectricityConsumption",
"ElectricityMeter|Electricity|ElectricityProduction",
# if you analyze a house with ems the production and consumption values of the electricity meter are not representative
# use the ems production and consumption or the kpi values instead if needed
# "ElectricityMeter|Electricity|ElectricityConsumption",
# "ElectricityMeter|Electricity|ElectricityProduction",
]

occuancy_consumption = [
Expand Down

0 comments on commit 972b162

Please sign in to comment.