Skip to content

Instantly share code, notes, and snippets.

@berkorbay
Created February 25, 2025 18:26
Show Gist options
  • Save berkorbay/5d7f49f6515e6b100152101afd37d854 to your computer and use it in GitHub Desktop.
Save berkorbay/5d7f49f6515e6b100152101afd37d854 to your computer and use it in GitHub Desktop.
Imbalance and KUPST costs using EPTR2
from eptr2.util.costs import calculate_diff_cost
res = calculate_diff_cost(
actual=50, forecast=100, mcp=1000.0, smp=2500.0, prod_source="solar"
)
## print(res)
# {
# "imbalances": {
# "diff": -50,
# "dsg_imbalance": -5.0,
# "net_dsg_imbalance": -5.0,
# "individual_imbalance": -45.0,
# "imb_tol_value": 5.0,
# },
# "imb_side": "neg",
# "costs": {
# "ind_imbalance_cost": 70875.0,
# "dsg_imb_cost": 7875.0,
# "net_dsg_imb_cost": 7875.0,
# "total_imb_cost": 78750.0,
# },
# "kupst": {
# "kupst_tol_perc": 0.1,
# "kupsm_tol": 10.0,
# "kupsm": 40.0,
# "unit_kupst_cost": 75.0,
# "kupst_cost": 3000.0,
# },
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment