[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BQNVNWDAM0YT4RH7C9EP03":3,"skill-same:01M7BQNVNWDAM0YT4RH7C9EP03":45},{"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":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BQNVNWDAM0YT4RH7C9EP03","unit-commitment-operating-rules",null,"Use for day-ahead or multi-period unit commitment problems, including thermal on\u002Foff schedules, dispatch, startup\u002Fshutdown logic, minimum up\u002Fdown time, ramping, spinning reserve deliverability, renewable curtailment, operating-cost accounting, and independent feasibility checks for power-system operations schedules.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fdata\u002Fskillsbench87\u002Freferences\u002Fenergy-unit-commitment\u002Fskills\u002Funit-commitment-operating-rules\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: unit-commitment-operating-rules\ndescription: Use for day-ahead or multi-period unit commitment problems, including thermal on\u002Foff schedules, dispatch, startup\u002Fshutdown logic, minimum up\u002Fdown time, ramping, spinning reserve deliverability, renewable curtailment, operating-cost accounting, and independent feasibility checks for power-system operations schedules.\n---\n\n# Unit Commitment Operating Rules\n\nUse this skill when a task asks for a day-ahead or multi-period unit commitment schedule with generators, load, reserves, operating constraints, and cost tradeoffs.\n\nThis is a reusable UC operating guide. It gives formulation and validation patterns, not a complete task-specific mathematical model.\n\n## UC In One Paragraph\n\nUnit commitment decides which generators are online over time, when they start or stop, how much they produce, and how much reserve they can physically provide. It is harder than hourly economic dispatch because startup\u002Fshutdown decisions, ramping, minimum up\u002Fdown time, reserve deliverability, initial conditions, and cost curves couple one period to the next.\n\n## Keep These Concepts Separate\n\nFor each thermal unit `g` and period `t`:\n\n```python\nu[g, t]      # commitment\u002Fon status, binary\nstart[g, t]  # startup transition, binary\nstop[g, t]   # shutdown transition, binary\np[g, t]      # production variable: know whether actual MW or above-minimum MW\nr[g, t]      # scheduled reserve\n```\n\nReports often require actual MW output. Many UC models internally use output above minimum:\n\n```python\nactual_output = pmin[g] * u[g, t] + p_above_min[g, t]\np_above_min = actual_output - pmin[g] * u[g, t]\n```\n\nDo not mix these conventions in ramping, reserve, cost, or reporting.\n\n## Mandatory Production-Representation Contract\n\nBefore adding any capacity, ramp, startup\u002Fshutdown, reserve, balance, or cost row, write down a one-line model contract declaring whether the continuous thermal production variable is **actual MW** or **MW above minimum**. Do not start coding those rows until this contract is fixed.\n\nThe safest default for formulations with startup\u002Fshutdown capability and ramp deliverability is often an above-minimum variable:\n\n```python\npbar[g, t] = actual_output[g, t] - pmin[g] * u[g, t]\ncap[g] = pmax[g] - pmin[g]\n```\n\nThen the core rows have one consistent meaning:\n\n```python\n0 \u003C= pbar[g, t] \u003C= cap[g] * u[g, t]\n\n# headroom plus startup capability\npbar[g, t] + r[g, t] \u003C= (\n    cap[g] * u[g, t]\n    - max(pmax[g] - startup_limit[g], 0.0) * start[g, t]\n)\n\n# pre-shutdown capability when stop[t+1] means the unit turns off next period\npbar[g, t] + r[g, t] \u003C= (\n    cap[g] * u[g, t]\n    - max(pmax[g] - shutdown_limit[g], 0.0) * stop[g, t + 1]\n)\n\nprev_pbar = initial_on[g] * (initial_output[g] - pmin[g]) if t == 0 else pbar[g, t - 1]\npbar[g, t] + r[g, t] - prev_pbar \u003C= ramp_up[g]\nprev_pbar - pbar[g, t] \u003C= ramp_down[g]\n```\n\nIf you instead model **actual MW** `P`, derive the algebraically equivalent rows rather than copying the above-minimum equations verbatim. Since `pbar = P - pmin*u`, ramping becomes:\n\n```python\nprev_P = initial_output[g] if t == 0 else P[g, t - 1]\nprev_u = initial_on[g] if t == 0 else u[g, t - 1]\n\nP[g, t] + r[g, t] - prev_P - pmin[g] * (u[g, t] - prev_u) \u003C= ramp_up[g]\nprev_P - P[g, t] - pmin[g] * (prev_u - u[g, t]) \u003C= ramp_down[g]\n```\n\nThe `pmin * delta_u` terms are essential at transitions. Using only `P[t] + r[t] - P[t-1] \u003C= ramp_up` on actual MW incorrectly charges the minimum stable output as ramp movement during an off-to-on transition. Likewise, `P[t-1] - P[t] \u003C= ramp_down` incorrectly charges minimum output again at shutdown.\n\nFor actual MW, the startup\u002Fheadroom row is equivalently:\n\n```python\nP[g, t] + r[g, t] \u003C= (\n    pmax[g] * u[g, t]\n    - max(pmax[g] - startup_limit[g], 0.0) * start[g, t]\n)\n```\n\nand demand balance uses actual MW directly. For above-minimum variables, demand balance must add the minimum-output term:\n\n```python\nsum(pbar[g, t] + pmin[g] * u[g, t] for g in thermal_units) + renewable_generation[t] == demand[t]\n```\n\n### Mandatory transition hand-case gate\n\nBefore solving the full horizon, evaluate the **actual encoded row coefficients** on at least these cases for a representative unit:\n\n1. steady online: `u_prev=1, u=1`;\n2. startup at minimum output: `u_prev=0, u=1, P=pmin`;\n3. shutdown from minimum output: `u_prev=1, u=0, P_prev=pmin`.\n\nIn case 2, minimum stable output must map to `pbar=0`; it must not consume `pmin` MW of ordinary ramp allowance solely because the unit changed commitment state. In case 3 the symmetric rule applies. If the hand case fails, the representation is mixed and the full model must not be solved or reported yet.\n\nKeep the representation contract next to the implementation and reuse it in independent validation. Validation must not simply copy the same mixed-convention algebra from the optimization model.\n\n## Core Feasibility Checks\n\nBefore reporting a schedule, independently verify:\n\n- every resource appears exactly once and all time-series have length `T`;\n- commitment, startup, and shutdown are binary;\n- offline thermal units have zero production and zero reserve;\n- online thermal units respect min\u002Fmax output;\n- must-run units are online when required;\n- startup\u002Fshutdown indicators match commitment transitions;\n- demand balance holds in every period;\n- renewable output stays within period-specific bounds;\n- scheduled reserve meets the system requirement;\n- reserve is deliverable under headroom, startup\u002Fshutdown capability, and ramp limits;\n- minimum up\u002Fdown time and initial conditions are respected;\n- cost and summary fields are recomputed from arrays.\n\n## Transition Logic\n\nLink startup\u002Fshutdown to commitment and the initial state:\n\n```python\nprev_u = initial_on[g] if t == 0 else u[g, t - 1]\nu[g, t] - prev_u == start[g, t] - stop[g, t]\nstart[g, t] + stop[g, t] \u003C= 1\n```\n\nEquivalent validation pattern:\n\n```python\nprev_on = initial_on[g]\nfor t in range(T):\n    assert start[g, t] == int(u[g, t] == 1 and prev_on == 0)\n    assert stop[g, t] == int(u[g, t] == 0 and prev_on == 1)\n    prev_on = u[g, t]\n```\n\n## Capacity And Offline Zeroes\n\nFor actual-MW production:\n\n```python\npmin[g] * u[g, t] \u003C= production[g, t] \u003C= pmax[g] * u[g, t]\n0 \u003C= reserve[g, t]\n```\n\nFor above-minimum production:\n\n```python\ncap = pmax[g] - pmin[g]\n0 \u003C= p_above_min[g, t] \u003C= cap * u[g, t]\n0 \u003C= reserve[g, t]\n```\n\nIf `u[g, t] == 0`, both production and reserve must be zero.\n\n## Demand, Renewables, And System Reserve\n\nUse the task's system\u002Fzone\u002Fnetwork convention. For a single-zone system:\n\n```python\nthermal_gen = sum(actual_thermal[g, t] for g in thermal_units)\nrenew_gen = sum(renewable_output[r, t] for r in renewable_units)\nassert abs(thermal_gen + renew_gen - demand[t]) \u003C= tol\nassert sum(reserve[g, t] for g in thermal_units) >= reserve_requirement[t] - tol\n```\n\nRenewables:\n\n```python\nrenewable_min[r, t] \u003C= renewable_output[r, t] \u003C= renewable_max[r, t]\n```\n\nIf min equals max, output is fixed. If curtailment is allowed, output may be below max. Do not count renewable headroom as spinning reserve unless the prompt explicitly allows it.\n\n## Reserve Deliverability\n\nReserve is not just unused nameplate capacity. Production and reserve compete for the same physical capability, and reserve must be deployable.\n\nHeadroom-only checks are too weak:\n\n```python\n# Not enough by itself:\nreserve[g, t] \u003C= pmax[g] - production[g, t]\nreserve[g, t] \u003C= ramp_up[g]\n```\n\nUse joint production-plus-reserve checks. With actual-MW production:\n\n```python\nproduction[g, t] + reserve[g, t] \u003C= pmax[g] * u[g, t]\n```\n\nWith above-minimum production:\n\n```python\np_above_min[g, t] + reserve[g, t] \u003C= (pmax[g] - pmin[g]) * u[g, t]\n```\n\nStartup capability can tighten the startup period. If `startup_limit` is maximum total output during startup:\n\n```python\nif start[g, t] == 1:\n    production[g, t] + reserve[g, t] \u003C= startup_limit[g]\n```\n\nA linear above-minimum pattern is:\n\n```python\nstartup_reduction = max(pmax[g] - startup_limit[g], 0.0)\np_above_min[g, t] + reserve[g, t] \u003C= (\n    (pmax[g] - pmin[g]) * u[g, t]\n    - startup_reduction * start[g, t]\n)\n```\n\nApply analogous shutdown-period or pre-shutdown capability rules when the data and prompt require them.\n\n## Ramping\n\nUse initial output\u002Fstatus for the first period. When reserve must be deliverable, ramp-up usually applies to production plus reserve:\n\n```python\nprevious = initial_above_min[g] if t == 0 else p_above_min[g, t - 1]\np_above_min[g, t] + reserve[g, t] - previous \u003C= ramp_up[g]\nprevious - p_above_min[g, t] \u003C= ramp_down[g]\n```\n\nIf your model uses actual production, use the exact conversion in the Mandatory Production-Representation Contract above; do not apply these above-minimum rows directly to actual MW. Recheck ramping after any dispatch or repair step.\n\n## Minimum Up\u002FDown Time\n\nMinimum up\u002Fdown constraints are time-window constraints triggered by starts\u002Fstops. Validation pattern:\n\n```python\nif start[g, t] == 1:\n    for tau in range(t, min(T, t + min_up[g])):\n        assert u[g, tau] == 1\n\nif stop[g, t] == 1:\n    for tau in range(t, min(T, t + min_down[g])):\n        assert u[g, tau] == 0\n```\n\nAccount for pre-horizon time already on\u002Foff. Follow the prompt on whether post-horizon obligations are enforced.\n\n## Startup Costs\n\nStartup cost may depend on prior offline duration. A common tier rule is largest lag not exceeding prior offline duration:\n\n```python\ndef choose_startup_cost(tiers, offline_duration):\n    tiers = sorted(tiers, key=lambda z: z[\"lag\"])\n    chosen = tiers[0]\n    for tier in tiers:\n        if tier[\"lag\"] \u003C= offline_duration:\n            chosen = tier\n        else:\n            break\n    return chosen[\"cost\"]\n```\n\nUpdate offline duration from initial status and the commitment trajectory. Be careful: duration should describe time offline before the startup period.\n\n## Production Costs\n\nUse only cost components present in the data or required by the prompt. Do not invent no-load, reserve, curtailment, shutdown, or ramping costs.\n\nFor total-cost breakpoints:\n\n```python\ndef total_cost_from_curve(points, output_mw):\n    pts = sorted((p[\"mw\"], p[\"cost\"]) for p in points)\n    if output_mw \u003C= pts[0][0]:\n        return pts[0][1]\n    if output_mw >= pts[-1][0]:\n        return pts[-1][1]\n    for (x0, y0), (x1, y1) in zip(pts, pts[1:]):\n        if x0 \u003C= output_mw \u003C= x1:\n            return y0 + (output_mw - x0) * (y1 - y0) \u002F (x1 - x0)\n    raise ValueError(\"output outside curve\")\n```\n\nIf the first point is at minimum output, its cost may represent online minimum-output cost. Do not add another fixed online cost unless the data says so.\n\n## Implementation Workflow\n\n1. Parse and normalize resource\u002Ftime arrays.\n2. Freeze the production representation contract and pass its transition hand-case gate.\n3. Include hard feasibility constraints before optimizing cost.\n4. Extract the solution into the report convention.\n5. Run independent validation on extracted arrays using the report\u002Fphysical convention rather than blindly reusing model rows.\n6. Recompute costs and summaries from arrays.\n7. For an economical\u002Fobjective-scored task, inspect starts\u002Fstops and run the independent objective-quality gate from the MILP workflow before claiming optimality.\n8. Write `\"pass\"` checks only after validation passes.\n\n## Common Pitfalls\n\n- Treating UC as independent hourly dispatch.\n- Counting reserve from offline units or renewable headroom.\n- Checking reserve headroom but forgetting startup or ramp deliverability.\n- Mixing actual MW and above-minimum MW in transition or ramp rows.\n- Charging `pmin` as ordinary ramp movement on startup or shutdown.\n- Ignoring initial output in first-period ramping.\n- Ignoring initial on\u002Foff duration in minimum up\u002Fdown constraints.\n- Trusting a repair LP that omits a constraint family.\n- Trusting a zero MIP gap without auditing the encoded formulation and economic signature.\n- Hard-coding `\"pass\"` fields before validation.\n","# Unit Commitment Operating Rules\n\nUse this skill when a task asks for a day-ahead or multi-period unit commitment schedule with generators, load, reserves, operating constraints, and cost tradeoffs.\n\nThis is a reusable UC operating guide. It gives formulation and validation patterns, not a complete task-specific mathematical model.\n\n## UC In One Paragraph\n\nUnit commitment decides which generators are online over time, when they start or stop, how much they produce, and how much reserve they can physically provide. It is harder than hourly economic dispatch because startup\u002Fshutdown decisions, ramping, minimum up\u002Fdown time, reserve deliverability, initial conditions, and cost curves couple one period to the next.\n\n## Keep These Concepts Separate\n\nFor each thermal unit `g` and period `t`:\n\n```python\nu[g, t]      # commitment\u002Fon status, binary\nstart[g, t]  # startup transition, binary\nstop[g, t]   # shutdown transition, binary\np[g, t]      # production variable: know whether actual MW or above-minimum MW\nr[g, t]      # scheduled reserve\n```\n\nReports often require actual MW output. Many UC models internally use output above minimum:\n\n```python\nactual_output = pmin[g] * u[g, t] + p_above_min[g, t]\np_above_min = actual_output - pmin[g] * u[g, t]\n```\n\nDo not mix these conventions in ramping, reserve, cost, or reporting.\n\n## Mandatory Production-Representation Contract\n\nBefore adding any capacity, ramp, startup\u002Fshutdown, reserve, balance, or cost row, write down a one-line model contract declaring whether the continuous thermal production variable is **actual MW** or **MW above minimum**. Do not start coding those rows until this contract is fixed.\n\nThe safest default for formulations with startup\u002Fshutdown capability and ramp deliverability is often an above-minimum variable:\n\n```python\npbar[g, t] = actual_output[g, t] - pmin[g] * u[g, t]\ncap[g] = pmax[g] - pmin[g]\n```\n\nThen the core rows have one consistent meaning:\n\n```python\n0 \u003C= pbar[g, t] \u003C= cap[g] * u[g, t]\n\n# headroom plus startup capability\npbar[g, t] + r[g, t] \u003C= (\n    cap[g] * u[g, t]\n    - max(pmax[g] - startup_limit[g], 0.0) * start[g, t]\n)\n\n# pre-shutdown capability when stop[t+1] means the unit turns off next period\npbar[g, t] + r[g, t] \u003C= (\n    cap[g] * u[g, t]\n    - max(pmax[g] - shutdown_limit[g], 0.0) * stop[g, t + 1]\n)\n\nprev_pbar = initial_on[g] * (initial_output[g] - pmin[g]) if t == 0 else pbar[g, t - 1]\npbar[g, t] + r[g, t] - prev_pbar \u003C= ramp_up[g]\nprev_pbar - pbar[g, t] \u003C= ramp_down[g]\n```\n\nIf you instead model **actual MW** `P`, derive the algebraically equivalent rows rather than copying the above-minimum equations verbatim. Since `pbar = P - pmin*u`, ramping becomes:\n\n```python\nprev_P = initial_output[g] if t == 0 else P[g, t - 1]\nprev_u = initial_on[g] if t == 0 else u[g, t - 1]\n\nP[g, t] + r[g, t] - prev_P - pmin[g] * (u[g, t] - prev_u) \u003C= ramp_up[g]\nprev_P - P[g, t] - pmin[g] * (prev_u - u[g, t]) \u003C= ramp_down[g]\n```\n\nThe `pmin * delta_u` terms are essential at transitions. Using only `P[t] + r[t] - P[t-1] \u003C= ramp_up` on actual MW incorrectly charges the minimum stable output as ramp movement during an off-to-on transition. Likewise, `P[t-1] - P[t] \u003C= ramp_down` incorrectly charges minimum output again at shutdown.\n\nFor actual MW, the startup\u002Fheadroom row is equivalently:\n\n```python\nP[g, t] + r[g, t] \u003C= (\n    pmax[g] * u[g, t]\n    - max(pmax[g] - startup_limit[g], 0.0) * start[g, t]\n)\n```\n\nand demand balance uses actual MW directly. For above-minimum variables, demand balance must add the minimum-output term:\n\n```python\nsum(pbar[g, t] + pmin[g] * u[g, t] for g in thermal_units) + renewable_generation[t] == demand[t]\n```\n\n### Mandatory transition hand-case gate\n\nBefore solving the full horizon, evaluate the **actual encoded row coefficients** on at least these cases for a representative unit:\n\n1. steady online: `u_prev=1, u=1`;\n2. startup at minimum output: `u_prev=0, u=1, P=pmin`;\n3. shutdown from minimum output: `u_prev=1, u=0, P_prev=pmin`.\n\nIn case 2, minimum stable output must map to `pbar=0`; it must not consume `pmin` MW of ordinary ramp allowance solely because the unit changed commitment state. In case 3 the symmetric rule applies. If the hand case fails, the representation is mixed and the full model must not be solved or reported yet.\n\nKeep the representation contract next to the implementation and reuse it in independent validation. Validation must not simply copy the same mixed-convention algebra from the optimization model.\n\n## Core Feasibility Checks\n\nBefore reporting a schedule, independently verify:\n\n- every resource appears exactly once and all time-series have length `T`;\n- commitment, startup, and shutdown are binary;\n- offline thermal units have zero production and zero reserve;\n- online thermal units respect min\u002Fmax output;\n- must-run units are online when required;\n- startup\u002Fshutdown indicators match commitment transitions;\n- demand balance holds in every period;\n- renewable output stays within period-specific bounds;\n- scheduled reserve meets the system requirement;\n- reserve is deliverable under headroom, startup\u002Fshutdown capability, and ramp limits;\n- minimum up\u002Fdown time and initial conditions are respected;\n- cost and summary fields are recomputed from arrays.\n\n## Transition Logic\n\nLink startup\u002Fshutdown to commitment and the initial state:\n\n```python\nprev_u = initial_on[g] if t == 0 else u[g, t - 1]\nu[g, t] - prev_u == start[g, t] - stop[g, t]\nstart[g, t] + stop[g, t] \u003C= 1\n```\n\nEquivalent validation pattern:\n\n```python\nprev_on = initial_on[g]\nfor t in range(T):\n    assert start[g, t] == int(u[g, t] == 1 and prev_on == 0)\n    assert stop[g, t] == int(u[g, t] == 0 and prev_on == 1)\n    prev_on = u[g, t]\n```\n\n## Capacity And Offline Zeroes\n\nFor actual-MW production:\n\n```python\npmin[g] * u[g, t] \u003C= production[g, t] \u003C= pmax[g] * u[g, t]\n0 \u003C= reserve[g, t]\n```\n\nFor above-minimum production:\n\n```python\ncap = pmax[g] - pmin[g]\n0 \u003C= p_above_min[g, t] \u003C= cap * u[g, t]\n0 \u003C= reserve[g, t]\n```\n\nIf `u[g, t] == 0`, both production and reserve must be zero.\n\n## Demand, Renewables, And System Reserve\n\nUse the task's system\u002Fzone\u002Fnetwork convention. For a single-zone system:\n\n```python\nthermal_gen = sum(actual_thermal[g, t] for g in thermal_units)\nrenew_gen = sum(renewable_output[r, t] for r in renewable_units)\nassert abs(thermal_gen + renew_gen - demand[t]) \u003C= tol\nassert sum(reserve[g, t] for g in thermal_units) >= reserve_requirement[t] - tol\n```\n\nRenewables:\n\n```python\nrenewable_min[r, t] \u003C= renewable_output[r, t] \u003C= renewable_max[r, t]\n```\n\nIf min equals max, output is fixed. If curtailment is allowed, output may be below max. Do not count renewable headroom as spinning reserve unless the prompt explicitly allows it.\n\n## Reserve Deliverability\n\nReserve is not just unused nameplate capacity. Production and reserve compete for the same physical capability, and reserve must be deployable.\n\nHeadroom-only checks are too weak:\n\n```python\n# Not enough by itself:\nreserve[g, t] \u003C= pmax[g] - production[g, t]\nreserve[g, t] \u003C= ramp_up[g]\n```\n\nUse joint production-plus-reserve checks. With actual-MW production:\n\n```python\nproduction[g, t] + reserve[g, t] \u003C= pmax[g] * u[g, t]\n```\n\nWith above-minimum production:\n\n```python\np_above_min[g, t] + reserve[g, t] \u003C= (pmax[g] - pmin[g]) * u[g, t]\n```\n\nStartup capability can tighten the startup period. If `startup_limit` is maximum total output during startup:\n\n```python\nif start[g, t] == 1:\n    production[g, t] + reserve[g, t] \u003C= startup_limit[g]\n```\n\nA linear above-minimum pattern is:\n\n```python\nstartup_reduction = max(pmax[g] - startup_limit[g], 0.0)\np_above_min[g, t] + reserve[g, t] \u003C= (\n    (pmax[g] - pmin[g]) * u[g, t]\n    - startup_reduction * start[g, t]\n)\n```\n\nApply analogous shutdown-period or pre-shutdown capability rules when the data and prompt require them.\n\n## Ramping\n\nUse initial output\u002Fstatus for the first period. When reserve must be deliverable, ramp-up usually applies to production plus reserve:\n\n```python\nprevious = initial_above_min[g] if t == 0 else p_above_min[g, t - 1]\np_above_min[g, t] + reserve[g, t] - previous \u003C= ramp_up[g]\nprevious - p_above_min[g, t] \u003C= ramp_down[g]\n```\n\nIf your model uses actual production, use the exact conversion in the Mandatory Production-Representation Contract above; do not apply these above-minimum rows directly to actual MW. Recheck ramping after any dispatch or repair step.\n\n## Minimum Up\u002FDown Time\n\nMinimum up\u002Fdown constraints are time-window constraints triggered by starts\u002Fstops. Validation pattern:\n\n```python\nif start[g, t] == 1:\n    for tau in range(t, min(T, t + min_up[g])):\n        assert u[g, tau] == 1\n\nif stop[g, t] == 1:\n    for tau in range(t, min(T, t + min_down[g])):\n        assert u[g, tau] == 0\n```\n\nAccount for pre-horizon time already on\u002Foff. Follow the prompt on whether post-horizon obligations are enforced.\n\n## Startup Costs\n\nStartup cost may depend on prior offline duration. A common tier rule is largest lag not exceeding prior offline duration:\n\n```python\ndef choose_startup_cost(tiers, offline_duration):\n    tiers = sorted(tiers, key=lambda z: z[\"lag\"])\n    chosen = tiers[0]\n    for tier in tiers:\n        if tier[\"lag\"] \u003C= offline_duration:\n            chosen = tier\n        else:\n            break\n    return chosen[\"cost\"]\n```\n\nUpdate offline duration from initial status and the commitment trajectory. Be careful: duration should describe time offline before the startup period.\n\n## Production Costs\n\nUse only cost components present in the data or required by the prompt. Do not invent no-load, reserve, curtailment, shutdown, or ramping costs.\n\nFor total-cost breakpoints:\n\n```python\ndef total_cost_from_curve(points, output_mw):\n    pts = sorted((p[\"mw\"], p[\"cost\"]) for p in points)\n    if output_mw \u003C= pts[0][0]:\n        return pts[0][1]\n    if output_mw >= pts[-1][0]:\n        return pts[-1][1]\n    for (x0, y0), (x1, y1) in zip(pts, pts[1:]):\n        if x0 \u003C= output_mw \u003C= x1:\n            return y0 + (output_mw - x0) * (y1 - y0) \u002F (x1 - x0)\n    raise ValueError(\"output outside curve\")\n```\n\nIf the first point is at minimum output, its cost may represent online minimum-output cost. Do not add another fixed online cost unless the data says so.\n\n## Implementation Workflow\n\n1. Parse and normalize resource\u002Ftime arrays.\n2. Freeze the production representation contract and pass its transition hand-case gate.\n3. Include hard feasibility constraints before optimizing cost.\n4. Extract the solution into the report convention.\n5. Run independent validation on extracted arrays using the report\u002Fphysical convention rather than blindly reusing model rows.\n6. Recompute costs and summaries from arrays.\n7. For an economical\u002Fobjective-scored task, inspect starts\u002Fstops and run the independent objective-quality gate from the MILP workflow before claiming optimality.\n8. Write `\"pass\"` checks only after validation passes.\n\n## Common Pitfalls\n\n- Treating UC as independent hourly dispatch.\n- Counting reserve from offline units or renewable headroom.\n- Checking reserve headroom but forgetting startup or ramp deliverability.\n- Mixing actual MW and above-minimum MW in transition or ramp rows.\n- Charging `pmin` as ordinary ramp movement on startup or shutdown.\n- Ignoring initial output in first-period ramping.\n- Ignoring initial on\u002Foff duration in minimum up\u002Fdown constraints.\n- Trusting a repair LP that omits a constraint family.\n- Trusting a zero MIP gap without auditing the encoded formulation and economic signature.\n- Hard-coding `\"pass\"` fields before validation.\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fdata\u002Fskillsbench87\u002Freferences\u002Fenergy-unit-commitment\u002Fskills\u002Funit-commitment-operating-rules",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill unit-commitment-operating-rules",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill unit-commitment-operating-rules",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill unit-commitment-operating-rules","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fdata\u002Fskillsbench87\u002Freferences\u002Fenergy-unit-commitment\u002Fskills\u002Funit-commitment-operating-rules\u002FSKILL.md",true,[],[46,53,60,67,72,77],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":68,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":73,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":78,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]