simstadt 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. {simstadt-0.2.0 → simstadt-0.2.2}/PKG-INFO +1 -1
  2. {simstadt-0.2.0 → simstadt-0.2.2}/pyproject.toml +1 -1
  3. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/energy_grid.py +5 -5
  4. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/heat_demand.py +5 -5
  5. simstadt-0.2.2/src/simstadt/results/load_profile.py +57 -0
  6. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/runner.py +5 -4
  7. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/workflows.py +0 -2
  8. simstadt-0.2.0/src/simstadt/results/load_profile.py +0 -38
  9. {simstadt-0.2.0 → simstadt-0.2.2}/README.md +0 -0
  10. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/__init__.py +0 -0
  11. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/cli.py +0 -0
  12. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/__init__.py +0 -0
  13. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/base.py +0 -0
  14. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/green_water.py +0 -0
  15. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/kpi.py +0 -0
  16. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/photovoltaic.py +0 -0
  17. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/providers.py +0 -0
  18. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/solar_potential.py +0 -0
  19. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/results/unknown_workflow.py +0 -0
  20. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/100_Solar.flow/00_ImportCityGml.step/params.xml +0 -0
  21. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/100_Solar.flow/01_Preprocessing.step/00_GeometricPreprocessor.step/params.xml +0 -0
  22. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/100_Solar.flow/01_Preprocessing.step/params.xml +0 -0
  23. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/100_Solar.flow/02_WeatherProcessor.step/params.xml +0 -0
  24. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/100_Solar.flow/03_IrradianceProcessor.step/params.xml +0 -0
  25. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/100_Solar.flow/04_Visualization.step/params.xml +0 -0
  26. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/100_Solar.flow/params.xml +0 -0
  27. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/00_ImportCityGml.step/params.xml +0 -0
  28. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/01_Preprocessing.step/00_GeometricPreprocessor.step/params.xml +0 -0
  29. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/01_Preprocessing.step/01_GeometricEstimator.step/params.xml +0 -0
  30. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/01_Preprocessing.step/02_PhysicsPreprocessor.step/params.xml +0 -0
  31. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/01_Preprocessing.step/03_UsagePreprocessor.step/params.xml +0 -0
  32. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/01_Preprocessing.step/params.xml +0 -0
  33. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/02_WeatherProcessor.step/params.xml +0 -0
  34. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/03_IrradianceProcessor.step/params.xml +0 -0
  35. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/04_RefurbishmentScenarioMaker.step/params.xml +0 -0
  36. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/05_MonthlyEnergyBalance.step/params.xml +0 -0
  37. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/101_HeatDemand.flow/params.xml +0 -0
  38. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/102_GreenWater.flow/00_ImportCityGml.step/params.xml +0 -0
  39. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/102_GreenWater.flow/01_ShadowProcessing.step/params.xml +0 -0
  40. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/102_GreenWater.flow/02_WeatherProcessor.step/params.xml +0 -0
  41. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/102_GreenWater.flow/03_GreenWater.step/params.xml +0 -0
  42. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/102_GreenWater.flow/params.xml +0 -0
  43. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/.pytest_cache/.gitignore +0 -0
  44. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/.pytest_cache/CACHEDIR.TAG +0 -0
  45. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/.pytest_cache/README.md +0 -0
  46. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/.pytest_cache/v/cache/nodeids +0 -0
  47. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/.pytest_cache/v/cache/stepwise +0 -0
  48. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/00_ImportCityGml.step/params.xml +0 -0
  49. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/01_Preprocessing.step/00_GeometricPreprocessor.step/params.xml +0 -0
  50. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/01_Preprocessing.step/params.xml +0 -0
  51. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/02_WeatherProcessor.step/params.xml +0 -0
  52. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/03_IrradianceProcessor.step/params.xml +0 -0
  53. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/04_PhotovoltaicEconomics.step/params.xml +0 -0
  54. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/05_PhotovoltaicPotential.step/params.xml +0 -0
  55. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/103_PV.flow/params.xml +0 -0
  56. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/00_ImportCityGml.step/params.xml +0 -0
  57. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/01_ShadowProcessing.step/params.xml +0 -0
  58. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/02_Preprocessing.step/00_GeometricPreprocessor.step/params.xml +0 -0
  59. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/02_Preprocessing.step/01_GeometricEstimator.step/params.xml +0 -0
  60. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/02_Preprocessing.step/02_PhysicsPreprocessor.step/params.xml +0 -0
  61. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/02_Preprocessing.step/03_UsagePreprocessor.step/params.xml +0 -0
  62. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/02_Preprocessing.step/params.xml +0 -0
  63. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/03_WeatherProcessor.step/params.xml +0 -0
  64. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/04_IrradianceShadow.step/params.xml +0 -0
  65. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/05_RefurbishmentScenarioMaker.step/params.xml +0 -0
  66. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/06_MonthlyEnergyBalance.step/params.xml +0 -0
  67. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/104_HeatDemandWithShadow.flow/params.xml +0 -0
  68. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/00_ImportCityGml.step/params.xml +0 -0
  69. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/01_ShadowProcessing.step/params.xml +0 -0
  70. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/02_Preprocessing.step/00_GeometricPreprocessor.step/params.xml +0 -0
  71. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/02_Preprocessing.step/params.xml +0 -0
  72. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/03_WeatherProcessor.step/params.xml +0 -0
  73. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/04_IrradianceShadow.step/params.xml +0 -0
  74. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/05_PhotovoltaicEconomics.step/params.xml +0 -0
  75. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/06_PhotovoltaicPotential.step/params.xml +0 -0
  76. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/105_PVWithShadow.flow/params.xml +0 -0
  77. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/00_ImportCityGml.step/params.xml +0 -0
  78. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/01_Preprocessing.step/00_GeometricPreprocessor.step/params.xml +0 -0
  79. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/01_Preprocessing.step/01_GeometricEstimator.step/params.xml +0 -0
  80. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/01_Preprocessing.step/02_PhysicsPreprocessor.step/params.xml +0 -0
  81. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/01_Preprocessing.step/03_UsagePreprocessor.step/params.xml +0 -0
  82. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/01_Preprocessing.step/params.xml +0 -0
  83. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/02_RefurbishmentScenarioMaker.step/params.xml +0 -0
  84. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/03_WeatherProcessor.step/params.xml +0 -0
  85. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/04_IrradianceProcessor.step/params.xml +0 -0
  86. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/05_MonthlyEnergyBalance.step/params.xml +0 -0
  87. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/templates/106_HeatDemandWithRefurbishment.flow/params.xml +0 -0
  88. {simstadt-0.2.0 → simstadt-0.2.2}/src/simstadt/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: simstadt
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Python library for using and testing SimStadt workflows.
5
5
  Author: Eric Duminil
