Economic Dispatch#
Baseline DC economic-dispatch model utilities used by market-based node-ranking methods.
API path: node_ranking.economic_dispatch
Helpers for building and solving the baseline DC economic-dispatch model.
These utilities convert APEM unit-based datasets into the simplified input format used by the node-ranking routines and solve the baseline dispatch model that feeds several market-based node scores.
- build_dispatch_inputs(dataset, period=None)[source]#
Build dispatch input dictionaries from a unit-based dataset.
- Parameters:
dataset (UnitBased_Datasets) – Dataset enum entry to parse.
period (int or None) – If provided, extract inputs for that single period. Otherwise, build a period-aggregated representation.
- Returns:
(nodes, gens, lines)for the selected period or period-average.- Return type:
tuple[dict, dict, dict]
- economic_dispatch_cost(dataset, fail_nodes=None, period=None, VOLL=500.0)[source]#
Compute total dispatch cost and total load shed.
- Parameters:
dataset (UnitBased_Datasets) – Dataset enum entry to solve.
fail_nodes (iterable or None, default=None) – Node labels whose generators should be disabled.
period (int or None, default=None) – If provided, solve a single-period problem.
VOLL (float, default=500.0) – Value of lost load used as the load-shedding penalty.
- Returns:
(cost, shed_total)if the dispatch problem is solved to optimality, otherwiseNone.- Return type:
tuple[float, float] or None
- solve_economic_dispatch(dataset, fail_nodes=None, period=None, VOLL=500.0)[source]#
Solve DC economic dispatch with optional generator-node interdictions.
Uses a single-period model if period is provided, otherwise period-averaged inputs.
Interdiction semantics in this model:
A node listed in fail_nodes is not removed from the network.
Transmission lines incident to that node remain available.
Demand at that node is still present and must be served or shed.
Only generators connected to interdicted nodes are forced unavailable (their dispatch upper bound is set to zero).
In other words, this is a generator-node interdiction (GNI) model, not a bus-outage or line-outage model.
- Parameters:
dataset (UnitBased_Datasets) – Dataset enum entry to parse and solve.
fail_nodes (iterable or None, default=None) – Node labels whose generators should be disabled.
period (int or None, default=None) – If provided, solve a single-period problem. Otherwise, solve on the period-aggregated representation built by
build_dispatch_inputs().VOLL (float, default=500.0) – Value of lost load used as the load-shedding penalty.
- Returns:
Noneif the optimization is not optimal. Otherwise a dictionary containing at leastcost,shed_total,dispatch,lambdas,gamma,shed,flows,mu_plus, andmu_minus.- Return type:
dict or None