Skip to content
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f955b58
- adjusted example to have nodal pricing and redispatch
kim-mskw Nov 20, 2025
d7396e6
- simplified three node example in example_01d base
kim-mskw Dec 2, 2025
5400f08
include s_max_pu in lines.csv
gugrimm Dec 3, 2025
02eb7cc
function to calculate PTDF using PyPSA
gugrimm Dec 3, 2025
6570802
add s_max_pu to line loading calculation in redispatch
gugrimm Dec 3, 2025
0acd5d4
calculate OPF with PTDF: changes to energy balance and transmission c…
gugrimm Dec 3, 2025
659aedf
code snippet to extract dispatch directly from pyomo model
gugrimm Dec 3, 2025
9ac2999
fix error in complex clearing
gugrimm Dec 4, 2025
99287c1
revert "fix error in complex clearing"
gugrimm Dec 8, 2025
1e3b461
Revert "code snippet to extract dispatch directly from pyomo model"
gugrimm Dec 8, 2025
5e0cf9c
Revert "calculate OPF with PTDF: changes to energy balance and transm…
gugrimm Dec 8, 2025
5bbf454
Revert "function to calculate PTDF using PyPSA"
gugrimm Dec 8, 2025
4f2f94f
print warning if 'x' in lines.csv - 'x' not used
gugrimm Dec 8, 2025
7fe808d
add additional fields for nodal clearing in config
gugrimm Dec 8, 2025
17dadad
introduce nodal clearing using PyPSA
gugrimm Dec 8, 2025
a9caf01
- revert example changes for PR
kim-mskw Dec 10, 2025
c02fe21
- fix flow logging of nodal clearing
kim-mskw Dec 10, 2025
e712ae4
added description of NTC based clearing to ComplexClearingRole
gugrimm Dec 16, 2025
2180e0f
integrated storage units bids into NodalClearing
gugrimm Dec 16, 2025
8a91ae3
added orderbook validation
gugrimm Dec 17, 2025
39eb3ff
deleted double validation of volumes in orderbook
gugrimm Dec 17, 2025
22177c3
extra example for nodal clearing
gugrimm Dec 17, 2025
557f7c9
update installation doku with hint on NTC based and nodal clearing
gugrimm Dec 17, 2025
2a20616
print warning "this is a NTC based clearing" earlier, in ComplexClear…
gugrimm Dec 17, 2025
2e401e0
add storages to nodal_clearing
gugrimm Dec 22, 2025
1e1ac85
nodal clearing: test for 2h clearing and 1h clearing with storage
gugrimm Dec 22, 2025
404ff59
avoid KeyError when units did not bid but are present in network
gugrimm Dec 22, 2025
496ecf0
adjusted config from EOM to nodal to match bidding_market pattern of …
gugrimm Dec 22, 2025
eaad9ef
avoid storages present in grid data to bid to nodal market with produ…
gugrimm Dec 22, 2025
5f7372a
set count to 24 again
gugrimm Dec 22, 2025
754039d
adjust opening freq
gugrimm Dec 22, 2025
949a75d
clean up and silence pandas future_stack warning
gugrimm Dec 22, 2025
af3acc1
documentation and release notes
gugrimm Dec 22, 2025
ffcf5b8
removed storage.csv from example 01d
gugrimm Dec 22, 2025
cdfc107
Merge branch 'main' into redispacth_and_nodal_pricing_bug
gugrimm Dec 22, 2025
47a6e76
formatting by pre-commit
gugrimm Dec 22, 2025
3f18d15
Merge branch 'redispacth_and_nodal_pricing_bug' of https://github.com…
gugrimm Dec 22, 2025
fc9ab70
pre-commit
gugrimm Dec 22, 2025
2ddc9f1
Merge branch 'main' of https://github.com/assume-framework/assume int…
kim-mskw Dec 23, 2025
4f332ef
- revert to old base example configuration
kim-mskw Dec 23, 2025
45e8064
- add limitation about market clearing with multiple products
kim-mskw Dec 23, 2025
e631ef6
add check if .csv are present in loader_csv
gugrimm Dec 23, 2025
62451f9
pre-commit
gugrimm Dec 23, 2025
b9bba0a
adjust test
gugrimm Dec 23, 2025
d8f975c
tiny typo
kim-mskw Dec 23, 2025
dd97a27
Merge branch 'redispacth_and_nodal_pricing_bug' of https://github.com…
kim-mskw Dec 23, 2025
08b36e9
ruff
gugrimm Dec 23, 2025
4a7a4d1
Merge remote-tracking branch 'origin' into redispacth_and_nodal_prici…
kim-mskw Dec 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<!-- SPDX-FileCopyrightText: ASSUME Developers -->
<!--
SPDX-FileCopyrightText: ASSUME Developers

