[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XD03K2J3H43VDCQAECTYRX":3,"skill-same:01M6XD03K2J3H43VDCQAECTYRX":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6XD03K2J3H43VDCQAECTYRX","ac-branch-pi-model",null,"AC branch pi-model power flow equations (P\u002FQ and |S|) with transformer tap ratio and phase shift, matching `acopf-math-model.md` and MATPOWER branch fields. Use when computing branch flows in either direction, aggregating bus injections for nodal balance, checking MVA (rateA) limits, computing branch loading %, or debugging sign\u002Funits issues in AC power flow.","Waaaalnut\u002Fskillsbench","Waaaalnut","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103995656?v=4","01M6XCS9K1V51EY3JMB7DGMX24","01M6XCS9Q4WPW88W62C55G1H44",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Fenergy-ac-optimal-power-flow\u002Fenvironment\u002Fskills\u002Fac-branch-pi-model\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"model","branch","pi","ac branch pi model","ac","Transformer","when","phase","for","balance","with","flows","loading","debugging","direction","either","tap","power","use","issues","2026-11-10 10:12:30",false,"---\nname: ac-branch-pi-model\ndescription: \"AC branch pi-model power flow equations (P\u002FQ and |S|) with transformer tap ratio and phase shift, matching `acopf-math-model.md` and MATPOWER branch fields. Use when computing branch flows in either direction, aggregating bus injections for nodal balance, checking MVA (rateA) limits, computing branch loading %, or debugging sign\u002Funits issues in AC power flow.\"\n---\n\n# AC Branch Pi-Model + Transformer Handling\n\nImplement the exact branch power flow equations in `acopf-math-model.md` using MATPOWER branch data:\n\n```\n[F_BUS, T_BUS, BR_R, BR_X, BR_B, RATE_A, RATE_B, RATE_C, TAP, SHIFT, BR_STATUS, ANGMIN, ANGMAX]\n```\n\n## Quick start\n\n- Use `scripts\u002Fbranch_flows.py` to compute per-unit branch flows.\n- Treat the results as **power leaving** the “from” bus and **power leaving** the “to” bus (i.e., compute both directions explicitly).\n\nExample:\n\n```python\nimport json\nimport numpy as np\n\nfrom scripts.branch_flows import compute_branch_flows_pu, build_bus_id_to_idx\n\ndata = json.load(open(\"\u002Froot\u002Fnetwork.json\"))\nbaseMVA = float(data[\"baseMVA\"])\nbuses = np.array(data[\"bus\"], dtype=float)\nbranches = np.array(data[\"branch\"], dtype=float)\n\nbus_id_to_idx = build_bus_id_to_idx(buses)\n\nVm = buses[:, 7]  # initial guess VM\nVa = np.deg2rad(buses[:, 8])  # initial guess VA\n\nbr = branches[0]\nP_ij, Q_ij, P_ji, Q_ji = compute_branch_flows_pu(Vm, Va, br, bus_id_to_idx)\n\nS_ij_MVA = (P_ij**2 + Q_ij**2) ** 0.5 * baseMVA\nS_ji_MVA = (P_ji**2 + Q_ji**2) ** 0.5 * baseMVA\nprint(S_ij_MVA, S_ji_MVA)\n```\n\n## Model details (match the task formulation)\n\n### Per-unit conventions\n\n- Work in per-unit internally.\n- Convert with `baseMVA`:\n  - \\(P_{pu} = P_{MW} \u002F baseMVA\\)\n  - \\(Q_{pu} = Q_{MVAr} \u002F baseMVA\\)\n  - \\(|S|_{MVA} = |S|_{pu} \\cdot baseMVA\\)\n\n### Transformer handling (MATPOWER TAP + SHIFT)\n\n- Use \\(T_{ij} = tap \\cdot e^{j \\cdot shift}\\).\n- **Implementation shortcut (real tap + phase shift):**\n  - If `abs(TAP) \u003C 1e-12`, treat `tap = 1.0` (no transformer).\n  - Convert `SHIFT` from degrees to radians.\n  - Use the angle shift by modifying the angle difference:\n    - \\(\\delta_{ij} = \\theta_i - \\theta_j - shift\\)\n    - \\(\\delta_{ji} = \\theta_j - \\theta_i + shift\\)\n\n### Series admittance\n\nGiven `BR_R = r`, `BR_X = x`:\n\n- If `r == 0 and x == 0`, set `g = 0`, `b = 0` (avoid divide-by-zero).\n- Else:\n  - \\(y = 1\u002F(r + jx) = g + jb\\)\n  - \\(g = r\u002F(r^2 + x^2)\\)\n  - \\(b = -x\u002F(r^2 + x^2)\\)\n\n### Line charging susceptance\n\n- `BR_B` is the **total** line charging susceptance \\(b_c\\) (per unit).\n- Each end gets \\(b_c\u002F2\\) in the standard pi model.\n\n## Power flow equations (use these exactly)\n\nLet:\n- \\(V_i = |V_i| e^{j\\theta_i}\\), \\(V_j = |V_j| e^{j\\theta_j}\\)\n- `tap` is real, `shift` is radians\n- `inv_t = 1\u002Ftap`, `inv_t2 = inv_t^2`\n\nThen the real\u002Freactive power flow from i→j is:\n\n- \\(P_{ij} = g |V_i|^2 inv\\_t2 - |V_i||V_j| inv\\_t (g\\cos\\delta_{ij} + b\\sin\\delta_{ij})\\)\n- \\(Q_{ij} = -(b + b_c\u002F2)|V_i|^2 inv\\_t2 - |V_i||V_j| inv\\_t (g\\sin\\delta_{ij} - b\\cos\\delta_{ij})\\)\n\nAnd from j→i is:\n\n- \\(P_{ji} = g |V_j|^2 - |V_i||V_j| inv\\_t (g\\cos\\delta_{ji} + b\\sin\\delta_{ji})\\)\n- \\(Q_{ji} = -(b + b_c\u002F2)|V_j|^2 - |V_i||V_j| inv\\_t (g\\sin\\delta_{ji} - b\\cos\\delta_{ji})\\)\n\nCompute apparent power:\n\n- \\(|S_{ij}| = \\sqrt{P_{ij}^2 + Q_{ij}^2}\\)\n- \\(|S_{ji}| = \\sqrt{P_{ji}^2 + Q_{ji}^2}\\)\n\n## Common uses\n\n### Enforce MVA limits (rateA)\n\n- `RATE_A` is an MVA limit (may be 0 meaning “no limit”).\n- Enforce in both directions:\n  - \\(|S_{ij}| \\le RATE_A\\)\n  - \\(|S_{ji}| \\le RATE_A\\)\n\n### Compute branch loading %\n\nFor reporting “most loaded branches”:\n\n- `loading_pct = 100 * max(|S_ij|, |S_ji|) \u002F RATE_A` if `RATE_A > 0`, else 0.\n\n### Aggregate bus injections for nodal balance\n\nTo build the branch flow sum for each bus \\(i\\):\n\n- Add \\(P_{ij}, Q_{ij}\\) to bus i\n- Add \\(P_{ji}, Q_{ji}\\) to bus j\n\nThis yields arrays `P_out[i]`, `Q_out[i]` such that the nodal balance can be written as:\n\n- \\(P^g - P^d - G^s|V|^2 = P_{out}\\)\n- \\(Q^g - Q^d + B^s|V|^2 = Q_{out}\\)\n\n## Sanity checks (fast debug)\n\n- With `SHIFT=0` and `TAP=1`, if \\(V_i = V_j\\) and \\(\\theta_i=\\theta_j\\), then \\(P_{ij}\\approx 0\\) and \\(P_{ji}\\approx 0\\) (lossless only if r=0).\n- For a pure transformer (`r=x=0`) you should not get meaningful flows; treat as `g=b=0` (no series element).\n","# AC Branch Pi-Model + Transformer Handling\n\nImplement the exact branch power flow equations in `acopf-math-model.md` using MATPOWER branch data:\n\n```\n[F_BUS, T_BUS, BR_R, BR_X, BR_B, RATE_A, RATE_B, RATE_C, TAP, SHIFT, BR_STATUS, ANGMIN, ANGMAX]\n```\n\n## Quick start\n\n- Use `scripts\u002Fbranch_flows.py` to compute per-unit branch flows.\n- Treat the results as **power leaving** the “from” bus and **power leaving** the “to” bus (i.e., compute both directions explicitly).\n\nExample:\n\n```python\nimport json\nimport numpy as np\n\nfrom scripts.branch_flows import compute_branch_flows_pu, build_bus_id_to_idx\n\ndata = json.load(open(\"\u002Froot\u002Fnetwork.json\"))\nbaseMVA = float(data[\"baseMVA\"])\nbuses = np.array(data[\"bus\"], dtype=float)\nbranches = np.array(data[\"branch\"], dtype=float)\n\nbus_id_to_idx = build_bus_id_to_idx(buses)\n\nVm = buses[:, 7]  # initial guess VM\nVa = np.deg2rad(buses[:, 8])  # initial guess VA\n\nbr = branches[0]\nP_ij, Q_ij, P_ji, Q_ji = compute_branch_flows_pu(Vm, Va, br, bus_id_to_idx)\n\nS_ij_MVA = (P_ij**2 + Q_ij**2) ** 0.5 * baseMVA\nS_ji_MVA = (P_ji**2 + Q_ji**2) ** 0.5 * baseMVA\nprint(S_ij_MVA, S_ji_MVA)\n```\n\n## Model details (match the task formulation)\n\n### Per-unit conventions\n\n- Work in per-unit internally.\n- Convert with `baseMVA`:\n  - \\(P_{pu} = P_{MW} \u002F baseMVA\\)\n  - \\(Q_{pu} = Q_{MVAr} \u002F baseMVA\\)\n  - \\(|S|_{MVA} = |S|_{pu} \\cdot baseMVA\\)\n\n### Transformer handling (MATPOWER TAP + SHIFT)\n\n- Use \\(T_{ij} = tap \\cdot e^{j \\cdot shift}\\).\n- **Implementation shortcut (real tap + phase shift):**\n  - If `abs(TAP) \u003C 1e-12`, treat `tap = 1.0` (no transformer).\n  - Convert `SHIFT` from degrees to radians.\n  - Use the angle shift by modifying the angle difference:\n    - \\(\\delta_{ij} = \\theta_i - \\theta_j - shift\\)\n    - \\(\\delta_{ji} = \\theta_j - \\theta_i + shift\\)\n\n### Series admittance\n\nGiven `BR_R = r`, `BR_X = x`:\n\n- If `r == 0 and x == 0`, set `g = 0`, `b = 0` (avoid divide-by-zero).\n- Else:\n  - \\(y = 1\u002F(r + jx) = g + jb\\)\n  - \\(g = r\u002F(r^2 + x^2)\\)\n  - \\(b = -x\u002F(r^2 + x^2)\\)\n\n### Line charging susceptance\n\n- `BR_B` is the **total** line charging susceptance \\(b_c\\) (per unit).\n- Each end gets \\(b_c\u002F2\\) in the standard pi model.\n\n## Power flow equations (use these exactly)\n\nLet:\n- \\(V_i = |V_i| e^{j\\theta_i}\\), \\(V_j = |V_j| e^{j\\theta_j}\\)\n- `tap` is real, `shift` is radians\n- `inv_t = 1\u002Ftap`, `inv_t2 = inv_t^2`\n\nThen the real\u002Freactive power flow from i→j is:\n\n- \\(P_{ij} = g |V_i|^2 inv\\_t2 - |V_i||V_j| inv\\_t (g\\cos\\delta_{ij} + b\\sin\\delta_{ij})\\)\n- \\(Q_{ij} = -(b + b_c\u002F2)|V_i|^2 inv\\_t2 - |V_i||V_j| inv\\_t (g\\sin\\delta_{ij} - b\\cos\\delta_{ij})\\)\n\nAnd from j→i is:\n\n- \\(P_{ji} = g |V_j|^2 - |V_i||V_j| inv\\_t (g\\cos\\delta_{ji} + b\\sin\\delta_{ji})\\)\n- \\(Q_{ji} = -(b + b_c\u002F2)|V_j|^2 - |V_i||V_j| inv\\_t (g\\sin\\delta_{ji} - b\\cos\\delta_{ji})\\)\n\nCompute apparent power:\n\n- \\(|S_{ij}| = \\sqrt{P_{ij}^2 + Q_{ij}^2}\\)\n- \\(|S_{ji}| = \\sqrt{P_{ji}^2 + Q_{ji}^2}\\)\n\n## Common uses\n\n### Enforce MVA limits (rateA)\n\n- `RATE_A` is an MVA limit (may be 0 meaning “no limit”).\n- Enforce in both directions:\n  - \\(|S_{ij}| \\le RATE_A\\)\n  - \\(|S_{ji}| \\le RATE_A\\)\n\n### Compute branch loading %\n\nFor reporting “most loaded branches”:\n\n- `loading_pct = 100 * max(|S_ij|, |S_ji|) \u002F RATE_A` if `RATE_A > 0`, else 0.\n\n### Aggregate bus injections for nodal balance\n\nTo build the branch flow sum for each bus \\(i\\):\n\n- Add \\(P_{ij}, Q_{ij}\\) to bus i\n- Add \\(P_{ji}, Q_{ji}\\) to bus j\n\nThis yields arrays `P_out[i]`, `Q_out[i]` such that the nodal balance can be written as:\n\n- \\(P^g - P^d - G^s|V|^2 = P_{out}\\)\n- \\(Q^g - Q^d + B^s|V|^2 = Q_{out}\\)\n\n## Sanity checks (fast debug)\n\n- With `SHIFT=0` and `TAP=1`, if \\(V_i = V_j\\) and \\(\\theta_i=\\theta_j\\), then \\(P_{ij}\\approx 0\\) and \\(P_{ji}\\approx 0\\) (lossless only if r=0).\n- For a pure transformer (`r=x=0`) you should not get meaningful flows; treat as `g=b=0` (no series element).\n",{"name":5,"description":7},"main","7eeb258ada72b7f58119b0e7a2c00ea89d9beedd","tasks-no-skills\u002Fenergy-ac-optimal-power-flow\u002Fenvironment\u002Fskills\u002Fac-branch-pi-model","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench","https:\u002F\u002Fgithub.com\u002FWaaaalnut","student of Zhejiang University","2026-04-21 23:16:23",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add Waaaalnut\u002Fskillsbench --skill ac-branch-pi-model",{"tool":56,"command":57},"bunx","bunx skills add Waaaalnut\u002Fskillsbench --skill ac-branch-pi-model",{"tool":59,"command":60},"pnpm","pnpm dlx skills add Waaaalnut\u002Fskillsbench --skill ac-branch-pi-model","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Fenergy-ac-optimal-power-flow\u002Fenvironment\u002Fskills\u002Fac-branch-pi-model\u002FSKILL.md",true,[64],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"scripts\u002Fbranch_flows.py","SCRIPT","脚本",2420,"https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Fenergy-ac-optimal-power-flow\u002Fenvironment\u002Fskills\u002Fac-branch-pi-model\u002Fscripts\u002Fbranch_flows.py",[71,85,99,125,147,165],{"skillNo":72,"name":73,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":81,"publishedAt":38},"01M6XEWMJ6VY3ZC53MPDCPG3GH","data-reconciliation","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fxlsx-recover-data\u002Fenvironment\u002Fskills\u002Fdata-reconciliation\u002FSKILL.md",[76],{"categoryNo":77,"categoryName":78,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[82,83,84],"data reconciliation","reconciliation","data",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":38},"01M6XEW8MNPMF1KRXV6ATGFRQF","speech-to-text","Transcribe video to timestamped text using Whisper tiny model (pre-installed).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-tutorial-indexer\u002Fenvironment\u002Fskills\u002Fspeech-to-text\u002FSKILL.md",[],[92,93,94,95,96,18,97,98],"speech","text","speech to text","transcribe video","whisper","Video","transcribe",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":110,"publishedAt":38},"01M6XEW3FQZP0T1RKQQJFXVY9T","video-processor","Process videos by removing segments and concatenating remaining parts. Use when you need to remove detected pauses\u002Fopenings from videos, create highlight reels, or batch process segment removals using ffmpeg filter_complex.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fvideo-processor\u002FSKILL.md",[105],{"categoryNo":106,"categoryName":107,"taxonomyType":108,"taxonomyTypeDesc":109},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[97,111,112,113,114,115,24,116,117,118,119,120,121,122,123,36,124],"processor","video processor","batch","create","reels","parts","segments","process","videos","you","segment","filter","ffmpeg","remove",{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":132,"publishedAt":38},"01M6XEVXJ5KZ0NTY3XZKRY4AS1","silence-detector","Detect initial silence segments in audio\u002Fvideo using energy-based analysis. Use when you need to find low-energy periods at the start of recordings (title slides, setup time, pre-roll silence).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsilence-detector\u002FSKILL.md",[131],{"categoryNo":106,"categoryName":107,"taxonomyType":108,"taxonomyTypeDesc":109},[133,134,135,136,24,120,137,138,139,140,141,117,142,143,97,144,145,146,36],"detector","silence detector","title","slides","time","energy","at","recordings","detect","find","Audio","analysis","start","setup",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":38},"01M6XEVT3NGRN1FT7JPMAPXS6M","segment-combiner","Combine multiple segment detection results into a unified list. Use when you need to merge segments from different detectors, prepare removal lists for video processing, or consolidate detection outputs.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsegment-combiner\u002FSKILL.md",[],[121,154,97,155,156,157,158,26,24,159,160,117,120,161,162,36,163,164],"segment combiner","detection","prepare","merge","video processing","outputs","combine","processing","consolidate","results","list",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":174,"publishedAt":38},"01M6XEVMPVASGS2KX86QK4FMT7","report-generator","Generate compression reports for video processing. Use when you need to create structured JSON reports with duration statistics, compression ratios, and segment details after video processing.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Freport-generator\u002FSKILL.md",[171],{"categoryNo":172,"categoryName":173,"taxonomyType":79,"taxonomyTypeDesc":80},"01JBSEEDCAT000000000000034","行政与办公人员",[175,176,177,121,24,26,120,28,161,178,179,180,36,158,181,97,182,183,114],"generator","report generator","report","statistics","structured","reports","json","compression","generate"]