-
Notifications
You must be signed in to change notification settings - Fork 0
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
Splits the input shares to 1/x'th of the edges #59
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #59 +/- ##
==========================================
+ Coverage 93.62% 93.64% +0.01%
==========================================
Files 27 27
Lines 659 661 +2
==========================================
+ Hits 617 619 +2
Misses 42 42
Continue to review full report at Codecov.
|
This doesn't feel like the right approach to me. Refinery is all about being given information and it filling in the blanks based on that information. If it doesn't have enough data to give a definitely correct answer, it throws an error at you saying that it needs more. This PR would allow Refinery to create entirely fictitious data to cover up the fact that not enough is being provided. To use the example from #58:
The reason why Refinery does not do this is that the default graph may have no energy flowing through these nodes, but the user may change inputs in ETModel which does cause energy to flow. If Refinery creates fake shares for these slots, then so too will the flow of energy through these nodes would be wrong. To use the concrete example from ETLocal: the default shares of coal, crude oil, and network gas into "industry other metals burner" is 55%, 2%, and 43%. If we were to allow Refinery to fake this, the shares of these carriers would be 33.3%, 33.3%, 33.3% which is incorrect. I agree the SystemStackError is unacceptable, but I think the fix for missing slot shares lies in ETLocal (or with the user) and not Refinery. |
Fair enough. I think that we should probably disallow setting certain demands to 0. |
Maybe Refinery is not the right place to solve this, but how about ETEngine? This is not specifically an ETLocal problem, national datasets have this problem as well. Take for example To avoid overflow errors, someone has added I think it is highly desirable to add some rule to ETEngine (or some other module) that says: calculate slot shares the usual way, except when the demand of the node is zero (i.e. there is no energy flowing through this node), then just set some arbitrary numbers summing to 1 (much like a flexible in a share group). |
I think this is a useful discussion but I respectfully disagree that it is desirable to set "arbitrary numbers" to set input shares. My main reason is that it is not transparent to the user (or energy researcher) that a decision is being made which might impact the energy system of the region. Perhaps it is "overhead", but I'd much rather have some explicit |
In my honest opinion it's still a bug that a demand of 0 can trigger a SystemStackError. How that get's resolved .... I wouldn't know. Perhaps @antw is willing to take a good guess. How I've solved it in the case of ETLocal is to give all of the 'demand' inputs a default value higher than 0 (read: 1). This temporarily resolves the issue, until somebody reduces it explicitly to 0. |
@ChaelKruip I'm not sure if you understand me correctly. What I propose is just as 'arbitrary' as a flexible share (which we use a lot) and there should not be any impact on the energy system because as soon as the demand of the node does become positive, ETEngine can calculate the input shares the usual way. |
For the relevant nodes in industry such a situation cannot occur, because if an industry sector is zero in the present you cannot make it positive in the future. For the transport mixers, I guess that if there are no LNG vehicles in the present and you decide to use them in the future, their initial LNG mix will be determined by the arbitrary shares chosen by ETEngine. I.e. these sliders: In the front-end, the user can see this. In the back-end, this will indeed be difficult. That's not so nice, I agree with that. However, in the current situation it is also very difficult for the modeller/researcher to find out which input is 'flexible'. (1) Open the relevant node Would be nice if we could specify somewhere which input slot is treated as flexible. In that case, the rule is something like: calculate slot shares the usual way, except when the demand of the node is zero, then set the input slot defined as flexible to 1. |
Fixes: #58