Skip to content

Features/failure forecast - #29

Open
Oklyagina wants to merge 5 commits into
ainetus:mainfrom
Oklyagina:features/failure_forecast
Open

Oklyagina wants to merge 5 commits into
ainetus:mainfrom
Oklyagina:features/failure_forecast

Conversation

@Oklyagina

Copy link
Copy Markdown

Failure forecasting integration

Failure forecasting is integrated directly into the existing PowerGrid simulator pipeline.
Execution flow

  1. Forecasting artifacts are loaded when the simulator starts: app/models/Simulator.py:102-117.
  2. Grid observations are recorded every step to maintain the required history: app/models/Simulator.py:197-200.
  3. When an overload is detected, the original overload event is sent: app/models/Simulator.py:354-365.
  4. After InteractiveAI returns the overload event ID, failure forecasting is executed for the overloaded line: app/models/Simulator.py:366-378.
  5. A linked forecast event is sent using the overload ID as its parent_event_id: app/models/Simulator.py:379-387.
    Grid observation
    → Overload detected
    → Overload event sent
    → Failure forecast executed
    → Linked forecast event sent
    The inference pipeline and forecast output are implemented in app/models/failure_forecast.py:238-301.

The output includes:

  • binary failure prediction (0 - no fail, 1 - fail);
  • failure probability;
  • forecast horizon;
  • overloaded line ID.

The linked event payload is created in app/models/failure_forecast.py:304-346 and published through the simulator’s existing event mechanism in app/models/Communicate.py:515-533.

Getting pre-trained model:

The train models are available as artifacts in the latest release here: https://github.com/ainetus/RL_agent_failure_forecast/releases/tag/v2.0-docker

It is required to download ai4realnet_small-curriculum-v2026.09.18-models.zip archive and unzip the failure_forecaster subdirectory to the project root.

@Oklyagina

Copy link
Copy Markdown
Author

My commits are only related to the forecasting. Other ones were there before, but were not merged to the main

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants