Skip to content

Commit

Permalink
Merge pull request #968 from rl-institut/release/v1.1.0
Browse files Browse the repository at this point in the history
Release/v1.1.0
  • Loading branch information
Bachibouzouk authored Apr 27, 2024
2 parents b9f291a + 463354a commit 627c9cc
Show file tree
Hide file tree
Showing 81 changed files with 21,068 additions and 870 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ mvs_csv_config.json
/inputs/

/validation_tests/

*.DS_Store
*.inc
*.tbl
68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,74 @@ Here is a template for new release sections
-
```

## [Unreleased]

### Added

### Changed

### Fixed

## [1.1.0] - 2024-04-27

### Added
- Benchmark test (`tests/benchmark_test_inputs/objective_value_exception_equal_annuity`) for in `F0_output.parse_simulation_log` and data stored to `SIMULATION_RESULTS` as well as `OBJECTIVE_VALUE` (#901)
- Constants `BENCHMARK_TEST_INPUT_FOLDER` and `BENCHMARK_TEST_OUTPUT_FOLDER` in `tests/_constants.py` (#901)
- Tests `E3.test_add_total_consumption_from_provider_electricity_equivalent_two_providers_one_energy_carrier` and `E3.test_add_total_feedin_electricity_equivalent_two_providers_one_energy_carrier`(#932)
- Add the argument `return_les` to the function `D0.run_oemof` to return the energy system if set to `True` (#923)
- Save the content of the lp file into a string in the `dict_values` under `SIMULATION_SETTINGS->OUTPUT_LP_FILE` in server mode (#923)
- Set `OUTPUT_LP_FILE` value to be by default `False` when coming from EPA in server mode (#923)
- Function `server.run_sensitivity_analysis_step` to perform one step of a sensitivity analysis (#936)
- Function `utils.nested_dict_crawler` to return mapping of path within a nested dict to the keys at the lowest nested level (#936)
- Test `test_utils.TestAccessKPIs` to test the nested dict utils functions (#936)
- `sankey` method to the `ESGraphRenderer` class to return a sankey diagram (#935)
- `plot_sankey_diagramm` function in `D0_modelling_and_optimization.py` to add the dict of the sankey diagram (#935)
- `ready_sankey_diagram` in `F2_autoreport.py` to add sankey diagram to output and report (#935)
- "maximum_add_cap" to the keys returned to EPA after simulating got production assets (#939)
- `PARAMETER_DOC` in `utils` can be used to get information about a parameter directly from the csv file `docs/MVS_parameters_list.csv` (#956)
- Now oemof-solph ExtractionTurbine CHP component can be simulated (only tested from the json input) (#952)
- The heat pump and chp components can now be simulated with MVS although no explicit support/documentation is present for running from the command line (#954)
- Saving the raw oemof result in a pandas Dataframe with multi index (#958)
- Raise error for wrongly formatted emission factor (#965)

### Changed
- `F0_output.parse_simulation_log`, so that `SIMULATION_RESULTS` are not overwritten anymore (#901)
- `input_template/csv_elements`: Added missing parameters and generalized units (#904)
- `CONTRIBUTING.md` according to last lessons learnt (#904)
- Set numpy version to lower or equal than `1.19.4` (#924)
- `F2.create_app()` to specify tab name of Dash report to `scenario_name` (`scenario_id`) instead of `Dash` (#934)
- Bugfix in functions `test_add_total_consumption_from_provider_electricity_equivalent` and `E3.test_add_total_feedin_electricity_equivalent` (#932)
- `version.py`: Version number increased to 1.0.2dev, so simulations run before and after this fix can easily be identified (in the autoreport) (#932)
- Enable capacity optimization for storage assets in the epa (#936)
- Make the `utils` function `get_nested_value`and `set_nested_value` raise a Key error with a traceback indicating where in the nested dict this key was missing to help debugging (#936)
- When the user ask for images to be produced (`-pdf` or `-png` options) a sankey diagram is added to the report and to the `dict_values` under `[PATH_TO_PLOTS][PLOT_SANKEY]` (#935)
- Update requirements for numpy (v 1.21.0 or greater) and for dash (v 2.3.1 or greater) (#938)
- `OPTIMIZED_ADD_CAP` replaced by "optimized_add_cap" in the assets keys returned to EPA after simulating (#939)
- The if statement for adapting `MAXIMUM_CAP` for non-dispatchable production assets is now based on the value of `DISPATCHABILITY` and not on the existence of the key `FILENAME` in the `asset_dict` (#939)
- The default values for the constraints are now located in `src/constants.py` under the variable `DEFAULT_CONSTRAINT_VALUES` (#953)
- When a required parameter is missing its default value, defined in `docs/MVS_parameters_list.csv`, is used instead of raising an error (#956)
- If an asset has 2 output busses, the output flow of only one of the busses is provided using its name `asset[FLOW][bus_name]` (#952)
- The user can choose on which bus the investment will take place (useful for transformers with 2 inputs and 1 outputs or 1 input and 2 outputs) (#954)
- energy_price and feedin of DSO (providers) can be provided as timeseries (#954)
- The peak-demand pricing cost is applied to the consumption of DSO only (before was split between consumption and feedin) (#958)
- Upgrade to `oemof-solph==0.5.1` (#965)

### Removed
- Input timeseries is now not returned to epa in `utils.data_parser.py` (#936)

### Fixed
- `OBJECTIVE_VALUE`, `SIMULTATION_TIME`, `MODELLING_TIME` now included in the `json_with_results.json` (#901)
- Missing parameters in `input_template/csv_elements` (#904)
- Confusing Dash report tab names (#933)
- Calculation of `total_feedin` and `total_consumption_from_providers`, where multiple providers of one energy carrier were not aggregated correctly (#931)
- Used `pandas.concat` instead of `DataFrame.append` to add rows to a `pandas.DataFrame` instance to suppress UserWarning (#937)
- Add missing file for test `test_F0_output.TestLogCreation.test_parse_simulation_log` (#937)
- Transformers can have multiple input or output busses (tested in `tests/test_D1_model_components` by `test_transformer_optimize_cap_multiple_output_busses_multiple_inst_cap`, `test_transformer_optimize_cap_multiple_output_busses_multiple_max_add_cap`, `test_transformer_fix_cap_multiple_output_busses_multiple_inst_cap` and in `tests/test_benchmark_special_features` by `test_benchmark_feature_parameters_as_timeseries_multiple_inputs`)(#949)
- The constraints are not all set to default values if only one constraint is missing, only the missing constraint is set to default value (#953)
- If the age of an asset is such that it should be replaced on the project's last year, we do not take it into account as the resell price would be deduced anyway (#965)
- The test `test_c2_economic_functions.py::test_get_replacement_costs_one_reinvestment_age_asset_equal_asset_lifetime` was added to account for a field usecase and a solution was provided (#966)


## [1.0.0] - 2021-05-31

### Added
Expand Down
31 changes: 22 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Once you are satisfied with your PR you should ask someone to review it. Before

## Release protocol

This protocol explains how to perform a release of the code on ´master´ branch before releasing the code to pypi.org. If you don't want to release on pypi.org, skip the part under "The actual release".
This protocol explains how to perform a release of the code on ´master´ branch before releasing the code to pypi.org. If you don't want to release on pypi.org, skip the part under "The actual release". You need at least three clean and fresh new environments to follow though the whole release process. You can prepare those in advance.

### Local packaging test

Expand Down Expand Up @@ -149,15 +149,22 @@ Before starting uploading things to pypi.org, there are a few tests one can perf
```bash
mkdir empty_folder
```
6. Test the multi-vector-simulator default simulation

6. Move into empty folder, so that results will be stored in there:
```bash
cd empty_folder
```

7. Test the multi-vector-simulator default simulation
```bash
mvs_tool
```
It should run the simulation and save the results in the default output folder.
If the simulation does not run through, find out why and fix it (via pull request on the `dev` branch), then repeat steps 0. to 6.
If the simulation does not run through, find out why and fix it (via pull request on the `dev` branch), then repeat steps 0. to 7.
If you run this local packaging test multiple times, either create a new empty folder or run `mvs_tool -f` to overwrite the default output folder.

If this test passes locally, you can move to next step, upload a release candidate on pypi.org
If this test passes locally, you can move to next step, upload a release candidate on pypi.org. You can also remove the folder `empty_folder` and its content.


### Release candidate on pypi.org

Expand Down Expand Up @@ -198,19 +205,25 @@ Technically, a release candidate is similar to a normal release in the sense tha
```bash
mkdir empty_folder
```
9. Test the multi-vector-simulator default simulation

9. Move into empty folder, so that results will be stored in there:
```bash
cd empty_folder
```

10. Test the multi-vector-simulator default simulation
```bash
mvs_tool
```
It should run the simulation and save the results in the default output folder.
If the simulation does not run through, find out why and fix it.
If you run this local packaging test multiple times, either create a new empty folder or run `mvs_tool -f` to overwrite the default output folder.

10. If you notice errors in the uploaded package, fix them and bump up `rc1` to `rc2` and repeat steps 3. to 9. until you don't see any more errors.
11. If you notice errors in the uploaded package, fix them and bump up `rc1` to `rc2` and repeat steps 3. to 10. until you don't see any more errors.
It is encouraged to make sure step 6. to 9. are also performed on a different os than yours (ask a colleague for example)
It is encouraged to make sure step 6. to 10. are also performed on a different os than yours (ask a colleague for example)
11. If your release candidate works well you can now do the actual release on `master`, followed by the release on pypi.org
12. If your release candidate works well, you can now do the actual release on `master`, followed by the release on pypi.org. You can also remove the folder `empty_folder` and its content.
### Release on master
Expand All @@ -230,7 +243,7 @@ For help look into the [github release description](https://help.github.com/en/g
### The actual release on pypi.org
*Note*: The packaging process is automatized with running `python prepare_package.py`. For details on how the packaging is preformed, check that script.

Follow the steps from the "Release candidate on pypi.org" section, without adding `rci` after the version number and ignoring step 11.
Follow the steps from the "Release candidate on pypi.org" section, without adding `rci` after the version number and ignoring step 12.

Congratulations, you just updated the package on pypi.org, you deserve a treat!

Expand Down
12 changes: 12 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ To set up the MVS, follow the steps below:

- If python3 is not pre-installed: Install miniconda (for python 3.7: https://docs.conda.io/en/latest/miniconda.html)

- WINDOWS USERS: Using an Anaconda virtual environment is highly recommended for being able to fully utilize the tool. Venv
environtments works only for running the optimization tool (mvs_tool). For this, updating Pandas to at least version 1.3.5
and installing the package pygraphviz as indicated in this link https://pygraphviz.github.io/documentation/stable/install.html
is necessary. However, it is not possible to run the interactive report (mvs_report) with venv, as it gives an error.
Therefore, it is best to use conda environments.

- Open Anaconda prompt (or other software as Pycharm) to create and activate a virtual environment

``conda create -n [your_env_name] python=3.6 activate [your env_name]``
Expand Down Expand Up @@ -206,7 +212,13 @@ To use the report feature you need to install extra dependencies first

pip install multi-vector-simulator[report]

If you are using zsh terminals and recieve the error message "no matches found", you might need to run

::

pip install 'multi-vector-simulator[report]'

Use the option ``-pdf`` in the command line ``mvs_tool`` to generate a pdf report in a simulation's output folder
(by default in ``MVS_outputs/report/simulation_report.pdf``):

Expand Down
Loading

0 comments on commit 627c9cc

Please sign in to comment.