Power grid dc opf

From XuShuwenn/RedAct · View interactive version

Power grid dc opf is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Formulate, solve, and verify DC optimal power flow with spinning reserves from MATPOWER-format snapshots, and produce a structured dispatch report.

How to use this skill

Skill file

DC Optimal Power Flow with Spinning Reserves

Reusable workflow to parse a MATPOWER-style network snapshot, set up a DC OPF with spinning reserve capacity coupling, enforce generator and transmission limits, and produce a robust dispatch report with verification.

When to Use

Use this skill when asked to:

Core Workflow

  1. Input inspection and parsing
  1. Data interpretation and units
  1. Reserve requirement handling
  1. Model formulation (DC OPF with reserves)
  1. Solve and validate
  1. Post-processing
  1. Report generation

Verification

Run these checks before finalizing the report:

Suggested numeric tolerances:

Common Pitfalls and Recoveries

Optional Script Usage

The included helper provides deterministic DC powerflow construction and verification utilities.

Success criteria: all verification checks pass within tolerance; most_loaded_lines are within limits (≤ 100% after optimization), totals are consistent, and the report schema matches the required structure.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.