Skip to content

Commit

Permalink
Prepare for new release (#540)
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-harder authored Feb 4, 2025
1 parent d188c77 commit 4b9b7b0
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 20 deletions.
38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,27 @@ To install the core package:
pip install assume-framework
```

To install with reinforcement learning capabilities:
**To install with reinforcement learning capabilities:**

```bash
pip install 'assume-framework[learning]'
```

We also include network-based market clearing algorithms such as for the re-dispatch or nodal market clearing, which requires the PyPSA library. To install the package with these capabilities, use:
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. To install the package with these capabilities, use:

```bash
pip install 'assume-framework[network]'
```

To install with testing capabilities:
To install with all capabilities:

```bash
pip install 'assume-framework[test]'
pip install 'assume-framework[all]'
```


### Timescale Database and Grafana Dashboards

If you want to benefit from a supported database and integrated Grafana dashboards for scenario analysis, you can use the provided Docker Compose file.
Expand All @@ -82,11 +85,6 @@ docker-compose up -d

This will launch a container for TimescaleDB and Grafana with preconfigured dashboards for analysis. You can access the Grafana dashboards at `http://localhost:3000`.

### Using Learning Capabilities

If you intend to use the reinforcement learning capabilities of ASSUME and train your agents, make sure to install Torch. Detailed installation instructions can be found [here](https://pytorch.org/get-started/locally/).



## Trying out ASSUME and the provided Examples

Expand Down Expand Up @@ -144,8 +142,20 @@ For additional CLI options, run `assume -h`.
## Development

If you're contributing to the development of ASSUME, follow these steps:
1. Clone the repository and navigate to its directory:

1. Install pre-commit:
```bash
git clone https://github.com/assume-framework/assume.git
cd assume
```

2. Install the package in editable mode:

```bash
pip install -e ".[all]"
```

3. Install pre-commit:

```bash
pip install pre-commit
Expand All @@ -158,6 +168,12 @@ To run pre-commit checks directly, use:
pre-commit run --all-files
```

4. Install also testing capabilities:

```bash
pip install -e ".[testing]"
```

### Release

To release a new version, increase the version in `pyproject.toml` and create a git tag of the release commit and release notes in GitHub.
Expand Down Expand Up @@ -199,6 +215,6 @@ ASSUME is funded by the Federal Ministry for Economic Affairs and Climate Action

## License

Copyright 2022-2024 [ASSUME developers](https://assume.readthedocs.io/en/latest/developers.html).
Copyright 2022-2025 [ASSUME developers](https://assume.readthedocs.io/en/latest/developers.html).

ASSUME is licensed under the [GNU Affero General Public License v3.0](./LICENSES/AGPL-3.0-or-later.txt). This license is a strong copyleft license that requires that any derivative work be licensed under the same terms as the original work. It is approved by the [Open Source Initiative](https://opensource.org/licenses/AGPL-3.0).
10 changes: 10 additions & 0 deletions assume/scenario/loader_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ def load_file(

df = df.loc[index]

else:
# Check if duplicate unit names exist and raise an error
duplicates = df.index[df.index.duplicated()].unique()

if len(duplicates) > 0:
duplicate_names = ", ".join(duplicates)
raise ValueError(
f"Duplicate unit names found in {file_name}: {duplicate_names}. Please rename them to avoid conflicts."
)

return df

except FileNotFoundError:
Expand Down
15 changes: 13 additions & 2 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,35 @@ Upcoming Release
The features in this section are not released yet, but will be part of the next release! To use the features already you have to install the main branch,
e.g. ``pip install git+https://github.com/assume-framework/assume``


v0.5.1 - (3rd February 2025)
===========================================
**New Features:**

- **Exchange Unit**: A new unit type for modeling **energy trading** between market participants. It supports **buying (importing) and selling (exporting) energy**, with user-defined prices.
Check **example_01a**, **example_03**, and the files **"exchange_units.csv"** and **"exchanges_df.csv"** for usage examples.
- **Market Contracts and Support Policies**: it is now possible to simulate the auctioning of support policies, like feed-in tariff, PPA, CfD or a market premium.
The contracts are auctioned and then have a regular contract execution, to compensate according to the contracts dynamic, based on the historic market price and unit dispatch (#542).
- **Merit Order Plot** on the default Grafana Dashboard - showing a deeper view into the bidding behavior of the market actors.
Additionally, a graph showing the market result per generation technology has been added (#531).

**Improvements:**

- **Multi-agent DRL fix**: Addressed a critical bug affecting action sampling, ensuring correct multi-agent learning.
- **Performance boost**: Optimized training efficiency, achieving **2x overall speedup** and up to **5x on CUDA devices**.
- **Learning Observation Space Scaling:** Instead of the formerly used max sclaing of the observation space, we added a min-max scaling to the observation space.
This allows for a more robust scaling of the observation space for future analysis.
- **Learning Observation Space Scaling:** Instead of the formerly used max scaling of the observation space, we added a min-max scaling to the observation space.
This allows for a more robust scaling of the observation space for future analysis (#508).
- **Allow Multi-Market Bidding Strategies**: Added the possibility to define a bidding strategy for multiple markets. Now when the same bidding strategy is used for two or more markets,
the strategy is only created once and the same instance is used for all of these markets.
- **Improve Storage Behavior**: Storages were using the current unmodified SoC instead of the final SoC of last hour, leading to always using the initial value to calculate discharge possibility.(#524)
- **OEDS Loader**: when using the OEDS as a database, the queries have been adjusted to the latest update of the MarktStammDatenRegister. Time-sensitive fuel costs for gas, coal and oil are available from the OEDS as well.
This also includes various fixes to the behavior of the DMAS market and complex powerplant strategies (#532).

**Bug Fixes:**

- **Update PyPSA Version:** Fixes example "small_with_redispatch"; adjustments to tutorials 10 and 11 to remove DeprecationWarnings.
- **Fixes to the documentation** documentation and example notebooks were updated to be compatible with the latest changes to the framework (#530, #537, #543)
- **postgresql17** - using the docker container in the default compose.yml requires to backup or delete the existing assume-db folder. Afterwards, no permission changes should be required anymore when setting up the DB (#541)

v0.5.0 - (10th December 2024)
===========================================
Expand Down
2 changes: 2 additions & 0 deletions examples/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

log = logging.getLogger(__name__)

# define the path where the simulation results in form of CSV files will be stored, for example: "examples/outputs"
# "" means no CSV files will be stored
csv_path = ""

os.makedirs("./examples/local_db", exist_ok=True)
Expand Down
12 changes: 6 additions & 6 deletions examples/inputs/example_03/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

base_case_2019:
start_date: 2019-01-01 00:00
end_date: 2019-02-01 00:00
end_date: 2019-12-31 00:00
time_step: 1h
industrial_dsm_units: null
save_frequency_hours: 720
Expand Down Expand Up @@ -60,7 +60,7 @@ dam_case_2019:

eom_crm_case_2019:
start_date: 2019-01-01 00:00
end_date: 2019-02-01 00:00
end_date: 2019-12-31 00:00
time_step: 1h
industrial_dsm_units: null
save_frequency_hours: 720
Expand All @@ -72,11 +72,11 @@ eom_crm_case_2019:
EOM:
operator: EOM_operator
product_type: energy
start_date: 2019-01-01 1:00
start_date: 2019-01-01 2:00
products:
- duration: 1h
count: 1
first_delivery: 1h
first_delivery: 2h
opening_frequency: 1h
opening_duration: 1h
volume_unit: MWh
Expand All @@ -93,7 +93,7 @@ eom_crm_case_2019:
products:
- duration: 4h
count: 1
first_delivery: 1h
first_delivery: 4h
opening_frequency: 4h
opening_duration: 1h
volume_unit: MW
Expand All @@ -110,7 +110,7 @@ eom_crm_case_2019:
products:
- duration: 4h
count: 1
first_delivery: 1h
first_delivery: 4h
opening_frequency: 4h
opening_duration: 1h
volume_unit: MW
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "assume-framework"
version = "0.5.0"
version = "0.5.1"
description = "ASSUME - Agent-Based Electricity Markets Simulation Toolbox"
authors = [{ name = "ASSUME Developers", email = "contact@assume-project.de"}]
license = {text = "AGPL-3.0-or-later"}
Expand Down

0 comments on commit 4b9b7b0

Please sign in to comment.