6
6
  Author-email: Eric Duminil <eric.duminil@hft-stuttgart.de>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "simstadt"
3
- version = "0.2.0"
3
+ version = "0.2.2"
4
4
  description = "Python library for using and testing SimStadt workflows."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -56,11 +56,11 @@ class EnergyGridResults(SimStadtResults):
56
56
  KPI("Number of inhabitants", df.attrs["number_of_people"], precision=0),
57
57
  KPI("Most common archetype", archetype_share, f"% ({most_common_archetype})", precision=0),
58
58
  KPI("Total heated area", total_heated_area, "m²", precision=0),
59
- KPI("Total electricity demand", total_elec_kwh / 1000, "MWh / a", precision=1),
60
- KPI("Specific electricity demand", total_elec_kwh / total_heated_area, "kWh / (m² · a)", precision=1),
61
- KPI("Total heat demand", total_heat_kwh / 1000, "MWh / a", precision=1),
62
- KPI("Specific heat demand", total_heat_kwh / total_heated_area, "kWh / (m² · a)", precision=1),
63
- KPI("Total PV production", df["pv_production"].sum() / 1000, "MWh / a", precision=1),
59
+ KPI("Total electricity demand", total_elec_kwh / 1000, "MWh / a", precision=0),
60
+ KPI("Specific electricity demand", total_elec_kwh / total_heated_area, "kWh / (m² · a)", precision=0),
61
+ KPI("Total heat demand", total_heat_kwh / 1000, "MWh / a", precision=0),
62
+ KPI("Specific heat demand", total_heat_kwh / total_heated_area, "kWh / (m² · a)", precision=0),
63
+ KPI("Total PV production", df["pv_production"].sum() / 1000, "MWh / a", precision=0),
64
64
  KPI("Average temperature", float(df["ambient_temperature"].mean()), "°C", precision=1),
