Implement OffsetTransformer as another generator model#92
Open
smartie2076 wants to merge 14 commits intodevfrom
Open
Implement OffsetTransformer as another generator model#92smartie2076 wants to merge 14 commits intodevfrom
smartie2076 wants to merge 14 commits intodevfrom
Conversation
982b08e to
658091f
Compare
658091f to
efde1a0
Compare
Collaborator
Author
|
f8d0b49 to
2679760
Compare
Collaborator
Author
|
@tobirieper this is the PR that includes the new OffsetGenerator feature. |
Collaborator
Author
|
It is not possible to activate a generator with efficiency curve which does not have minimal loading. The simulation runs though, but the efficiency curve is not applied. This needs to be checked, a test written, and fixed. |
- Change `tests/test_basic.py`:
- Remove pytests for black, as they do not work
- Update `test_execution_not_terminated`
- Update `tests/inputs/pytest_test.xlsx`
… settings - Add `GENSET_WITH_EFFICIENCY_CURVE` to `constants.py` - Process new parameter `GENSET_WITH_EFFICIENCY_CURVE` from excel input in `B` with new function `B.process_generator_settings`: Check possible and impossible combinations of input settings and turn warnings or error messages if invalid combination of `GENSET_WITH_MINIMAL_LOADING`, `GENSET_WITH_MINIMAL_LOADING` or `GENSET_WITH_MINIMAL_LOADING` is chosen. - Added pytest for the new function `B.process_generator_settings`
- Refactor `G2a.genset_fix` to `G2a.genset_fix_capacity_fix_efficiency_no_minload` - Refactor `G2a.genset_fix_minload` to `G2a.genset_fix_capacity_fix_efficiency_with_minload` - Refactor `G2a.genset_oem` to `G2a.genset_oem_fix_efficiency_no_minload`
To ease pytests in the future, add global constants: `LOG_MESSAGE_GENSET_FIX_CAPACITY_FIX_EFFICIENCY_NO_MINLOAD`, `LOG_MESSAGE_GENSET_FIX_CAPACITY_FIX_EFFICIENCY_WITH_MINLOAD`, `LOG_MESSAGE_GENSET_OEM_FIX_EFFICIENCY_NO_MINLOAD`
…del building - Change `F.update_dict` so that new parameter `GENSET_WITH_EFFICIENCY_CURVE` is parsed - Expand elif-statements in `G1` to choose appropriate generator model - Add new option of OffsetTransformer (`G2a.genset_fix_capacity_efficiency_curve_and_minimal_loading`) - Note: Efficiency of the new OffSet Transformer with efficiency curve uses the `GENSET_EFFICIENCY` as maximum efficiency, and `GENSET_EFFICIENCY/2` as minimal part-load efficiency
…rmer) - Add folder `tests/benchmark_tests` and `tests/benchmark_tests/timeseries/test_site.csv` to serve future tests - Add input file `tests/benchmark_tests/generator_with_efficiency_curve.xlsx` including a base case with optimization of the diesel generator and a follow-up case which uses that capacities to simulate a diesel generator with efficiency with the same capacities at the same location. Test only ensures that no termination takes place, but does not test anything else.
- Add `CONSUMPTION_FUEL_TIMESERIES_KWH` to `constants.py` - Change `G3.get_fuel()` to also store the `CONSUMPTION_FUEL_TIMESERIES_KWH` to `e_flows_df` - Ensure that `CONSUMPTION_FUEL_TIMESERIES_KWH` is stored into the `electricity_mg`-csv output, but not in the plot
- Add `EFFICIENCY_GENSET_TIMESERIES` to `constants.py - Create function `G3.get_efficiency_genset` to calculate the effective generator efficiency. In case that multiple generators are present, it represents the average efficiency, as it is based on the aggregated generator dispatch. - Store timeseries to `electricity-mg`-csv but exclude from energy dispatch plot - If `GENSET_WITH_EFFICIENCY_CURVE==True` store additionally a plot of the generator efficiency curve over the installed capacity. This curve is only exact if a single generator is used!
4aa9230 to
47c6714
Compare
Collaborator
Author
|
Fixed the fuel price issue and rebased. @tobirieper this now also features the operational hours of the diesel generator. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


PR #90 must be merged first, in case that this branch is merged at all
This introduces the offsetTransformer from oemof solph, which required oemof to be updated to oemof-solph v4.0
Homer might be an interesting comparison: Generator model Homer
This is placed on hold due to more urgent issues.
Changes applied in this pull request:
constants.pyGENSET_WITH_EFFICIENCY_CURVEto inputsB.process_generator_settingsto evaluate different generator settingsG2aandG1to make them explicitG2a.genset_fix_capacity_efficiency_curve_and_minimal_loading. Note: Efficiency of the new OffSet Transformer with efficiency curve uses theGENSET_EFFICIENCYas maximum efficiency, andGENSET_EFFICIENCY/2as minimal part-load efficiencyCONSUMPTION_FUEL_TIMESERIES_KWHfrom simulation results and store to csvEFFICIENCY_GENSET_TIMESERIES), store to csvGENSET_WITH_EFFICIENCY_CURVE==True