Pricing#

APIs for pricing algorithms and utilities in unit-based runs.

Pricing Algorithms#

API path: apem.unit_based_model.pricing.algorithms.pricing_algorithm

class PricingAlgorithm[source]#

Bases: ABC

Abstract class to be extended by all pricing algorithms.

Pricing Results#

API path: apem.unit_based_model.pricing.analysis.pricing

class Pricing(
node_prices,
line_congestion_prices=None,
used_algorithm=None,
runtime=None,
num_vars=None,
num_constrs=None,
glocs=None,
llocs=None,
mwps=None,
line_congestion_prices_per_edge=None,
)[source]#

Bases: object

Pricing result.

Parameters:
  • node_prices (dict[tuple[Any, Any], float])

  • line_congestion_prices (dict[Any, float] | None)

  • used_algorithm (str | None)

  • runtime (float | None)

  • num_vars (int | None)

  • num_constrs (int | None)

  • glocs (GLOCS | None)

  • llocs (LLOCS | None)

  • mwps (MWPS | None)

  • line_congestion_prices_per_edge (dict[Any, float] | None)

class GLOCS(
total_glocs,
glocs_buyers,
glocs_sellers,
glocs_network,
glocs_per_buyer,
glocs_per_seller,
glocs_per_line,
)[source]#

Bases: Objective

Global lost opportunity costs (GLOCs).

For participant l with optimal allocation z* and prices p:

\(\mathrm{GLOC}_l(p \mid z^*) = \hat{u}_l(p) - u_l(z^* \mid p)\).

Here, \(\hat{u}_l(p)\) is the maximum profit/utility participant l can obtain over all feasible deviations at prices p. Therefore, GLOCs capture incentives to deviate from the welfare-maximizing allocation to any feasible alternative.

Component interpretation:

  • glocs_buyers: aggregate GLOC over buyers

  • glocs_sellers: aggregate GLOC over sellers

  • glocs_network: aggregate GLOC over network/line participants

  • total_glocs: aggregate GLOC over all participants

Parameters:
  • total_glocs (float)

  • glocs_buyers (float)

  • glocs_sellers (float)

  • glocs_network (float)

  • glocs_per_buyer (dict[Any, float])

  • glocs_per_seller (dict[Any, float])

  • glocs_per_line (dict[Any, float])

class LLOCS(
total_llocs,
llocs_buyers,
llocs_sellers,
llocs_network,
llocs_per_buyer,
llocs_per_seller,
llocs_per_line,
)[source]#

Bases: Objective

Local lost opportunity costs (LLOCs).

For participant l with optimal allocation z* and prices p:

\(\mathrm{LLOC}_l(p \mid z^*) = \hat{u}'_l(p) - u_l(z^* \mid p)\).

\(\hat{u}'_l(p)\) maximizes utility only over allocations in the domain of the active cost/valuation function at z* (fixed commitment/operating regime). Therefore, LLOCs capture incentives for local deviations, such as volume changes, while not allowing commitment switching.

Component interpretation:

  • llocs_buyers: aggregate LLOC over buyers

  • llocs_sellers: aggregate LLOC over sellers

  • llocs_network: aggregate LLOC over network/line participants

  • total_llocs: aggregate LLOC over all participants

Parameters:
  • total_llocs (float)

  • llocs_buyers (float)

  • llocs_sellers (float)

  • llocs_network (float)

  • llocs_per_buyer (dict[Any, float])

  • llocs_per_seller (dict[Any, float])

  • llocs_per_line (dict[Any, float])

class MWPS(
total_mwps,
mwps_buyers,
mwps_sellers,
mwps_network,
mwps_per_buyer,
mwps_per_seller,
mwps_per_line,
)[source]#

Bases: Objective

Make-whole payments (MWPs).

For participant l with optimal allocation z* and prices p:

\(\mathrm{MWP}_l(p \mid z^*) = \max(-u_l(z^* \mid p), 0)\).

MWPs are the compensation required to prevent losses under the realized dispatch and prices (individual rationality). They are equivalent to LOCs that only consider deviation to non-participation (leaving the market), and are a subset of GLOCs.

Component interpretation:

  • mwps_buyers: make-whole payments assigned to buyers

  • mwps_sellers: make-whole payments assigned to sellers

  • mwps_network: network/congestion-related payment component

  • total_mwps: total uplift amount

Parameters:
  • total_mwps (float)

  • mwps_buyers (float)

  • mwps_sellers (float)

  • mwps_network (float)

  • mwps_per_buyer (dict[Any, float])

  • mwps_per_seller (dict[Any, float])

  • mwps_per_line (dict[Any, float])