quintel / etengine

Calculation engine for the Energy Transition Model
https://energytransitionmodel.com/
MIT License
15 stars 7 forks source link

After using input statements that affect both present and future, sliders in interface do not have an effect anymore #808

Closed dennisquintel closed 8 years ago

dennisquintel commented 8 years ago

@AlexanderWirtz created a scaled scenario for Ameland and has used many new input statements.

But now when you load the scenario (see below) in etmodel, the space heating sliders for households do not work anymore.

scaled scenario

INSERT INTO `scenarios` (`id`, `author`, `title`, `description`, `created_at`, `updated_at`, `user_values`, `end_year`, `in_start_menu`, `user_id`, `preset_scenario_id`, `use_fce`, `present_updated_at`, `protected`, `area_code`, `source`, `balanced_values`)
VALUES
    (NULL, NULL, 'Ameland poging 3', '<ul>\n<li>Alleen wat schuifjes voor ruimteverwarming en warm water verzet. </li>\n<li>Ook wat zonthermisch en transporttechnieken verzet</li>\n<li>Schuifjes ruimteverwarming en warm water</li>\n<li>Schuifjes transportmix</li>\n<li>Poging present technologiemix mix te verzetten</li>\n</ul>', '2015-12-01 14:20:41', '2015-12-01 14:20:41', '--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nhouseholds_space_heater_combined_network_gas_share: 88.1\nhouseholds_space_heater_combined_network_gas_share_present: 88.1\nhouseholds_space_heater_heatpump_ground_water_electricity_share: 0.0\nhouseholds_space_heater_heatpump_ground_water_electricity_share_present: 0.0\nhouseholds_space_heater_micro_chp_network_gas_share: 0.0\nhouseholds_space_heater_micro_chp_network_gas_share_present: 0.0\nhouseholds_space_heater_district_heating_steam_hot_water_share: 0.0\nhouseholds_space_heater_district_heating_steam_hot_water_share_present: 0.0\nhouseholds_space_heater_heatpump_air_water_electricity_share: 0.0\nhouseholds_space_heater_heatpump_air_water_electricity_share_present: 0.0\nhouseholds_space_heater_hybrid_heatpump_air_water_electricity_share: 0.0\nhouseholds_space_heater_hybrid_heatpump_air_water_electricity_share_present: 0.0\nhouseholds_space_heater_wood_pellets_share: 11.9\nhouseholds_space_heater_wood_pellets_share_present: 11.9\nhouseholds_space_heater_electricity_share: 0.0\nhouseholds_space_heater_electricity_share_present: 0.0\nhouseholds_space_heater_network_gas_share: 0.0\nhouseholds_space_heater_network_gas_share_present: 0.0\nhouseholds_space_heater_crude_oil_share: 0.0\nhouseholds_space_heater_crude_oil_share_present: 0.0\nhouseholds_space_heater_coal_share: 0.0\nhouseholds_space_heater_coal_share_present: 0.0\nhouseholds_water_heater_combined_network_gas_share: 89.6\nhouseholds_water_heater_combined_network_gas_share_present: 89.6\nhouseholds_water_heater_heatpump_ground_water_electricity_share: 0.0\nhouseholds_water_heater_heatpump_ground_water_electricity_share_present: 0.0\nhouseholds_water_heater_micro_chp_network_gas_share: 0.0\nhouseholds_water_heater_micro_chp_network_gas_share_present: 0.0\nhouseholds_water_heater_district_heating_steam_hot_water_share: 0.0\nhouseholds_water_heater_district_heating_steam_hot_water_share_present: 0.0\nhouseholds_water_heater_heatpump_air_water_electricity_share: 0.0\nhouseholds_water_heater_heatpump_air_water_electricity_share_present: 0.0\nhouseholds_water_heater_hybrid_heatpump_air_water_electricity_share: 0.0\nhouseholds_water_heater_hybrid_heatpump_air_water_electricity_share_present: 0.0\nhouseholds_water_heater_wood_pellets_share: 10.4\nhouseholds_water_heater_wood_pellets_share_present: 10.4\nhouseholds_water_heater_resistive_electricity_share: 0.0\nhouseholds_water_heater_resistive_electricity_share_present: 0.0\nhouseholds_water_heater_network_gas_share: 0.0\nhouseholds_water_heater_network_gas_share_present: 0.0\nhouseholds_water_heater_crude_oil_share: 0.0\nhouseholds_water_heater_crude_oil_share_present: 0.0\nhouseholds_water_heater_coal_share: 0.0\nhouseholds_water_heater_coal_share_present: 0.0\nhouseholds_water_heater_fuel_cell_chp_network_gas_share: 0.0\nhouseholds_water_heater_fuel_cell_chp_network_gas_share_present: 0.0\nhouseholds_water_heater_solar_thermal_share: 0.0\nhouseholds_water_heater_solar_thermal_share_present: 0.0\nbuildings_space_heater_network_gas_share: 100.0\nbuildings_space_heater_collective_heatpump_water_water_ts_electricity_share: 0.0\nbuildings_space_heater_solar_thermal_share: 0.0\nbuildings_space_heater_wood_pellets_share: 0.0\nbuildings_space_heater_district_heating_steam_hot_water_share: 0.0\nbuildings_cooling_collective_heatpump_water_water_ts_electricity_share: 0.0\nbuildings_cooling_heatpump_air_water_network_gas_share: 0.0\nbuildings_cooling_airconditioning_share: 100.0\ntransport_car_using_electricity_share: 0.0\ntransport_car_using_diesel_mix_share: 48.6\ntransport_car_using_gasoline_mix_share: 48.9\ntransport_car_using_lpg_share: 2.5\ntransport_car_using_compressed_natural_gas_share: 0.0\nagriculture_useful_demand_electricity_both: -11.32\nhouseholds_number_of_inhabitants_both: 0.003525\nhouseholds_useful_demand_heat_per_person_both: 8.25\n# households_heat_network_connection_steam_hot_water_share_present: 12.5\n# households_collective_geothermal_share_present: 12.5\n# households_collective_chp_wood_pellets_share_present: 5.0\n# households_collective_chp_network_gas_share_present: 50.0\n# households_collective_chp_biogas_share_present: 20.0', 2020, NULL, NULL, 448956, 0, NULL, 1, 'nl', 'ETM', '--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess\nhouseholds_space_heater_heatpump_air_water_electricity_share: 0.0\nhouseholds_space_heater_micro_chp_network_gas_share: 0.0\nhouseholds_water_heater_coal_share: 0.0\nhouseholds_water_heater_crude_oil_share: 0.0\nhouseholds_water_heater_fuel_cell_chp_network_gas_share: 0.0\nhouseholds_water_heater_heatpump_air_water_electricity_share: 0.0\nhouseholds_water_heater_heatpump_ground_water_electricity_share: 0.0\nhouseholds_water_heater_micro_chp_network_gas_share: 0.0\nbuildings_space_heater_coal_share: 0.0\nbuildings_space_heater_crude_oil_share: 0.0\nbuildings_space_heater_electricity_share: 0.0\nbuildings_space_heater_heatpump_air_water_network_gas_share: 0.0\n');

