dc-power-flow

Compute DC power flow line flows from a bus susceptance matrix.

4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill dc-power-flow-generalreasoning
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dc-power-flow
Source: https://github.com/GeneralReasoning/env-skillsbench/tree/main/grid-dispatch-operator/environment/skills/dc-power-flow
Command: npx skills add https://github.com/GeneralReasoning/env-skillsbench --skill dc-power-flow-generalreasoning

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, and includes scripts (resource) components.

What problem does it solve?

DC power flow analysis provides a linearized approach to compute power transfers and line loading in electrical networks, enabling quick planning and contingency assessment without full AC simulations.

Core Features & Use Cases

  • Build the bus susceptance matrix (B) from non-contiguous bus IDs.
  • Compute line flows and loading percentages for branch constraints.
  • Perform quick DC-OPF-like analyses for planning and operational studies.

Quick Start

Feed the bus and branch data to the build_b_matrix script to generate the susceptance matrix.

Frequently Asked Questions about dc-power-flow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute DC power flow line loading for a grid with non-contiguous bus numbering?

Compute DC power flow by building the bus susceptance matrix from non-contiguous bus IDs and evaluating linearized line flows. It generates a consistent B matrix and per-line loading percentages for branch constraints without full AC simulations.

What is a DC power flow analysis used for in power system planning?

DC power flow analysis provides a linearized approach to compute power transfers and line loading in electrical networks. It enables quick planning, contingency analysis, and fast operational studies by bypassing the complexity of full AC simulations.

Can I use numpy to build a susceptance matrix for contingency analysis?

Yes, the analysis relies on numpy to build the bus susceptance matrix and evaluate line flows. It applies to contingency analysis and fast operational studies by enforcing input handling to produce a consistent B matrix across the network.

What is the best way to calculate line flows and loading percentages in a linearized power system model?

The best way is to build the bus susceptance matrix and evaluate line flows within a linearized power system model. This approach computes branch constraints and per-line loading percentages efficiently for further network analysis.

Does DC power flow analysis require full AC simulation data to compute power transfers?

No, DC power flow analysis provides a linearized approach that computes power transfers and line loading without full AC simulation data. It uses the susceptance matrix to quickly assess network conditions for planning and operational studies.