skills/modelscope.cn/ac-branch-pi-model

ac-branch-pi-model

SKILL.md

AC Branch Pi-Model + Transformer Handling

Implement the exact branch power flow equations in acopf-math-model.md using MATPOWER branch data:

[F_BUS, T_BUS, BR_R, BR_X, BR_B, RATE_A, RATE_B, RATE_C, TAP, SHIFT, BR_STATUS, ANGMIN, ANGMAX]

Quick start

  • Use scripts/branch_flows.py to compute per-unit branch flows.
  • Treat the results as power leaving the “from” bus and power leaving the “to” bus (i.e., compute both directions explicitly).

Example:

import json
import numpy as np
Installs
1
First Seen
Jun 3, 2026
ac-branch-pi-model from modelscope.cn