Skip to content

Fix optimizedAddCap of non-dispatchable sources#498

Merged
Bachibouzouk merged 66 commits intodevfrom
fix/opimizedaddcap_non_dispatch_sources
Oct 1, 2020
Merged

Fix optimizedAddCap of non-dispatchable sources#498
Bachibouzouk merged 66 commits intodevfrom
fix/opimizedaddcap_non_dispatch_sources

Conversation

@SabineHaas
Copy link
Copy Markdown
Contributor

@SabineHaas SabineHaas commented Aug 6, 2020

Fix #446,
Fix #461,
Fix #2

Changes proposed in this pull request:

The following steps were realized, as well (if applies):

  • Use in-line comments to explain your code
  • Write docstrings to your code
  • For new functionalities: Explain in readthedocs
  • Write test(s) for your new patch of code
  • Update the CHANGELOG.md
  • Apply black (black . --exclude docs/)
  • Check if benchmark tests pass locally (EXECUTE_TESTS_ON=master pytest)

Please mark above checkboxes as following:

  • Open
  • Done

❌ Check not applicable to this PR

For more information on how to contribute check the CONTRIBUTING.md.

@SabineHaas SabineHaas changed the title Add plans to changelog Fix optimizedAddCap of non-dispatchable sources Aug 6, 2020
@SabineHaas SabineHaas requested a review from smartie2076 August 6, 2020 08:54
@SabineHaas
Copy link
Copy Markdown
Contributor Author

@smartie2076 for the plans/status see "Changes proposed in this pull request:" and previous commits.

@Bachibouzouk
Copy link
Copy Markdown
Collaborator

@SabineHaas, the structure of files has changed, you will have to copy-paste your changes in the new C files located under src/mvs_eland

@SabineHaas SabineHaas self-assigned this Sep 10, 2020
Co-authored-by: smartie2076 <[email protected]>
@smartie2076
Copy link
Copy Markdown
Collaborator

smartie2076 commented Oct 1, 2020

I am taking over this PR now, and am trying to close it today.

Checkpoints:

Current status of the excessive excess gereration test:

2020-10-01 15:59:19,497 - WARNING - E4_verification - Attention, on bus Fuel_bus there is an excessive excess generation, totalling up to 200% of the inflows. It seems to be cheaper to have this excess generation than to install more capacities that forward the energy carrier to other busses (if those assets can be optimized).
2020-10-01 15:59:19,513 - WARNING - E4_verification - Attention, on bus Electricity_bus there is an excessive excess generation, totalling up to 200% of the inflows. It seems to be cheaper to have this excess generation than to install more capacities that forward the energy carrier to other busses (if those assets can be optimized).
2020-10-01 15:59:19,531 - WARNING - E4_verification - Attention, on bus PV plant (mono)_bus there is an excessive excess generation, totalling up to 150% of the inflows. It seems to be cheaper to have this excess generation than to install more capacities that forward the energy carrier to other busses (if those assets can be optimized).
2020-10-01 15:59:19,546 - WARNING - E4_verification - Attention, on bus ESS Li-Ion_bus there is an excessive excess generation, totalling up to 1380% of the inflows. It seems to be cheaper to have this excess generation than to install more capacities that forward the energy carrier to other busses (if those assets can be optimized).
2020-10-01 15:59:19,560 - WARNING - E4_verification - Attention, on bus Electricity (DSO)_bus there is an excessive excess generation, totalling up to 200% of the inflows. It seems to be cheaper to have this excess generation than to install more capacities that forward the energy carrier to other busses (if those assets can be optimized).
2020-10-01 15:59:19,575 - WARNING - E4_verification - Attention, on bus Electricity (DSO)_pdp_bus there is an excessive excess generation, totalling up to 200% of the inflows. It seems to be cheaper to have this excess generation than to install more capacities that forward the energy carrier to other busses (if those assets can be optimized).

Fixed with 2c17b9c.

@SabineHaas: Previously, you defined

            if (
                group == ENERGY_PRODUCTION
                and asset_dict[FILENAME] != None
                and asset_dict[TIMESERIES_PEAK][VALUE] != None
            ):
                asset_dict[MAXIMUM_CAP][VALUE] = (
                    asset_dict[MAXIMUM_CAP][VALUE] / asset_dict[TIMESERIES_PEAK][VALUE]
                )

I also think that checking for TIMESERIES_PEAK is a duplicate, so I removed it. Also, the maxCap needs to be multiplied with the asset_dict[TIMESERIES_PEAK][VALUE], so I changed that, too. This is the result:

            if group == ENERGY_PRODUCTION and asset_dict[FILENAME] != None:
                asset_dict[MAXIMUM_CAP][VALUE] = (
                    asset_dict[MAXIMUM_CAP][VALUE] * asset_dict[TIMESERIES_PEAK][VALUE]
                )

@smartie2076
Copy link
Copy Markdown
Collaborator

@Bachibouzouk this is ready to merge after the tests ran though. I did the local pytests (master), and they all passed.

@Bachibouzouk Bachibouzouk self-requested a review October 1, 2020 17:12
Copy link
Copy Markdown
Collaborator

@Bachibouzouk Bachibouzouk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already passed through @SabineHaas and @smartie2076 , so it counts as a review

@Bachibouzouk Bachibouzouk merged commit a483c01 into dev Oct 1, 2020
@Bachibouzouk Bachibouzouk deleted the fix/opimizedaddcap_non_dispatch_sources branch October 1, 2020 17:14
@Bachibouzouk Bachibouzouk mentioned this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input timeseries effect on output maximumCap is equal to peak_flow and not optimizedAddCap Investment capacities directly connected to Sources

3 participants