[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72WN48Y96QGM5FNWMF4K4AA":3,"skill-same:01M72WN48Y96QGM5FNWMF4K4AA":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M72WN48Y96QGM5FNWMF4K4AA","dc-power-flow",null,"DC power flow analysis for power systems. Use when computing power flows using DC approximation, building susceptance matrices, calculating line flows and loading percentages, or performing sensitivity analysis on transmission networks.","agentscope-ai\u002FPawBench","agentscope-ai","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F211762292?v=4","01M6CRT6543BZGGVK3P85GC08Q","AgentScope-AI","01M72WJAXCYDAXK74090327ER7",127,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT129_skillsbench_energy-market-pricing\u002Fskills\u002Fdc-power-flow\u002FSKILL.md",[],[],"2026-11-10 22:39:42",false,"---\nname: dc-power-flow\ndescription: \"DC power flow analysis for power systems. Use when computing power flows using DC approximation, building susceptance matrices, calculating line flows and loading percentages, or performing sensitivity analysis on transmission networks.\"\n---\n\n# DC Power Flow\n\nDC power flow is a linearized approximation of AC power flow, suitable for economic dispatch and contingency analysis.\n\n## DC Approximations\n\n1. **Lossless lines** - Ignore resistance (R ≈ 0)\n2. **Flat voltage** - All bus voltages = 1.0 pu\n3. **Small angles** - sin(θ) ≈ θ, cos(θ) ≈ 1\n\nResult: Power flow depends only on bus angles (θ) and line reactances (X).\n\n## Bus Number Mapping\n\nPower system bus numbers may not be contiguous (e.g., case300 has non-sequential bus IDs). Always create a mapping from bus numbers to 0-indexed array positions:\n\n```python\n# Create mapping: bus_number -> 0-indexed position\nbus_num_to_idx = {int(buses[i, 0]): i for i in range(n_bus)}\n\n# Use mapping for branch endpoints\nf = bus_num_to_idx[int(br[0])]  # NOT br[0] - 1\nt = bus_num_to_idx[int(br[1])]\n```\n\n## Susceptance Matrix (B)\n\nBuild from branch reactances using bus number mapping:\n\n```python\n# Run: scripts\u002Fbuild_b_matrix.py\n# Or inline:\nbus_num_to_idx = {int(buses[i, 0]): i for i in range(n_bus)}\nB = np.zeros((n_bus, n_bus))\n\nfor br in branches:\n    f = bus_num_to_idx[int(br[0])]  # Map bus number to index\n    t = bus_num_to_idx[int(br[1])]\n    x = br[3]  # Reactance\n    if x != 0:\n        b = 1.0 \u002F x\n        B[f, f] += b\n        B[t, t] += b\n        B[f, t] -= b\n        B[t, f] -= b\n```\n\n## Power Balance Equation\n\nAt each bus: `Pg - Pd = B[i, :] @ θ`\n\nWhere:\n- Pg = generation at bus (pu)\n- Pd = load at bus (pu)\n- θ = vector of bus angles (radians)\n\n## Slack Bus\n\nOne bus must have θ = 0 as reference. Find slack bus (type=3):\n\n```python\nslack_idx = None\nfor i in range(n_bus):\n    if buses[i, 1] == 3:\n        slack_idx = i\n        break\nconstraints.append(theta[slack_idx] == 0)\n```\n\n## Line Flow Calculation\n\nFlow on branch from bus f to bus t (use bus number mapping):\n\n```python\nf = bus_num_to_idx[int(br[0])]\nt = bus_num_to_idx[int(br[1])]\nb = 1.0 \u002F br[3]  # Susceptance = 1\u002FX\nflow_pu = b * (theta[f] - theta[t])\nflow_MW = flow_pu * baseMVA\n```\n\n## Line Loading Percentage\n\n```python\nloading_pct = abs(flow_MW) \u002F rating_MW * 100\n```\n\nWhere `rating_MW = branch[5]` (RATE_A column).\n\n## Branch Susceptances for Constraints\n\nStore susceptances when building constraints:\n\n```python\nbranch_susceptances = []\nfor br in branches:\n    x = br[3]\n    b = 1.0 \u002F x if x != 0 else 0\n    branch_susceptances.append(b)\n```\n\n## Line Flow Limits (for OPF)\n\nEnforce thermal limits as linear constraints:\n\n```python\n# |flow| \u003C= rating  →  -rating \u003C= flow \u003C= rating\nflow = b * (theta[f] - theta[t]) * baseMVA\nconstraints.append(flow \u003C= rate)\nconstraints.append(flow >= -rate)\n```\n","# DC Power Flow\n\nDC power flow is a linearized approximation of AC power flow, suitable for economic dispatch and contingency analysis.\n\n## DC Approximations\n\n1. **Lossless lines** - Ignore resistance (R ≈ 0)\n2. **Flat voltage** - All bus voltages = 1.0 pu\n3. **Small angles** - sin(θ) ≈ θ, cos(θ) ≈ 1\n\nResult: Power flow depends only on bus angles (θ) and line reactances (X).\n\n## Bus Number Mapping\n\nPower system bus numbers may not be contiguous (e.g., case300 has non-sequential bus IDs). Always create a mapping from bus numbers to 0-indexed array positions:\n\n```python\n# Create mapping: bus_number -> 0-indexed position\nbus_num_to_idx = {int(buses[i, 0]): i for i in range(n_bus)}\n\n# Use mapping for branch endpoints\nf = bus_num_to_idx[int(br[0])]  # NOT br[0] - 1\nt = bus_num_to_idx[int(br[1])]\n```\n\n## Susceptance Matrix (B)\n\nBuild from branch reactances using bus number mapping:\n\n```python\n# Run: scripts\u002Fbuild_b_matrix.py\n# Or inline:\nbus_num_to_idx = {int(buses[i, 0]): i for i in range(n_bus)}\nB = np.zeros((n_bus, n_bus))\n\nfor br in branches:\n    f = bus_num_to_idx[int(br[0])]  # Map bus number to index\n    t = bus_num_to_idx[int(br[1])]\n    x = br[3]  # Reactance\n    if x != 0:\n        b = 1.0 \u002F x\n        B[f, f] += b\n        B[t, t] += b\n        B[f, t] -= b\n        B[t, f] -= b\n```\n\n## Power Balance Equation\n\nAt each bus: `Pg - Pd = B[i, :] @ θ`\n\nWhere:\n- Pg = generation at bus (pu)\n- Pd = load at bus (pu)\n- θ = vector of bus angles (radians)\n\n## Slack Bus\n\nOne bus must have θ = 0 as reference. Find slack bus (type=3):\n\n```python\nslack_idx = None\nfor i in range(n_bus):\n    if buses[i, 1] == 3:\n        slack_idx = i\n        break\nconstraints.append(theta[slack_idx] == 0)\n```\n\n## Line Flow Calculation\n\nFlow on branch from bus f to bus t (use bus number mapping):\n\n```python\nf = bus_num_to_idx[int(br[0])]\nt = bus_num_to_idx[int(br[1])]\nb = 1.0 \u002F br[3]  # Susceptance = 1\u002FX\nflow_pu = b * (theta[f] - theta[t])\nflow_MW = flow_pu * baseMVA\n```\n\n## Line Loading Percentage\n\n```python\nloading_pct = abs(flow_MW) \u002F rating_MW * 100\n```\n\nWhere `rating_MW = branch[5]` (RATE_A column).\n\n## Branch Susceptances for Constraints\n\nStore susceptances when building constraints:\n\n```python\nbranch_susceptances = []\nfor br in branches:\n    x = br[3]\n    b = 1.0 \u002F x if x != 0 else 0\n    branch_susceptances.append(b)\n```\n\n## Line Flow Limits (for OPF)\n\nEnforce thermal limits as linear constraints:\n\n```python\n# |flow| \u003C= rating  →  -rating \u003C= flow \u003C= rating\nflow = b * (theta[f] - theta[t]) * baseMVA\nconstraints.append(flow \u003C= rate)\nconstraints.append(flow >= -rate)\n```\n",{"name":5,"description":7},"main","0f794a8bb6c27aa9ee4091b2691fa30e4ed9cc8f","data\u002Fpawbench-v1.0\u002Fassets\u002FT129_skillsbench_energy-market-pricing\u002Fskills\u002Fdc-power-flow",24,"https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench","https:\u002F\u002Fagentscope-ai.github.io\u002FPawBench\u002F","https:\u002F\u002Fgithub.com\u002Fagentscope-ai","2026-08-03 20:09:53",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add agentscope-ai\u002FPawBench --skill dc-power-flow",{"tool":38,"command":39},"bunx","bunx skills add agentscope-ai\u002FPawBench --skill dc-power-flow",{"tool":41,"command":42},"pnpm","pnpm dlx skills add agentscope-ai\u002FPawBench --skill dc-power-flow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT129_skillsbench_energy-market-pricing\u002Fskills\u002Fdc-power-flow\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"scripts\u002Fbuild_b_matrix.py","SCRIPT","脚本",3161,"https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT129_skillsbench_energy-market-pricing\u002Fskills\u002Fdc-power-flow\u002Fscripts\u002Fbuild_b_matrix.py",[53,59,66,73,80,87],{"skillNo":54,"name":55,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M72WQCJKBJZB6SC8MMYK3C8R","data-reconciliation","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT140_skillsbench_xlsx-recover-data\u002Fskills\u002Fdata-reconciliation\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M72WQ8R4DZKK1CT397C0ARQD","hierarchical-taxonomy-clustering","Build unified multi-level category taxonomy from hierarchical product category paths from any e-commerce companies using embedding-based recursive clustering with intelligent category naming via weighted word frequency analysis.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT139_skillsbench_taxonomy-tree-merge\u002Fskills\u002Fhierarchical-taxonomy-clustering\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M72WQ1989ZX613G3PY8Z492J","nlp-research-repo-package-installment","Align Python version and repo-declared dependencies (requirements.txt \u002F environment.yml) before installing packages for NLP research code reproduction.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT138_skillsbench_simpo-code-reproduction\u002Fskills\u002Fnlp-research-repo-package-installment\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M72WPZ828E746PAB3WCCQARW","state-space-linearization","Linearizing nonlinear dynamics around operating points for control design.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT137_skillsbench_r2r-mpc-control\u002Fskills\u002Fstate-space-linearization\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M72WPXFXKWDFVTGAYX0B1TSA","mpc-horizon-tuning","Selecting MPC prediction horizon and cost matrices for web handling.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT137_skillsbench_r2r-mpc-control\u002Fskills\u002Fmpc-horizon-tuning\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M72WPW3863555HM0CACRCCFK","integral-action-design","Adding integral action to MPC for offset-free tension tracking.","https:\u002F\u002Fgithub.com\u002Fagentscope-ai\u002FPawBench\u002Fblob\u002Fmain\u002Fdata\u002Fpawbench-v1.0\u002Fassets\u002FT137_skillsbench_r2r-mpc-control\u002Fskills\u002Fintegral-action-design\u002FSKILL.md",[],[]]