Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement OffsetTransformer as another generator model #92

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from

Commits on May 4, 2021

  1. Reorder variables in constants.py

    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    f49b80e View commit details
    Browse the repository at this point in the history
  2. Change basic pytests that ensure that simulation does not terminate

    - 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`
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    8807b8a View commit details
    Browse the repository at this point in the history
  3. Refactor inputs/test_input_template.xlsx to `inputs/input_teplate_e…

    …xcel.xslx`
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    a528868 View commit details
    Browse the repository at this point in the history
  4. Create B.process_generator_settings to evaluate different generator…

    … 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`
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    65a9f1c View commit details
    Browse the repository at this point in the history
  5. Refactor genset functions in G2a and G1 to make them explicit

    - 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`
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    f63e06b View commit details
    Browse the repository at this point in the history
  6. Improve logging statements for the different generator models

    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`
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    203e583 View commit details
    Browse the repository at this point in the history
  7. Implement OffsetTransformer with GENSET_WITH_EFFICIENCY_CURVE in mo…

    …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
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    3a24ff1 View commit details
    Browse the repository at this point in the history
  8. Add benchmark test for generator with efficiency curve (OffsetTransfo…

    …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.
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    7c41fbc View commit details
    Browse the repository at this point in the history
  9. Retrieve CONSUMPTION_FUEL_TIMESERIES_KWH from simulation results

    - 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
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    cfe36b9 View commit details
    Browse the repository at this point in the history
  10. Calculate EFFICIENCY_GENSET_TIMESERIES

    - 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!
    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    be886d4 View commit details
    Browse the repository at this point in the history
  11. Update CHANGELOG.md

    smartie2076 authored and smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    1b4f04f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    750d8fa View commit details
    Browse the repository at this point in the history
  13. Update changelog

    smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    843e112 View commit details
    Browse the repository at this point in the history
  14. Fix pytest

    smartie2076 committed May 4, 2021
    Configuration menu
    Copy the full SHA
    47c6714 View commit details
    Browse the repository at this point in the history