Grid dispatch operator

From XuShuwenn/RedAct · View interactive version

Grid dispatch operator is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Optimize generator dispatches for power grid with DC power balance, transmission limits, and spinning reserve requirements.

How to use this skill

Skill file

Power Grid Generator Dispatch Optimization

When to Use

When to Use

Execution Rules

Input

Constraints

  1. DC power balance at each bus
  2. Generator and transmission limits
  3. Spinning reserve requirements (standard capacity coupling)
  1. Final dispatch must be network-feasible: enforce nodal DC power balance, generator bounds, transmission limits, and reserve-capacity coupling in the optimization model itself, not only as a post hoc check.
  2. If transmission compliance is required, use bus-angle variables and DC flow relations or an equivalent PTDF/shift-factor formulation.
  3. Restrict dispatch and reserve decisions to online generators only (GEN_STATUS > 0); exclude offline units from feasible capacity, reserve totals, and operating margin.
  4. Preserve MATPOWER gencost semantics in the objective; if costs are quadratic/polynomial, optimize that objective or clearly state any unavoidable approximation.

Output Format

JSON at the task-specified absolute output path (use /root/report.json only if the runtime instructions explicitly direct that path), for example:

{
  "generator_dispatch": [
    {"id": 1, "bus": 1, "output_MW": 100.0, "reserve_MW": 30.0, "pmax_MW": 150.0}
  ],
  "totals": {
    "cost_dollars_per_hour": 8000.0,
    "load_MW": 259.0,
    "generation_MW": 259.0,
    "reserve_MW": 500.0
  },
  "most_loaded_lines": [{"from": 1, "to": 2, "loading_pct": 85.0}, ...],
  "operating_margin_MW": 50.0
}

Use the exact top-level keys shown above: generator_dispatch, totals, most_loaded_lines, operating_margin_MW.

Do not rename keys. After writing the report, re-open and parse the JSON to confirm it is readable, complete, and contains the required nested fields such as output_MW, reserve_MW, and loading_pct.

If any requirement is ambiguous, especially reserve obligation or reserve-capability semantics, report the assumption explicitly instead of presenting it as given input.

Key Metrics

Tips

Tips

Final Validation

Before concluding success:

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.