scenario_scaling

INSERT INTO `scenario_scalings` (`id`, `scenario_id`, `area_attribute`, `value`, `base_value`, `has_agriculture`, `has_industry`, `has_energy`)
VALUES
    (1246, 454086, 'number_of_residences', 1657, 7386740, 1, 1, 1);

including @ChaelKruip and @grdw

AlexanderWirtz commented 8 years ago

@antw I will give some more background to this issue

Background

We are trying to create ETM scenarios for a tiny island called Ameland. this has 1657 residences and not much else. Scaling down from a Dutch ETM scenario results in energy demands that are at best > 50% off, at worst > 300%. I know this, because I have found pretty good data on energy use in Ameland. Needless to say, these scaled scenarios just won't do.

Of course, for future values, I can always use slider setting in the scenario files, to make sure energy use per sector is roughly correct. This leaves the present values. As you are aware, I have been playing with input statements to set all kinds of percentages and demands for the present graph (as well as for both, with varying success. All these input statements I have put into the adjust_scalings directory on the new_input_statements branch of etsource.

What works

What works like a charm, for example, is first setting households_useful_demand_heat_per_person_both in a scenario file, and then using the slider to adjust the future value through: households_useful_demand_heat_per_person.

This helps me tweak residential space heating demand to just the right value for the present and future.

What doesn't work yet

A similar trick for space_heating and water_heating technologies is less successful. First of all, because setting these values for both is not very useful. So I made new input statements for the present only. See the folder I linked to above. Second, because after setting the values for all technologies, the sliders no longer work (the issue at hand), even though the present technology mix does get set accordingly.

The slide balancer requires you to specify updates for all sliders in a group, otherwise the latter does not work either. See the scenario file @dennisschoenmakers included

Hope this helps

antw commented 8 years ago

Second, because after setting the values for all technologies, the sliders no longer work (the issue at hand), even though the present technology mix does get set accordingly. [...] The slide balancer requires you to specify updates for all sliders in a group, otherwise the latter does not work either.

This is because they have been assigned to the heating_households and hot_water_households share groups, which are used to balance the inputs on the future graph.

On the new_input_statements_regrouped branch, I assigned new groups to the "adjust_scalings" inputs (heating_households_present and hot_water_households_present, although you could use whatever names you want) and ETEngine appears to accept the updates without any errors.

dennisquintel commented 8 years ago

Thanks!!!