Assume-framework

Latest version: v0.5.2

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.5.2

**New Features:**

- **TensorBoard Integration:** To enable better monitoring of the learning progress and comparison between different runs, we have added the possibility to use TensorBoard for logging
the learning progress. To use this feature, please follow the instructions in the README.
- **Building Class:** Introduced a new ``Building`` class to represent residential and tertiary buildings. This enhancement allows users to define a building type along with
associated technology components, facilitating a more detailed investigation of energy consumption and flexibility potential. The building can also be defined as a prosumer or consumer.
When a building is defined as prosumer, it actively participates in electricity trading, allowing the operator/resident to sell excess energy to the grid. In contrast,
a consumer represents a traditional energy consumer focusing solely on energy consumption without trading capabilities.

**Improvements:**

- **Changed SoC Definition**: The state of charge (SoC) for storage units is now defined as the SoC at the beginning of the respective timestep, reflecting the entire available capacity before having submitted any bids.
This change ensures that the SoC is consistently interpretable. Discharging and charging action in the respective hour are then reflected by the next SoC.
- **Multi-market participation configuration**: Respect the `eligible_obligations_lambda` set in the `MarketConfig` to only bid on markets where the UnitsOperator fulfills the requirements.
Changes the behavior to not participate on markets when no unit has a matching bidding strategy for this market.
- **Learning Performance:** The learning performance for large multi-agent learning setups has been significantly improved by introducing several learning stabilization techniques.
This leads to a more stable learning process and faster convergence. It also allows for running simulations with a larger number of agents that achieve comparable results to historical data.
For example, running example_03a for the year 2019, one can achieve an RMSE of 10.22 EUR/MWh and MAE of 6.52 EUR/MWh for hourly market prices, and an RMSE of 6.8 EUR/MWh and MAE of 4.6 EUR/MWh when
using daily average prices. This is a significant improvement compared to the previous version of the framework.

**Bug Fixes:**

- **Storage Learning Strategy:** Fixed a bug in the storage learning strategy that caused the learning process to fail or perform poorly. The bug was related to the way the storage was updating the state of charge.
This has been fixed, and the learning process for storage units is now stable and performs well. It also improved the performance of non-learning bidding strategies for storage units. Further reduced the actions number to one which reflects discharge and charge actions.
- **Wrong train_freq Handling:** Fixed a bug where, if the simulation length was not a multiple of the train_freq, the remaining simulation steps were not used for training, causing the training to fail.
This has been fixed, and now the train_freq is adjusted dynamically to fit the simulation length. The user is also informed about the adjusted train_freq in the logs.
- **Logging of Learning Parameters:** Fixed the way learning parameters were logged, which previously used a different simulation_id for each episode, leading to very slow performance of the learning Grafana dashboard.
Now, the learning parameters are logged using the same simulation_id for each episode, which significantly improves the performance of the learning Grafana dashboard.
- **Learning Reward Writing:** Fixed a bug where the reward was wrongly transformed with a reshape instead of a transpose when writing the reward to the database. This caused the reward to be written in the wrong format when working with multiple units.
The bug did affect learning process with heterogeneous agents mainly. This has been fixed, and now the reward is written in the correct format.

**Code Refactoring**

- Moved common functions to DSMFlex.
- Added tests for the ``Building`` class.
- Refactored variable names for better readability and consistency.
- Restructured the process sequence for improved efficiency.

0.5.1

**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 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)

**New Contributors**
* tiernan-buckley-ufr made their first contribution in https://github.com/assume-framework/assume/pull/522

**Full Changelog**: https://github.com/assume-framework/assume/compare/v0.5.0...v0.5.1

0.5.0

**New Features:**
- **Learning rate and noise scheduling**: Added the possibility to schedule the learning rate and action noise in the learning process. This feature
enables streamlining the learning progress. Currently, only "linear" decay available by setting the `learning_rate_schedule` and
`action_noise_schedule` in the learning config to "linear". Defaults to no decay if not provided. It decays `learning_rate`/ `noise_dt`
linearly from starting value to 0 over given `training_episodes` which can be adjusted by the user. The schedule parameters (e.g. end value
and end fraction) are not adjustable in the config file, but can be set in the code.
- **Hydrogen Plant:** A new demand side unit representing a hydrogen plant has been added. The hydrogen plant consists of an
electrolyzer and a seasonal hydrogen storage unit. The electrolyzer converts electricity into hydrogen, which can be
stored in the hydrogen storage unit and later used.
- **Seasonal Hydrogen Storage:** A new storage unit representing a seasonal hydrogen storage has been added. The seasonal hydrogen
storage unit can store hydrogen over long periods and release it when needed. It has specific constraints to avoid charging or
discharging during off-season or on-season time as well as a target level to be reached at the end of the season.

