Add tests for adding minimal_renewable_share#742
Conversation
|
Can you please tell me how do I access the value of For example, for the |
|
I do not understand how this test is passing.. The assertion basically means None == 1000, as I understood it |
I am not sure that this can work here. It works with the emission limit, because it is an inbuild oemof function - but the renewable share limit is actually a constraint added by us as a custom constraint. It may be possible to access the value with (according to this pyomo command: |
|
@mahendrark what did you find out about this? @SabineHaas is the test that @mahendrark is planning possible as he proposed? Or should this PR be abandoned (and closed)? |
|
I did not yet work on this after the last commits. I will look into it again and see if I can figure it out. |
SabineHaas
left a comment
There was a problem hiding this comment.
As far as I can see, you can just check whether the attribute constraint_minimal_renewable_share of model exists, as it should not exist in case of minimal_renewable_share=0, see here
Ohohh thanks for noticing. |
|
you can do it right here as well. That would not pose a problem for me :) I do not plan to work on it in this week. |
Ah, thanks, that's good to know! I will nevertheless to a PR into this PR :) |
|
@mahendrark I'm done with #759. The tests will fail due to the renewable share test. I also used |
9cccfe1 to
56968df
Compare
|
Can you please advice me on how to test |
As I wrote above, I would just check whether the attribute |
I am done with this. This is not the issue. I already wrote following tests based on your inputs and they pass without issue: My question is how to proceed with |
|
Ah I see that you have pushed the changes now.
I don't think it's necessary as it's functionality is tested in If you still want to test it, you would have to check for the expression rather than a value (so, differently from the maximum emissions constraint test), I think. However, I would have to look into that more closely to tell you what exactly to test and if the test is not absolutely necessary I'd rather leave this out for now. |
SabineHaas
left a comment
There was a problem hiding this comment.
Thanks @mahendrark !
I already reviewed your last changes.
e3c0211 to
248598a
Compare
SabineHaas
left a comment
There was a problem hiding this comment.
Great @mahendrark !
I only added minor suggestions. After their application you can merge.
Co-authored-by: Sabine Haas <[email protected]>
Co-authored-by: Sabine Haas <[email protected]>
Co-authored-by: Sabine Haas <[email protected]>
|
thank you for the help and guidance during this PR :) |
Fix #732
Changes proposed in this pull request:
The following steps were realized, as well (if applies):
black . --exclude docs/)EXECUTE_TESTS_ON=master pytest)Please mark above checkboxes as following:
❌ Check not applicable to this PR
For more information on how to contribute check the CONTRIBUTING.md.