Order-Book-Based Model#
The order-book-based model represents the market through submitted buy and sell
orders rather than explicit generator-unit identities. In APEM, this workflow is
implemented by the apem.order_book_based_model.euphemia package and is designed
for Euphemia-style day-ahead clearing studies where accepted order sets, price
feasibility, and decomposition behavior are central outputs.
This page is the documentation entry point for the order-book-based Euphemia workflow, including its public solver entrypoint and the main supporting components.
What This Module Covers#
Euphemia-style order-book clearing workflow.
Public runner entrypoint for executing Euphemia scenarios.
Solver core covering orchestration and model formulation.
Cut strategy, pricing, and reinsertion routines.
Dataset parsing and conversion for order-book inputs.
Typical Execution Flow#
Parse and normalize order-book and network input files.
Build the Euphemia-style optimization model and constraints.
Solve the master problem with configured cut/reinsertion strategy.
Run pricing and feasibility checks on accepted orders.
Export accepted orders, prices, and diagnostics for analysis.
See Also#
Main APEM framework overview and conceptual description of this workflow: APEM: Allocation and Pricing in Electricity Markets
Module-level implementation overview:
apem.order_book_based_model.euphemiaDirect section reference: Two Main Modeling Workflows -> Order-Book-Based Model
Support APIs#
Euphemia Configuration#
API path: apem.order_book_based_model.euphemia.euphemia_config
- class EuphemiaConfig[source]#
Bases:
objectConfiguration object and override validation for Euphemia algorithm.
- apply_overrides(overrides)[source]#
Apply validated configuration overrides from
config.json.- Parameters:
overrides (Mapping[str, Any])
- Return type:
None
- set_dataset(dataset)[source]#
Set the dataset to use.
- Parameters:
dataset (OrderBookBased_Datasets)
- Return type:
None
Runner#
API path: apem.order_book_based_model.euphemia.runner
- solve_euphemia(dataset, cut_type, config_overrides=None)[source]#
Solve a Euphemia scenario and return the run output directory. Constructs a
EuphemiaConfigobject, applies configuration overrides, loads the selected dataset into aZonalScenario, and starts theMasterProblemsolve loop.- Parameters:
dataset (OrderBookBased_Datasets) – Order-book dataset to parse and solve.
cut_type (CutTypes) – Cutting strategy used by the master problem.
config_overrides (Dict[str, Any] | None) – Optional overrides applied to
EuphemiaConfigbefore the solve starts.
- Returns:
Absolute path to the created run directory.
- Return type:
str
Enums#
Enum definitions used in Euphemia configuration and solver flow.
Cut Types#
API path: apem.order_book_based_model.euphemia.enums.cut_types
Datasets#
API path: apem.order_book_based_model.euphemia.enums.datasets
Order Types#
API path: apem.order_book_based_model.euphemia.enums.order_types