-
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
Show pre-results (without need for simulation run) on results page #82
Conversation
Hey @nesnoj, I just wanted to refactor electricity and heat demand calculation for 2045 (as currently this is calculated from simulation results instead of datapackage), but I stumble upon following lines. epp-app/digiplan/map/calculations.py Lines 358 to 361 in 8400d03
Do you know why we multiply values from 2045 with shares from 2022?? Or is it a bug? IMO, the shares are set up by user via GUI and should already be considered in demand sequences via hooks. Cannot explain those lines - maybe you can enlighten me? THX |
Yes, because 2022 is the reference which will be scaled according to the slider settings (relative changes), cf. my commit message for this line. Also, I changed the hooks accordingly in the same commit those days. If I recall this correctly, there was an error in the calculation before.. PS: BTW, this is done for heat the very same way.. (line 359) |
Note:
|
# Conflicts: # digiplan/map/forms.py # digiplan/map/urls.py # digiplan/map/views.py
Please review @nesnoj |
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.
Thx @henhuy!
While haven't checked every line, it looks plausible to me. Some notes and questions:
- The deactivation of dropdown elements is great
- I do not see any changes in the result charts yet
- When I select an available entry from dropdown while simulation is running (e.g. heat demand) the choropleth dowsn't show up and logs say
TypeError: can't multiply sequence by non-int of type 'float'
- I extended the list
PRE_RESULTS
for the menu in menu.js to cover more results (actually all of the current entries can be precalculated) - On the NaN/black areas: Data is available (some are dummy though) on the WAM-Server
- (Why did you implement the pre-results as model? Design-driven decision?)
- Chart results must be marked as not ready yet if simulation is still runnning -> New PR for @bmlancien?
Yes, will create..
Will move this to extra issue
This works on my side. Do you have different data? (I'm using data from server)
I have to refactor calculations in order to not use simulation results. Maybe we have to discuss this for some calculations, as I'm not sure ALL selections can be pre-calculated...
No more black areas on my side. Downloaded data from server.
Internally, the map stores the pre-result ID and requests choropleths/popups/charts from backend using this ID. Alternative would be to store all form inputs of the user and query them within request. Maybe I switch to this, as waiting for pre-result ID takes too long IMO |
# Conflicts: # digiplan/static/js/sliders.js
Should be ready now.
Is this still happening on your side? Please review again. THX |
No, but
|
Ah yes! I did one change to your data. |
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.
Works out!
Closes #60
TODOS:
Calculations which have to be refactored: