Skip to content

Commit

Permalink
Merge pull request #126 from empowerplan/feature/update_scenarios
Browse files Browse the repository at this point in the history
Feature/update scenarios
  • Loading branch information
nesnoj authored May 6, 2024
2 parents 8ec3a52 + dd39930 commit 80923d9
Show file tree
Hide file tree
Showing 7 changed files with 516 additions and 114 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project tries to adhere to [Semantic Versioning](https://semver.org/spe
- oemof.tabular to support TSAM
- map boolean values in popup templates to Ja/Nein
- pre results can be shown before simulation has finished
- scenario page and scenario parameters

### Fixed
- duplicate loading of JS modules due to missing module support in django staticfile storage
Expand Down
6 changes: 3 additions & 3 deletions digiplan/static/config/energy_settings_panel.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,10 @@
"class": "js-slider js-slider-panel js-power-mix",
"color": "#A9BDE8",
"label": "{% trans 'Wasserkraft (MW)' %}",
"max": 30,
"max": 5,
"min": 0,
"start": 5,
"status_quo": 15,
"start": 0,
"status_quo": 0,
"step": 1,
"tooltip": "{% trans 'Nennleistung der in der Region installierten Laufwasserkraftwerke in Megawatt. Da das Potenzial hier als ausgeschöpft gilt, werden nur bestehende Anlagen berücksichtigt.' %}",
"type": "slider"
Expand Down
98 changes: 46 additions & 52 deletions digiplan/static/config/scenarios.json
Original file line number Diff line number Diff line change
@@ -1,59 +1,53 @@
{
"1": {
"windTab": "windFutureTab",
"id_s_w_1": 720,
"id_s_w_7": 2.1,
"id_s_pv_ff_1": 1050,
"id_s_pv_ff_3": 10,
"id_s_pv_ff_4": 20,
"id_s_pv_ff_5": 50,
"id_s_pv_d_1": 300,
"id_s_pv_d_3": 15,
"id_s_pv_d_4": 20,
"id_s_v_1": 175,
"id_s_v_3": 160,
"id_s_v_4": 150,
"id_s_v_5": 175,
"id_s_s_g_1": 16,
"id_w_d_wp_1": 70,
"id_w_d_wp_3": 70,
"id_w_d_wp_4": 70,
"id_w_d_wp_5": 55,
"id_w_z_wp_1": 80,
"id_w_v_1": 90,
"id_w_v_3": 90,
"id_w_v_4": 90,
"id_w_v_5": 90,
"id_w_d_s_1": 75,
"id_w_z_s_1": 70
"windTab": "windPresentTab",
"id_s_w_1": 1769,
"id_s_w_6": 1.7,
"id_s_pv_ff_1": 1330,
"id_s_pv_ff_3": 5,
"id_s_pv_ff_4": 5,
"id_s_pv_ff_5": 5,
"id_s_pv_d_1": 1440,
"id_s_pv_d_3": 50,
"id_s_pv_d_4": 50,
"id_s_v_1": 85,
"id_s_v_3": 72,
"id_s_v_4": 93,
"id_s_v_5": 86,
"id_s_s_g_1": 1,
"id_w_d_wp_1": 50,
"id_w_z_wp_1": 40,
"id_w_v_1": 85,
"id_w_v_3": 72,
"id_w_v_4": 93,
"id_w_v_5": 86,
"id_w_d_s_1": 100,
"id_w_z_s_1": 100
},
"2": {
"windTab": "windPresentTab",
"id_s_w_1": 180,
"id_s_w_6": 0.2,
"id_s_pv_ff_1": 4330,
"id_s_pv_ff_3": 15,
"id_s_pv_ff_4": 15,
"id_s_pv_ff_5": 15,
"id_s_pv_d_1": 110,
"id_s_pv_d_3": 5,
"id_s_pv_d_4": 5,
"id_s_v_1": 80,
"id_s_v_3": 80,
"id_s_v_4": 80,
"id_s_v_5": 80,
"id_s_s_g_1": 20,
"id_w_d_wp_1": 75,
"id_w_d_wp_3": 65,
"id_w_d_wp_4": 90,
"id_w_d_wp_5": 55,
"id_w_z_wp_1": 20,
"id_w_v_1": 120,
"id_w_v_3": 130,
"id_w_v_4": 110,
"id_w_v_5": 150,
"id_w_d_s_1": 30,
"id_w_z_s_1": 45
"windTab": "windFutureTab",
"id_s_w_1": 2308,
"id_s_w_7": 2.2,
"id_s_pv_ff_1": 2437,
"id_s_pv_ff_3": 3,
"id_s_pv_ff_4": 3,
"id_s_pv_ff_5": 3,
"id_s_pv_d_1": 2640,
"id_s_pv_d_3": 70,
"id_s_pv_d_4": 50,
"id_s_v_1": 85,
"id_s_v_3": 72,
"id_s_v_4": 93,
"id_s_v_5": 86,
"id_s_s_g_1": 1,
"id_w_d_wp_1": 89,
"id_w_z_wp_1": 77,
"id_w_v_1": 85,
"id_w_v_3": 72,
"id_w_v_4": 93,
"id_w_v_5": 86,
"id_w_d_s_1": 100,
"id_w_z_s_1": 100
},
"3": {
"windTab": "windPastTab",
Expand Down
2 changes: 1 addition & 1 deletion digiplan/static/js/scenarios.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function selectScenarioCard(scenarioCardNumber) {
<path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0M4.5 7.5a.5.5 0 0 0 0 1h5.793l-2.147 2.146a.5.5 0 0 0 .708.708l3-3a.5.5 0 0 0 0-.708l-3-3a.5.5 0 1 0-.708.708L10.293 7.5z"/>
</svg>`;

for (let i = 1; i <= 3; i++) {
for (let i = 1; i <= 2; i++) {
const card = document.getElementById("panelCard" + i);
const selectedScenario = document.getElementById("selectedScenario" + i);
const arrowIcon = card.querySelector(".arrow-icon");
Expand Down
4 changes: 4 additions & 0 deletions digiplan/static/scss/components/_scenarios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,9 @@
&--pv {
background-color: $pvlight;
}

&--ee {
background-color: #52C41A;
}
}
}
Loading

0 comments on commit 80923d9

Please sign in to comment.