**Improvements:**
- **Timeseries Performance Optimization:** Switched to a custom `FastIndex` and `FastSeries` class, which is based on the pandas Series
but utilizes NumPy arrays for internal data storage and indexing. This change significantly improves the
performance of read and write operations, achieving an average speedup of **2x to 3x** compared to standard
pandas Series. The `FastSeries` class retains a close resemblance to the pandas Series, including core
functionalities like indexing, slicing, and arithmetic operations. This ensures seamless integration,
allowing users to work with the new class without requiring significant code adaptation.
- **Outputs Role Performance Optimization:** Output role handles dict data directly and only converts to DataFrame on Database write.
- **Overall Performance Optimization:** The overall performance of the framework has been improved by a factor of 5x to 12x
depending on the size of the simulation (number of units, markets, and time steps).

**Bugfixes:**
- **Tutorials**: General fixes of the tutorials, to align with updated functionalitites of Assume
- **Tutorial 07**: Aligned Amiris loader with changes in format in Amiris compare (https://gitlab.com/fame-framework/fame-io/-/issues/203 and https://gitlab.com/fame-framework/fame-io/-/issues/208)
- **Powerplant**: Remove duplicate `Powerplant.set_dispatch_plan()` which broke multi-market bidding
- **CSV scenario loader**: Fixed issue when one extra day was being added to the index, which lead to an error in the simulation when additional data was not available in the input data.
- **Market opening schedule**: Fixed issue where the market opening was scheduled even though the simulation was ending before the required products. Now the market opening is only scheduled
if the total duration of the market products plus first delivery time fits before the simulation end.
- **Loader fixes**: Fixes for PyPSA, OEDS and AMIRIS loaders

0.4.3

**Improvements:**
- **Documentation**: added codespell hook to pre-commit which checks for spelling errors in documentation and code

**Bugfixes:**
- **Simulation**: Delete simulation results for same simulation prior to run (as before v0.4.2)

**Full Changelog**: https://github.com/assume-framework/assume/compare/v0.4.2...v0.4.3

0.4.2

**New Features:**

- **Residential Components**: Added new residential DST components including PV, EV, Heat Pump, and Boiler, now with enhanced docstrings for better usability.
- **Modular DST Components**: DST components have been converted from functions to classes, improving modularity and reusability.
- **Generic Storage Class**: Introduced a `GenericStorage` class for storage components. Specific classes, such as EV and Hydrogen Storage, now inherit from it.
- **Storage Learning Strategy**: Added a new DRL-based learning strategy for storage units. To use it, set `storage_learning` in the `bidding_EOM` column of `storage_units.csv`. Refer to the `StorageRLStrategy` documentation for more details.
- **Mango 2.x Update**: Upgraded to mango 2.x, enabling synchronous world creation. To upgrade an existing environment, run:

pip uninstall -y mango-agents mango-agents-assume && pip install assume-framework --upgrade

- **Distributed Simulation Enhancements**: Improved distributed simulation for TCP and MQTT, allowing containers to wait for each other during simulations.
- **Integrated Optimization with Pyomo and HIGHS Solver**: The Pyomo library and HIGHS solver are now installed by default, removing the need to install `assume-framework[optimization]` separately. The HIGHS solver is used as the default, replacing the older GLPK solver for improved optimization performance and efficiency.

**Improvements:**

- **Documentation**: Refined tutorial notebooks and added bug fixes.
- **Saving Frequency Logic**: Refactored the saving frequency in the `WriteOutput` class for improved efficiency.

**Bug Fixes:**

- **Solver Compatibility**: Addressed undefined `solver_options` when using solvers other than Gurobi or HIGHS.
- **Cashflow Calculation**: Corrected cashflow calculations for single-digit orders.
- **Simulation Execution**: Enabled simulations to synchronize and wait for each other.
- **Edge Case Handling**: Fixed edge cases in `pay_as_clear` and `pay_as_bid`.

**New Contributor:**

- HafnerMichael made their first contribution with improvements to cashflow calculations and development of residential DST components.

**Full Changelog**: [v0.4.1...v0.4.2](https://github.com/assume-framework/assume/compare/v0.4.1...v0.4.2)

0.4.1

=========================================

**New Features:**

- improve LSTM learning strategy (382)
- add python 3.12 compatibility (334)
- manual strategy for interactive market simulation (403)

**Improvements:**

- add the ability to define the solver for the optimization-based market clearing inside the param_dict of the config file (432)
- shallow clone in Jupyter notebooks so that cloning is faster (433)
- fixes in storage operation bidding (417)
- update GitHub Actions versions (402)

**Bug Fixes:**
- add compatibility with pyyaml-include (421)
- make complex clearing compatible to RL (430)
- pin PyPSA to remove DeprecationWarnings for now (431)

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.