65
65
  ]
66
66
 
@@ -12,7 +12,7 @@ from .providers import Providers
12
12
 
13
13
  @dataclass(repr=False)
14
14
  class HeatDemandResults(SimStadtResults):
15
- """Results for Heat Demand (and Heat+Cool Demand) workflows."""
15
+ """Results for Heat demand (and Heat+Cool demand) workflows."""
16
16
 
17
17
  MAX_FLAT_ROOF_DIFFERENCE = 0.1 # [m]
18
18
  TOTAL_DEMAND = "Total Yearly Heating + DHW demand"
@@ -47,7 +47,7 @@ class HeatDemandResults(SimStadtResults):
47
47
  custom_kpis.extend(
48
48
  [
49
49
  KPI("Number of heated buildings", heated_buildings, precision=0),
50
- KPI("Specific Heating Demand", specific_heat_demand, "kWh / (m² · a)", precision=0),
50
+ KPI("Specific Heating demand", specific_heat_demand, "kWh / (m² · a)", precision=0),
51
51
  ]
52
52
  )
53
53
  sums.extend(
@@ -59,7 +59,7 @@ class HeatDemandResults(SimStadtResults):
59
59
 
60
60
  if df.attrs["Cooling"]:
61
61
  specific_cooling_demand = df["Yearly Cooling demand"].sum() / df["Heated area"].sum()
62
- custom_kpis.append(KPI("Specific Cooling Demand", specific_cooling_demand, "kWh / (m² · a)", precision=0))
62
+ custom_kpis.append(KPI("Specific Cooling demand", specific_cooling_demand, "kWh / (m² · a)", precision=0))
63
63
  sums.append(("Yearly Cooling demand", "kWh / a"))
64
64
 
65
65
  # TODO: rename to average year of construction?
@@ -73,7 +73,7 @@ class HeatDemandResults(SimStadtResults):
73
73
  rot=0,
74
74
  ylabel="[MWh]",
75
75
  width=0.8,
76
- color={"Monthly Heating Demand": "darkred", "Monthly Cooling Demand": "darkblue"},
76
+ color={"Monthly Heating demand": "darkred", "Monthly Cooling demand": "darkblue"},
77
77
  )
78
78
  plt.savefig(heat_png, bbox_inches="tight", dpi=300)
79
79
  plt.close(ax.figure)
@@ -89,5 +89,5 @@ class HeatDemandResults(SimStadtResults):
89
89
  col for col in df.columns if search_str in col and "Yearly" not in col and "Specific" not in col
90
90
  ]
91
91
  if found_cols:
92
- monthly_df[f"Monthly {mode} Demand"] = (df[found_cols].sum() / 1000).values
92
+ monthly_df[f"Monthly {mode} demand"] = (df[found_cols].sum() / 1000).values
93
93
  return monthly_df
@@ -0,0 +1,57 @@
1
+ from dataclasses import dataclass
2
+ from typing import ClassVar
3
+
4
+ import pandas as pd
5
+
6
+ from .base import SimStadtResults, detect_decimal
7
+ from .kpi import KPI
8
+ from .providers import Providers
9
+
10
+
11
+ @dataclass(repr=False)
12
+ class LoadProfileResults(SimStadtResults):
13
+ """Results for LoadProfile workflows.
14
+
15
+ The dataframe has one column per building (building GML ID as column name)
16
+ and 8760 rows of hourly energy demand [kWh/h].
17
+ """
18
+
19
+ supported_providers: ClassVar[list[str]] = [Providers.LOAD_PROFILE]
20
+ csv_identifier = "_load_profile_Hourly"
21
+
22
+ def _parse_results(self) -> pd.DataFrame:
23
+ csv_decimal = detect_decimal(self.csv_path, 6, "Area")
24
+
25
+ header = pd.read_csv(
26
+ self.csv_path, nrows=9, sep=";", header=None, index_col=0, decimal=csv_decimal
27
+ )
28
+ header.index = header.index.str.lstrip("# ")
29
+
30
+ def _header_sum(label: str) -> float:
31
+ return pd.to_numeric(header.loc[label]).fillna(0).sum()
32
+
33
+ df = pd.read_csv(self.csv_path, skiprows=range(1, 12), sep=";", decimal=csv_decimal)
34
+ df = df.drop(columns=[df.columns[0]])
35
+
36
+ df.attrs["number_of_households"] = int(_header_sum("Number of Households"))
37
+ df.attrs["number_of_people"] = int(_header_sum("Number of Occupants"))
38
+ df.attrs["total_heated_area"] = float(_header_sum("Heated Area"))
39
+
40
+ return df
41
+
42
+ @property
43
+ def kpis(self) -> list[KPI]:
44
+ df = self.dataframe
45
+ total = df.sum().sum()
46
+ total_heated_area = df.attrs["total_heated_area"]
47
+ result = [
48
+ KPI("Number of buildings", df.shape[1], precision=0),
49
+ KPI("Number of households", df.attrs["number_of_households"], precision=0),
50
+ KPI("Number of inhabitants", df.attrs["number_of_people"], precision=0),
51
+ KPI("Total heated area", total_heated_area, "m²", precision=0),
52
+ KPI("Total load", total, "kWh / a", precision=1),
53
+ KPI("Average load", total / 8760, "kWh / h", precision=1),
54
+ ]
55
+ if total_heated_area > 0:
56
+ result.append(KPI("Specific load", total / total_heated_area, "kWh / (m² · a)", precision=1))
57
+ return result
@@ -38,17 +38,18 @@ log = logging.getLogger(__name__)
38
38
 
