Allocation#
APIs for market allocation and power-flow-model solving in the unit-based workflow.
API path: apem.unit_based_model.allocation
- class Allocation(
- welfare,
- x_bt,
- y_st,
- x_btl,
- y_stl,
- f_vwt,
- alpha_vt,
- u_st,
- phi_st,
- slack_vt,
- power_flow_model,
- runtime,
- num_vars,
- num_constrs,
- MIP_gap,
- num_cont_vars,
- num_bin_vars,
- dataset,
- f_vwkt=None,
Bases:
objectData and information related to an allocation, including the values of the optimization variables and statistics from the optimizer.
- consumed_real_power_per_node_period(node, period)[source]#
Compute total real power consumed in specified node and period.
- Parameters:
node (int) – Node for which the consumed real power is computed.
period (int) – Period for which the consumed real power in a node is computed.
- Returns:
Total consumed real power per specified node and period.
- Return type:
float
- excess_supply()[source]#
Compute total excess supply.
- Returns:
The difference between the accepted supply and demand.
- Return type:
float
- generated_real_power_per_node_period(node, period)[source]#
Compute total real power generated in specified node and period.
- Parameters:
node (int) – Node for which the generated real power is computed.
period (int) – Period for which the generated real power in a node is computed.
- Returns:
Total generated real power per specified node and period.
- Return type:
float
- class BuyersAllocation(x_bt, x_btl, df_buyers, blocks_buyers)[source]#
Bases:
objectThe results of an allocation that relate to the buyers.
- class SellersAllocation(y_st, y_stl, u_st, phi_st, df_sellers)[source]#
Bases:
objectThe results of an allocation that relate to the sellers.