Redact text from PDF documents for blind review anonymization
日本語の概要は準備中です。原文の説明を表示しています。
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.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
LMPs 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.
To extract LMPs, you must:
import cvxpy as cp
# Store balance constraints separately for dual extraction
balance_constraints = []
for i in range(n_bus):
pg_at_bus = sum(Pg[g] for g in range(n_gen) if gen_bus[g] == i)
pd = buses[i, 2] / baseMVA
# Create constraint and store reference
balance_con = pg_at_bus - pd == B[i, :] @ theta
balance_constraints.append(balance_con)
constraints.append(balance_con)
# Solve
prob = cp.Problem(cp.Minimize(cost), constraints)
prob.solve(solver=cp.CLARABEL)
# Extract LMPs from duals
lmp_by_bus = []
for i in range(n_bus):
bus_num = int(buses[i, 0])
dual_val = balance_constraints[i].dual_value
# Scale: constraint is in per-unit, multiply by baseMVA to get $/MWh
lmp = float(dual_val) * baseMVA if dual_val is not None else 0.0
lmp_by_bus.append({
"bus": bus_num,
"lmp_dollars_per_MWh": round(lmp, 2)
})
For a balance constraint written as generation - load == net_export:
Negative LMPs commonly occur when:
Negative LMPs are physically valid and expected in congested systems — they are not errors.
The reserve MCP is the dual of the system reserve requirement constraint:
# Store reference to reserve constraint
reserve_con = cp.sum(Rg) >= reserve_requirement
constraints.append(reserve_con)
# After solving:
reserve_mcp = float(reserve_con.dual_value) if reserve_con.dual_value is not None else 0.0
The reserve MCP represents the marginal cost of providing one additional MW of reserve capacity system-wide.
Lines at or near thermal limits (≥99% loading) cause congestion and LMP separation. See the dc-power-flow skill for line flow calculation details.
BINDING_THRESHOLD = 99.0 # Percent loading
binding_lines = []
for k, br in enumerate(branches):
f = bus_num_to_idx[int(br[0])]
t = bus_num_to_idx[int(br[1])]
x, rate = br[3], br[5]
if x != 0 and rate > 0:
b = 1.0 / x
flow_MW = b * (theta.value[f] - theta.value[t]) * baseMVA
loading_pct = abs(flow_MW) / rate * 100
if loading_pct >= BINDING_THRESHOLD:
binding_lines.append({
"from": int(br[0]),
"to": int(br[1]),
"flow_MW": round(float(flow_MW), 2),
"limit_MW": round(float(rate), 2)
})
To analyze the impact of relaxing a transmission constraint:
# Modify line limit (e.g., increase by 20%)
for k in range(n_branch):
br_from, br_to = int(branches[k, 0]), int(branches[k, 1])
if (br_from == target_from and br_to == target_to) or \
(br_from == target_to and br_to == target_from):
branches[k, 5] *= 1.20 # 20% increase
break
# After solving both cases:
cost_reduction = base_cost - cf_cost # Should be >= 0
# LMP changes per bus
for bus_num in base_lmp_map:
delta = cf_lmp_map[bus_num] - base_lmp_map[bus_num]
# Negative delta = price decreased (congestion relieved)
# Congestion relieved if line was binding in base but not in counterfactual
congestion_relieved = was_binding_in_base and not is_binding_in_cf
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Redact text from PDF documents for blind review anonymization
日本語の概要は準備中です。原文の説明を表示しています。
Use this skill when reading sensor data from CSV files, writing simulation results to CSV, processing time-series data with pandas, or handling missing values in datasets.
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。
A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.
日本語の概要は準備中です。原文の説明を表示しています。
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a "report", "memo", "letter", "template", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
日本語の概要は準備中です。原文の説明を表示しています。
Generator economic dispatch and cost optimization for power systems. Use when minimizing generation costs, computing optimal generator setpoints, calculating operating margins, or working with generator cost functions.
日本語の概要は準備中です。原文の説明を表示しています。