39
39
 
40
40
  def find_simstadt(parent_folder: Path, simstadt_glob: str = SIMSTADT2_GLOB) -> Path:
41
- try:
42
- found = next(parent_folder.glob(simstadt_glob))
41
+ simstadts = sorted(parent_folder.glob(simstadt_glob))
42
+ if len(simstadts) > 0:
43
+ found = simstadts[-1]
43
44
  log.info("# SimStadt found in %s\n", found)
44
45
  return found
45
- except StopIteration as e:
46
+ else:
46
47
  raise ValueError(
47
48
  f"SimStadt not found in {parent_folder}/{simstadt_glob}.\n"
48
49
  "Please Set the SIMSTADT_FOLDER environment variable, "
49
50
  "or install SimStadt on the Desktop.\n\n"
50
51
  "See https://simstadt.hft-stuttgart.de/getting-started/install-software/"
51
- ) from e
52
+ )
52
53
 
53
54
 
54
55
  def get_simstadt_folder() -> Path:
@@ -4,8 +4,6 @@ Each function wraps run_workflow_with_citygml() with a pre-built parameter dict
4
4
  for a specific workflow type (PV, heat demand, green water).
5
5
  """
6
6
 
7
- # TODO: Actually use and test them
8
-
9
7
  from pathlib import Path
10
8
 
11
9
  from .results import SimStadtResults
@@ -1,38 +0,0 @@
1
- from dataclasses import dataclass
2
- from typing import ClassVar
3
-
4
- import pandas as pd
5
-
6
- from .base import SimStadtResults, detect_decimal
7
- from .kpi import KPI
8
- from .providers import Providers
9
-
10
-
11
- @dataclass(repr=False)
12
- class LoadProfileResults(SimStadtResults):
13
- """Results for LoadProfile workflows.
14
-
15
- The dataframe has one column per building (building GML ID as column name)
16
- and 8760 rows of hourly energy demand [kWh/h].
17
- """
18
-
19
- supported_providers: ClassVar[list[str]] = [Providers.LOAD_PROFILE]
20
- csv_identifier = "_load_profile_Hourly"
21
-
22
- def _parse_results(self) -> pd.DataFrame:
23
- csv_decimal = detect_decimal(self.csv_path, 6, "Area")
24
- df = pd.read_csv(self.csv_path, skiprows=range(1, 12), sep=";", decimal=csv_decimal)
25
- # First column is the timestamp; remaining columns are per-building loads
26
- return df.drop(columns=[df.columns[0]])
27
-
28
- @property
29
- def kpis(self) -> list[KPI]:
30
- # TODO: Add sum, average. Add timestep too?
31
- # TODO: Add people? Add total heated area?
32
- df = self.dataframe
33
- total = df.sum().sum()
34
- return [
35
- KPI("Number of buildings", df.shape[1], precision=0),
36
- KPI("Total load", total, "kWh / a", precision=1),
37
- KPI("Average load", total / 8760, "kWh / h", precision=1),
38
- ]
File without changes
File without changes
File without changes