fix: Fix syntax errors, wire config-driven simulation in run.py, and correct fault-rate/availability KPI bugs

This commit is contained in:
2026-07-28 14:32:53 +02:00
parent 36a875b115
commit b10c5bdbef
15 changed files with 268 additions and 29 deletions

View File

@@ -589,6 +589,7 @@ class PVSimulator:
def _generate_faults(
self,
timestamp: datetime,
timestep_minutes: int,
) -> None:
ids = self._component_ids()
@@ -616,6 +617,10 @@ class PVSimulator:
ids[
"inverter"
],
timestep_minutes=
timestep_minutes,
)
# ==================================================================
@@ -755,7 +760,8 @@ class PVSimulator:
enabled=
panel.enabled,
panel.enabled
and fault_factor > 0.0,
)
records.append(
@@ -1530,7 +1536,9 @@ class PVSimulator:
self._generate_faults(
timestamp
timestamp,
config.timestep_minutes,
)
panels = (