diff --git a/README.md b/README.md index 6746a62bf..9f4fbe538 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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 @@ -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. @@ -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). diff --git a/assume/scenario/loader_csv.py b/assume/scenario/loader_csv.py index 87d007e66..99eebd99c 100644 --- a/assume/scenario/loader_csv.py +++ b/assume/scenario/loader_csv.py @@ -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: diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index e9ef48d8f..3e6d28c16 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -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) =========================================== diff --git a/examples/examples.py b/examples/examples.py index 98249a0a7..bbb0c1bc2 100644 --- a/examples/examples.py +++ b/examples/examples.py @@ -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) diff --git a/examples/inputs/example_03/config.yaml b/examples/inputs/example_03/config.yaml index c2c33a2d3..84900880f 100644 --- a/examples/inputs/example_03/config.yaml +++ b/examples/inputs/example_03/config.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 2ded5e6c8..b927495f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"}