rl-institut / digiplan

StEmp ABW 2.0 - new version of StEmp ABW tool
https://digiplan.rl-institut.de
GNU Affero General Public License v3.0
1 stars 2 forks source link

Load default values for settings panels from json #269

Closed nesnoj closed 1 year ago

nesnoj commented 1 year ago

I'm currently adding settings values for the panels which need to be loaded on startup. I've uploaded the format with dummy values (most of them are the same as in your current file) to the Wolke which you can already use for testing.

Two things:

  1. I added a new attribute future_scenario to the sliders, there should show up as extra markers if the attribute exists.
  2. Question: In the panel settings the attribute "start" defines the startup value for the sliders. I'd also like to define (in my file) which switches are on by default, which attribute shall I use?
henhuy commented 1 year ago
  1. Maybe simply set "start": true
henhuy commented 1 year ago

Nice that you use current structure - this would make it easy for us to merge JSONs. @Josephine-Marie you could use merge_dicts (currently in charts.py - we should move it to utils.py though) from @josihoppe therefore.

nesnoj commented 1 year ago
  1. Maybe simply set start: true

:+1: Gimme a sec...

nesnoj commented 1 year ago

I added default values for the switches and updated the energy_settings_panel.json

BTW, there's a bug in the definition @Josephine-Marie, see #270

General note: I omit elements without any control functions in the files, i.e. the info boxes.

nesnoj commented 1 year ago

I'll add an additional attribute disable (according to ion range slider API) for disabling a slider, could you please adjust the formy.py accordingly (if needed)?

nesnoj commented 1 year ago

And please remove the biomass slider s_b_1 from the energy_settings_panel.json.

nesnoj commented 1 year ago

@Josephine-Marie Panel settings added to DP version 2023-07-03

Electricity and heat is complete. Traffic is filled with dummy values, but the format is complete and ready for takeoff :rocket: .

nesnoj commented 1 year ago

BTW, the settings are produced here, that might be helpful for the dynamic adjustments you're working on..