SPDX-License-Identifier: AGPL-3.0-or-later
-->

<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
## Related Issue
Closes #<issue‑number>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pip install 'assume-framework[learning]'
Please keep in mind, that the above installation method will install pytorch package without CUDA support.
If you want to make use of your GPU with CUDA cores, please install pytorch with GPU support separately as described [here](https://pytorch.org/get-started/locally/).

We also include **network-based market clearing algorithms** such as for the re-dispatch or nodal market clearing, which requires the PyPSA library.
We also include **network-based market clearing algorithms** such as for the re-dispatch, zonal clearing with NTCs and nodal market clearing, which all require the PyPSA library.
To install the package with these capabilities, use:

```bash
Expand Down
3 changes: 2 additions & 1 deletion assume/markets/clearing_algorithms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
# try importing pypsa if it is installed
try:
from .redispatch import RedispatchMarketRole

from .nodal_clearing import NodalClearingRole
clearing_mechanisms["redispatch"] = RedispatchMarketRole
clearing_mechanisms["nodal_clearing"] = NodalClearingRole
except ImportError:
pass
20 changes: 16 additions & 4 deletions assume/markets/clearing_algorithms/complex_clearing.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,18 @@ def energy_balance_rule(model, node, t):
)

if incidence_matrix is not None:
# add NTCs
model.transmission_constr = pyo.ConstraintList()
for t in model.T:
for line in model.lines:
capacity = lines.at[line, "s_nom"]
# s_max_pu might also be time variant. but for now we assume it is static
s_max_pu = (
lines.at[line, "s_max_pu"]
if "s_max_pu" in lines.columns
and not pd.isna(lines.at[line, "s_max_pu"])
else 1.0
)
capacity = lines.at[line, "s_nom"] * s_max_pu
# Limit the flow on each line
model.transmission_constr.add(model.flows[t, line] <= capacity)
model.transmission_constr.add(model.flows[t, line] >= -capacity)
Expand Down Expand Up @@ -290,8 +298,8 @@ class ComplexClearingRole(MarketRole):
"""
This class defines an optimization-based market clearing algorithm with support for complex bid types,
including block bids, linked bids, minimum acceptance ratios, and profiled volumes. It supports network
representations with either zonal or nodal configurations, enabling the modeling of complex markets with
multiple zones and power flow constraints.
representations (through Net Transfer Capacities) with either zonal or nodal configurations, enabling the modeling of complex markets with
multiple zones based on a transport model.

The market clearing algorithm accepts additional arguments via the ``param_dict`` in the market configuration.

Expand Down Expand Up @@ -344,6 +352,11 @@ def __init__(self, marketconfig: MarketConfig):
self.lines = self.grid_data["lines"]
buses = self.grid_data["buses"]

if "x" in self.lines.columns:
logger.warning(
"Warning: 'lines.csv' contains reactances 'x' but this clearing is based on Net Transfer Capacities only (Transport model). Use 'nodal_clearing' to include a linear OPF."
)

self.zones_id = self.marketconfig.param_dict.get("zones_identifier")
self.node_to_zone = None

Expand Down Expand Up @@ -779,7 +792,6 @@ def extract_results(
if hasattr(model, "flows"):
flows = model.flows

# filter flows and only use positive flows to half the size of the dict
flows_filtered = {
index: flow.value for index, flow in flows.items() if not flow.stale
}
Expand Down
Loading