Pricing#
Price-determination subproblem and price consistency constraints.
Price Determination Subproblem#
API path: apem.order_book_based_model.euphemia.pricing.price_determination_subproblem
- class PriceSubproblem(master_problem)[source]#
Bases:
objectFormulate and solve the Euphemia price-determination subproblem.
The pricing model takes the current incumbent allocation from
MasterProblemand searches for market clearing prices that satisfy primal-dual consistency, PAB restrictions, MIC or MP conditions, and network-price coupling.- Parameters:
master_problem (MasterProblem)
- add_MIC_MP_constraints(order, step_order_df, order_type)[source]#
Add the MIC or MP revenue constraint for one accepted complex-style order.
- Parameters:
order (Series) – Parent complex or scalable complex order.
step_order_df (DataFrame) – Step-order dataframe containing the child bids.
order_type (OrderType) – Whether the parent order is complex or scalable complex.
- Return type:
None
- add_atc_price_consistency_constraints()[source]#
Add ATC active-set price coupling constraints based on incumbent flows.
For each directed arc
(i, j, t)with0 <= f <= cap:f == 0 -> MCP[j,t] <= MCP[i,t] f == cap -> MCP[j,t] >= MCP[i,t] 0 < f < cap -> MCP[j,t] == MCP[i,t]
- Return type:
None
- add_block_order_constraints()[source]#
Add surplus constraints for accepted block orders.
Standard accepted blocks must remain in the money, linked block families must have non-negative total surplus, and accepted linked leaf blocks must not create negative standalone surplus.
- Return type:
None
- add_complex_order_constraints()[source]#
Add pricing constraints for accepted complex orders.
- Return type:
None
- add_fbmc_price_consistency_constraints()[source]#
Add FBMC dual-consistent MCP/PTDF coupling based on incumbent net positions.
The formulation introduces one system price component per period and dual multipliers on FBMC constraints:
mu_up[c,t] >= 0 for PTDF * NP <= RAM mu_lo[c,t] >= 0 for PTDF * NP >= LB (when LB exists)
Zonal prices are linked through stationarity:
MCP[z,t] = lambda[t] - sum_c PTDF[c,t,z] * (mu_up[c,t] - mu_lo[c,t])
Active-set complementarity is enforced from the incumbent allocation:
if upper_slack > tol: mu_up[c,t] = 0 if lower_slack > tol: mu_lo[c,t] = 0
- Return type:
None
- add_linked_block_order_constraints(parent_order)[source]#
Add a non-negative family-surplus constraint for one linked parent block.
- Parameters:
parent_order (Series)
- Return type:
None
- add_linked_leafs_positive_surplus(child_order)[source]#
Add a non-negative surplus constraint for one accepted linked child block.
- Parameters:
child_order (Series)
- Return type:
None
- add_load_gradient_constraints(order, step_order_df, order_type)[source]#
Add a non-negative surplus constraint for one accepted load-gradient order.
- Parameters:
order (Series) – Parent complex or scalable complex order.
step_order_df (DataFrame) – Step-order dataframe containing the child bids.
order_type (OrderType) – Whether the parent order is complex or scalable complex.
- Return type:
None
- add_piecewise_linear_order_constraints()[source]#
Add price-consistency constraints for all piecewise-linear orders.
- Return type:
None
- add_scalable_complex_order_constraints()[source]#
Add pricing constraints for accepted scalable complex orders.
- Return type:
None
- add_step_order_constraint(step_order, infix)[source]#
Add price-consistency constraints for one step order.
Fully accepted step orders must be in the money, fully rejected step orders must be out of the money, and partially accepted step orders must clear at the order price.
- Parameters:
step_order (Series)
infix (str)
- Return type:
None
- add_step_order_constraints()[source]#
Add pricing constraints for all step orders in the incumbent allocation.
- Return type:
None
- extract_prices()[source]#
Extract the optimized market clearing prices from the pricing model.
- Returns:
A mapping keyed by period
tfor uniform pricing, or by(zone, t)for zonal pricing runs.- Return type:
dict[Any, float]
- solve_price_determination_subproblem()[source]#
Formulate and solve the full pricing model for the current allocation.
The objective keeps prices near the midpoint of the allowed price range while the constraints enforce order acceptance consistency and, when enabled, network price coupling and accepted-order revenue conditions.
- Return type:
None