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

Fix optimizedAddCap of non-dispatchable sources #498

Merged
merged 66 commits into from
Oct 1, 2020

Conversation

SabineHaas
Copy link
Collaborator

@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
Copy link
Collaborator Author

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

@Bachibouzouk
Copy link
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
@smartie2076
Copy link
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
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
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants