-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature/max cap ii #243
Feature/max cap ii #243
Conversation
If all assets that call the functions: source_dispatchable_optimize() and source_non_dispatchable_optimize() have the parameter "maximumCap" then the distinction "if "maximumCap" in dict_asset" in D1 would be redundant. This way we could simplify D1 again. For transformers and storages I added a line in C1 that creates the parameter with value "None" if it doesn't exist yet to avoid the distinction in D1. So my question is: are there other assets (e.g. the DSO) that call the functions source_dispatchable_optimize() and source_non_dispatchable_optimize() that do not have the parameter "maxiumCap"? |
Ah yeah, we should do that when creating the next MVS release that solves the compability issue. If you do not integrate below solution, can you create an issue that reminds us of that task?
Beautiful way to go - if that is easily done for the sources as well (pr #237), you could do the same here. In that case you do not have to create above issue, as there is nothing to be reminded of! :)
Yes, actually, you need to add the default value for "maximumCap" in this function, and probably here. Please run following test data to check whether or not the peak demand pricing function still works after you change the code (this one uses monthly peak pricing): |
I added a line to "define_source()" that creates the maxiumumCap parameter with "None" value and adapted D1 accordingly. I found that the function"define_source()" is only used to create DSO sources. Therefore I would suggest to change its name to "define_dso_source()" instead. It's kind of confusing the way it is, because powerplants are sources too. Or is there other cases where this function would be used for other sources than the dso?
actually these inputs did not work for me. But the error has nothing to do with my changes as far as I understand. I get an error in this line. I could look where it comes from if no one else is working on that (apparently the dictionary "dict_values["energyProviders"][dso]" is not created correctly. But that would be another issue. |
Good.
I think it should also be created for fuel source sinks, eg. diesel or water, which currently is not working (issue #186). I would therefore not rename it.
Let me check this today, I am really surprised it does not work. |
Ah, some csv editor misformatted the line with the peak demand pricing.
instead of
Here are the updated files: |
…_eland into feature/maxCapII
ah OK! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldnt it also be possible to define a function in C0 that checks/adds the maximumCapacity info instead of defining it multiple times (with, I assume, the same code bits) in energyProduction, energyConversion and energyStorage?
@@ -722,6 +810,9 @@ def define_source(dict_values, asset_name, price, output_bus, timeseries, **kwar | |||
else: | |||
source.update({"optimizeCap": {"value": False, "unit": "bool"}}) | |||
|
|||
# add the parameter "maximumCap" to DSO source | |||
source.update({"maximumCap": {"value": None, "unit": "kWp"}}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not correct unit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the correct unit here? there is no row "unit" in energyProviders, so I have to write the unit hardcoded in this cas
Please add a description of the maximumCap parameter that you added in the readthedocs parameter description, or if more text is needed in a new custom_constraints.rst page/add it in the simulating_with_the_mvs.rst fild that is in the dev branch. |
Co-Authored-By: smartie2076 <44204527+smartie2076@users.noreply.github.com>
Co-Authored-By: smartie2076 <44204527+smartie2076@users.noreply.github.com>
Co-Authored-By: smartie2076 <44204527+smartie2076@users.noreply.github.com>
I added the parameter here readthedocs parameter description |
Continue on #237
Changes proposed in this pull request:
Add parameter "maximumCap" for
The following steps were realized, as well (if applies):
black . --exclude docs/
)Please mark above checkboxes as following:
❌ Check not applicable to this PR
For more information on how to contribute check the CONTRIBUTING.md.