[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XE31F28JR327JASFR9T21Z":3,"skill-same:01M6XE31F28JR327JASFR9T21Z":58},{"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":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":13,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6XE31F28JR327JASFR9T21Z","locational-marginal-prices",null,"Extract locational marginal prices (LMPs) from DC-OPF solutions using dual values. Use when computing nodal electricity prices, reserve clearing prices, or performing price impact analysis.","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\u002Fenergy-market-pricing\u002Fenvironment\u002Fskills\u002Flocational-marginal-prices\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31],"prices","locational marginal prices","analysis","extract","use","impact analysis","dc","price","impact","reserve","values","performing","when","solutions","2026-11-10 10:12:30",false,"---\nname: locational-marginal-prices\ndescription: \"Extract locational marginal prices (LMPs) from DC-OPF solutions using dual values. Use when computing nodal electricity prices, reserve clearing prices, or performing price impact analysis.\"\n---\n\n# Locational Marginal Prices (LMPs)\n\nLMPs are the marginal cost of serving one additional MW of load at each bus. In optimization terms, they are the **dual values** (shadow prices) of the nodal power balance constraints.\n\n## LMP Extraction from CVXPY\n\nTo extract LMPs, you must:\n1. Store references to the balance constraints\n2. Solve the problem\n3. Read the dual values after solving\n\n```python\nimport cvxpy as cp\n\n# Store balance constraints separately for dual extraction\nbalance_constraints = []\n\nfor i in range(n_bus):\n    pg_at_bus = sum(Pg[g] for g in range(n_gen) if gen_bus[g] == i)\n    pd = buses[i, 2] \u002F baseMVA\n\n    # Create constraint and store reference\n    balance_con = pg_at_bus - pd == B[i, :] @ theta\n    balance_constraints.append(balance_con)\n    constraints.append(balance_con)\n\n# Solve\nprob = cp.Problem(cp.Minimize(cost), constraints)\nprob.solve(solver=cp.CLARABEL)\n\n# Extract LMPs from duals\nlmp_by_bus = []\nfor i in range(n_bus):\n    bus_num = int(buses[i, 0])\n    dual_val = balance_constraints[i].dual_value\n\n    # Scale: constraint is in per-unit, multiply by baseMVA to get $\u002FMWh\n    lmp = float(dual_val) * baseMVA if dual_val is not None else 0.0\n    lmp_by_bus.append({\n        \"bus\": bus_num,\n        \"lmp_dollars_per_MWh\": round(lmp, 2)\n    })\n```\n\n## LMP Sign Convention\n\nFor a balance constraint written as `generation - load == net_export`:\n- **Positive LMP**: Increasing load at that bus increases total cost (typical case)\n- **Negative LMP**: Increasing load at that bus *decreases* total cost\n\nNegative LMPs commonly occur when:\n- Cheap generation is trapped behind a congested line (can't export power)\n- Adding load at that bus relieves congestion by consuming local excess generation\n- The magnitude can be very large in heavily congested networks (thousands of $\u002FMWh)\n\nNegative LMPs are physically valid and expected in congested systems — they are not errors.\n\n## Reserve Clearing Price\n\nThe reserve MCP is the dual of the system reserve requirement constraint:\n\n```python\n# Store reference to reserve constraint\nreserve_con = cp.sum(Rg) >= reserve_requirement\nconstraints.append(reserve_con)\n\n# After solving:\nreserve_mcp = float(reserve_con.dual_value) if reserve_con.dual_value is not None else 0.0\n```\n\nThe reserve MCP represents the marginal cost of providing one additional MW of reserve capacity system-wide.\n\n## Finding Binding Lines\n\nLines at or near thermal limits (≥99% loading) cause congestion and LMP separation. See the `dc-power-flow` skill for line flow calculation details.\n\n```python\nBINDING_THRESHOLD = 99.0  # Percent loading\n\nbinding_lines = []\nfor k, br in enumerate(branches):\n    f = bus_num_to_idx[int(br[0])]\n    t = bus_num_to_idx[int(br[1])]\n    x, rate = br[3], br[5]\n\n    if x != 0 and rate > 0:\n        b = 1.0 \u002F x\n        flow_MW = b * (theta.value[f] - theta.value[t]) * baseMVA\n        loading_pct = abs(flow_MW) \u002F rate * 100\n\n        if loading_pct >= BINDING_THRESHOLD:\n            binding_lines.append({\n                \"from\": int(br[0]),\n                \"to\": int(br[1]),\n                \"flow_MW\": round(float(flow_MW), 2),\n                \"limit_MW\": round(float(rate), 2)\n            })\n```\n\n## Counterfactual Analysis\n\nTo analyze the impact of relaxing a transmission constraint:\n\n1. **Solve base case** — record costs, LMPs, and binding lines\n2. **Modify constraint** — e.g., increase a line's thermal limit\n3. **Solve counterfactual** — with the relaxed constraint\n4. **Compute impact** — compare costs and LMPs\n\n```python\n# Modify line limit (e.g., increase by 20%)\nfor k in range(n_branch):\n    br_from, br_to = int(branches[k, 0]), int(branches[k, 1])\n    if (br_from == target_from and br_to == target_to) or \\\n       (br_from == target_to and br_to == target_from):\n        branches[k, 5] *= 1.20  # 20% increase\n        break\n\n# After solving both cases:\ncost_reduction = base_cost - cf_cost  # Should be >= 0\n\n# LMP changes per bus\nfor bus_num in base_lmp_map:\n    delta = cf_lmp_map[bus_num] - base_lmp_map[bus_num]\n    # Negative delta = price decreased (congestion relieved)\n\n# Congestion relieved if line was binding in base but not in counterfactual\ncongestion_relieved = was_binding_in_base and not is_binding_in_cf\n```\n\n### Economic Intuition\n\n- **Relaxing a binding constraint** cannot increase cost (may decrease or stay same)\n- **Cost reduction** quantifies the shadow price of the constraint\n- **LMP convergence** after relieving congestion indicates reduced price separation\n","# Locational Marginal Prices (LMPs)\n\nLMPs are the marginal cost of serving one additional MW of load at each bus. In optimization terms, they are the **dual values** (shadow prices) of the nodal power balance constraints.\n\n## LMP Extraction from CVXPY\n\nTo extract LMPs, you must:\n1. Store references to the balance constraints\n2. Solve the problem\n3. Read the dual values after solving\n\n```python\nimport cvxpy as cp\n\n# Store balance constraints separately for dual extraction\nbalance_constraints = []\n\nfor i in range(n_bus):\n    pg_at_bus = sum(Pg[g] for g in range(n_gen) if gen_bus[g] == i)\n    pd = buses[i, 2] \u002F baseMVA\n\n    # Create constraint and store reference\n    balance_con = pg_at_bus - pd == B[i, :] @ theta\n    balance_constraints.append(balance_con)\n    constraints.append(balance_con)\n\n# Solve\nprob = cp.Problem(cp.Minimize(cost), constraints)\nprob.solve(solver=cp.CLARABEL)\n\n# Extract LMPs from duals\nlmp_by_bus = []\nfor i in range(n_bus):\n    bus_num = int(buses[i, 0])\n    dual_val = balance_constraints[i].dual_value\n\n    # Scale: constraint is in per-unit, multiply by baseMVA to get $\u002FMWh\n    lmp = float(dual_val) * baseMVA if dual_val is not None else 0.0\n    lmp_by_bus.append({\n        \"bus\": bus_num,\n        \"lmp_dollars_per_MWh\": round(lmp, 2)\n    })\n```\n\n## LMP Sign Convention\n\nFor a balance constraint written as `generation - load == net_export`:\n- **Positive LMP**: Increasing load at that bus increases total cost (typical case)\n- **Negative LMP**: Increasing load at that bus *decreases* total cost\n\nNegative LMPs commonly occur when:\n- Cheap generation is trapped behind a congested line (can't export power)\n- Adding load at that bus relieves congestion by consuming local excess generation\n- The magnitude can be very large in heavily congested networks (thousands of $\u002FMWh)\n\nNegative LMPs are physically valid and expected in congested systems — they are not errors.\n\n## Reserve Clearing Price\n\nThe reserve MCP is the dual of the system reserve requirement constraint:\n\n```python\n# Store reference to reserve constraint\nreserve_con = cp.sum(Rg) >= reserve_requirement\nconstraints.append(reserve_con)\n\n# After solving:\nreserve_mcp = float(reserve_con.dual_value) if reserve_con.dual_value is not None else 0.0\n```\n\nThe reserve MCP represents the marginal cost of providing one additional MW of reserve capacity system-wide.\n\n## Finding Binding Lines\n\nLines at or near thermal limits (≥99% loading) cause congestion and LMP separation. See the `dc-power-flow` skill for line flow calculation details.\n\n```python\nBINDING_THRESHOLD = 99.0  # Percent loading\n\nbinding_lines = []\nfor k, br in enumerate(branches):\n    f = bus_num_to_idx[int(br[0])]\n    t = bus_num_to_idx[int(br[1])]\n    x, rate = br[3], br[5]\n\n    if x != 0 and rate > 0:\n        b = 1.0 \u002F x\n        flow_MW = b * (theta.value[f] - theta.value[t]) * baseMVA\n        loading_pct = abs(flow_MW) \u002F rate * 100\n\n        if loading_pct >= BINDING_THRESHOLD:\n            binding_lines.append({\n                \"from\": int(br[0]),\n                \"to\": int(br[1]),\n                \"flow_MW\": round(float(flow_MW), 2),\n                \"limit_MW\": round(float(rate), 2)\n            })\n```\n\n## Counterfactual Analysis\n\nTo analyze the impact of relaxing a transmission constraint:\n\n1. **Solve base case** — record costs, LMPs, and binding lines\n2. **Modify constraint** — e.g., increase a line's thermal limit\n3. **Solve counterfactual** — with the relaxed constraint\n4. **Compute impact** — compare costs and LMPs\n\n```python\n# Modify line limit (e.g., increase by 20%)\nfor k in range(n_branch):\n    br_from, br_to = int(branches[k, 0]), int(branches[k, 1])\n    if (br_from == target_from and br_to == target_to) or \\\n       (br_from == target_to and br_to == target_from):\n        branches[k, 5] *= 1.20  # 20% increase\n        break\n\n# After solving both cases:\ncost_reduction = base_cost - cf_cost  # Should be >= 0\n\n# LMP changes per bus\nfor bus_num in base_lmp_map:\n    delta = cf_lmp_map[bus_num] - base_lmp_map[bus_num]\n    # Negative delta = price decreased (congestion relieved)\n\n# Congestion relieved if line was binding in base but not in counterfactual\ncongestion_relieved = was_binding_in_base and not is_binding_in_cf\n```\n\n### Economic Intuition\n\n- **Relaxing a binding constraint** cannot increase cost (may decrease or stay same)\n- **Cost reduction** quantifies the shadow price of the constraint\n- **LMP convergence** after relieving congestion indicates reduced price separation\n",{"name":5,"description":7},"main","7eeb258ada72b7f58119b0e7a2c00ea89d9beedd","tasks\u002Fenergy-market-pricing\u002Fenvironment\u002Fskills\u002Flocational-marginal-prices","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":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add Waaaalnut\u002Fskillsbench --skill locational-marginal-prices",{"tool":50,"command":51},"bunx","bunx skills add Waaaalnut\u002Fskillsbench --skill locational-marginal-prices",{"tool":53,"command":54},"pnpm","pnpm dlx skills add Waaaalnut\u002Fskillsbench --skill locational-marginal-prices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fenergy-market-pricing\u002Fenvironment\u002Fskills\u002Flocational-marginal-prices\u002FSKILL.md",true,[],[59,73,88,114,135,154],{"skillNo":60,"name":61,"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":62,"categories":63,"keywords":69,"publishedAt":32},"01M6XEWMJ6VY3ZC53MPDCPG3GH","data-reconciliation","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fxlsx-recover-data\u002Fenvironment\u002Fskills\u002Fdata-reconciliation\u002FSKILL.md",[64],{"categoryNo":65,"categoryName":66,"taxonomyType":67,"taxonomyTypeDesc":68},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[70,71,72],"data reconciliation","reconciliation","data",{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":32},"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",[],[80,81,82,83,84,85,86,87],"speech","text","speech to text","transcribe video","whisper","model","Video","transcribe",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":99,"publishedAt":32},"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",[94],{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[86,100,101,102,103,104,30,105,106,107,108,109,110,111,112,22,113],"processor","video processor","batch","create","reels","parts","segments","process","videos","you","segment","filter","ffmpeg","remove",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":121,"publishedAt":32},"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",[120],{"categoryNo":95,"categoryName":96,"taxonomyType":97,"taxonomyTypeDesc":98},[122,123,124,125,30,109,126,127,128,129,130,106,131,132,86,20,133,134,22],"detector","silence detector","title","slides","time","energy","at","recordings","detect","find","Audio","start","setup",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":32},"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",[],[110,142,86,143,144,145,146,147,30,148,149,106,109,150,151,22,152,153],"segment combiner","detection","prepare","merge","video processing","for","outputs","combine","processing","consolidate","results","list",{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":163,"publishedAt":32},"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",[160],{"categoryNo":161,"categoryName":162,"taxonomyType":67,"taxonomyTypeDesc":68},"01JBSEEDCAT000000000000034","行政与办公人员",[164,165,166,110,30,147,109,167,150,168,169,170,22,146,171,86,172,173,103],"generator","report generator","report","with","statistics","structured","reports","json","compression","generate"]