This source did not publish a separate summary. Review SKILL.md before using the skill.
SKILL.md
Unit Commitment Structured Data Parsing
Use this skill when a unit commitment task provides structured data and you need to map fields into UC concepts. The source may be JSON, CSV, spreadsheets, database tables, or nested dictionaries. The prompt and schema are the source of truth; do not assume one benchmark or package.
Parsing Workflow
Load data with structured parsers: JSON as objects, CSV/sheets as tables, databases as query results.
Pick one internal convention and convert carefully for reporting, ramping, reserve deliverability, and cost.
Startup Tiers
Startup tiers are usually keyed by prior offline duration. Parse thresholds and costs without assuming order.
def choose_startup_tier(tiers, prior_offline_duration):
tiers = sorted(tiers, key=lambda x: x["lag"])
chosen = tiers[0]
for tier in tiers:
if tier["lag"] <= prior_offline_duration:
chosen = tier
else:
break
return chosen
Keep prior offline duration consistent with initial status and transition timing.
Cost Curves
Identify whether points are total cost, marginal cost, incremental segment cost, or heat-rate data. For total-cost breakpoints:
def interpolate_total_cost(points, output_mw):
pts = sorted((float(p["mw"]), float(p["cost"])) for p in points)
if output_mw <= pts[0][0]:
return pts[0][1]
if output_mw >= pts[-1][0]:
return pts[-1][1]
for (x0, y0), (x1, y1) in zip(pts, pts[1:]):
if x0 <= output_mw <= x1:
a = (output_mw - x0) / (x1 - x0)
return y0 + a * (y1 - y0)
raise ValueError("output outside cost curve")
If the first point is at minimum output, it may represent online minimum-output cost. Do not invent additional no-load or shutdown costs unless provided.
Renewables
Parse hourly minimum and maximum output.
If min equals max, output is fixed in that period.
If curtailment is allowed, output can be anywhere between min and max.
Do not count renewable headroom as spinning reserve unless explicitly allowed.
Renewable cost is zero unless the task/data says otherwise.
Parser-Level Validation
Before solving, check:
assert np.all(np.isfinite(demand))
assert np.all(np.isfinite(reserve_requirement))
assert np.all(thermal_pmin <= thermal_pmax)
assert np.all(renewable_min <= renewable_max)
assert all(len(curve) >= 2 for curve in production_curves.values())
assert all(len(tiers) >= 1 for tiers in startup_tiers.values())