Commit 24280a55 authored by Toni's avatar Toni
Browse files

Added files that processes inputData.gdx to inputDataAdjusted1.gdx

Creating enhanced input file inputDataAdjusted1.gdx that adjust lower and upper temperature levels in building nodes and includes electricity spot prices. Result.gdx is modified due minimum temperature requirement, e.g. 20C.
parent b94e23ed
Convert electricty prices from Excel to GDX
2021-12-21 Toni Lastusilta (VTT)
tsIso Time-stamp in ISO8601 format
t "Model time steps" / t000000 * t050000 /
elspotIso(tsIso) "Elspot Prices_2013 (EUR/MWh) with ISO date"
elspotIsoBB(t,tsIso) "Elspot Prices_2013 (EUR/MWh) with backbone timestamp and ISO date"
elspotBB(t) "Elspot Prices_2013 (EUR/MWh) with backbone timestamp"
*Read from Excel
$onEcho > howToRead.txt
set=tsIso rng=V4:V8789 rDim=1 values=noData
par=elspotIso rng=V4:W8789 rDim=1
$call gdxxrw input\elspot-prices_2013_hourly_eur_TL_v1.xlsx squeeze=n output=elspot_prices_2013.gdx @howToRead.txt trace=3'
$gdxIn elspot_prices_2013
$load tsIso elspotIso
execute_unloaddi "input\elspot_prices_2013.gdx" elspotIsoBB, elspotBB;
Supplementary tool for backbone energy building model
We read inputData.gdx and write inputDataAdjusted<x>.gdx, e.g. inputDataAdjusted1.gdx
- New lower and upper temperature limits
- Elspot prices 2013
2021-12-28 Toni Lastusilta (VTT)
* Create elspot_prices_2013.gdx from elspot-prices_2013_hourly_eur_TL_v1.xlsx
$if 1==0 $call gams input/elspot_price_xls2gdx.gms
*Use backbone definition of sets and parameters
$if not set input_dir $setglobal input_dir 'input'
$if not set output_dir $setglobal output_dir 'output'
$if not set input_file_gdx $setglobal input_file_gdx 'inputData.gdx'
$if not set input_excel_index $setglobal input_excel_index 'INDEX'
$if not set input_excel_checkdate $setglobal input_excel_checkdate ''
* Activate end of line comments and set comment character to '//'
$eolcom //
$onempty // Allow empty data definitions
* === Definitions, sets, parameters and input data=============================
$include 'inc/1a_definitions.gms' // Definitions for possible model settings
$include 'inc/1b_sets.gms' // Set definitions used by the models
$include 'inc/1c_parameters.gms' // Parameter definitions used by the models
*Read data from inputData.gdx
$gdxIn input\inputData.gdx
$load grid node unit unittype unitUnittype effLevelGroupUnit
$load ts_influx p_gnBoundaryPropertiesForStates p_gnu_io p_gn p_unit p_gnn p_s_discountFactor
* Modify Input (optional)
modify_input "Modify input (0=no, 1=yes: to set new limits)" / 1 /
c2k "Convert celcius to kelvin degrees" / 275.15 /
start_temp_air "Start value and lower limit for inside air temperature in Celcius" / 20 /
temp_up_air "Upper limit for inside air temperature in Celcius" / 24 /
node_DHWT(node) /"IDA_ESBO_DH1.DHWT1000", "IDA_ESBO_DH2.DHWT1000", "IDA_ESBO_AB.DHWT1000"/
node_envelope_mass(node) / "IDA_ESBO_DH1.envelope_mass", "IDA_ESBO_DH2.envelope_mass", "IDA_ESBO_AB.envelope_mass" /
node_interior_air_and_furniture(node) / "IDA_ESBO_DH1.interior_air_and_furniture", "IDA_ESBO_DH2.interior_air_and_furniture", "IDA_ESBO_AB.interior_air_and_furniture" /
node_internal_mass(node) / "IDA_ESBO_DH1.internal_mass", "IDA_ESBO_DH2.internal_mass", "IDA_ESBO_AB.internal_mass" /
* Defintion: p_gnBoundaryPropertiesForStates(grid,node,param_gnBoundaryTypes,param_gnBoundaryProperties)
display grid,node,node_DHWT,node_envelope_mass,node_interior_air_and_furniture,node_internal_mass,param_gnBoundaryTypes,param_gnBoundaryProperties,p_gnBoundaryPropertiesForStates;
* Domestic Hot Water Tank (DHWT) is set to lower limit value at start
p_gnBoundaryPropertiesForStates('building',node_DHWT,'reference','useConstant') = 1;
p_gnBoundaryPropertiesForStates('building',node_DHWT,'reference','constant') = p_gnBoundaryPropertiesForStates('building',node_DHWT,'downwardLimit','constant') ;
* set lower limit of temperature to 20C
p_gnBoundaryPropertiesForStates('building',node_envelope_mass,'downwardLimit','constant') = 275.15+20;
p_gnBoundaryPropertiesForStates('building',node_interior_air_and_furniture,'downwardLimit','constant') = 275.15+20;
p_gnBoundaryPropertiesForStates('building',node_internal_mass,'downwardLimit','constant') = 275.15+20;
* set start value (reference) to lower limit
p_gnBoundaryPropertiesForStates('building',node_envelope_mass,'reference','constant') = p_gnBoundaryPropertiesForStates('building',node_envelope_mass,'downwardLimit','constant') ;
p_gnBoundaryPropertiesForStates('building',node_interior_air_and_furniture,'reference','constant') = p_gnBoundaryPropertiesForStates('building',node_interior_air_and_furniture,'downwardLimit','constant');
p_gnBoundaryPropertiesForStates('building',node_internal_mass,'reference','constant') = p_gnBoundaryPropertiesForStates('building',node_internal_mass,'downwardLimit','constant');
* set upper limit for building temperature
p_gnBoundaryPropertiesForStates('building',node_envelope_mass,'upwardLimit','constant') = 275.15+20;
p_gnBoundaryPropertiesForStates('building',node_interior_air_and_furniture,'upwardLimit','constant') = 275.15+20;
p_gnBoundaryPropertiesForStates('building',node_internal_mass,'upwardLimit','constant') = 275.15+20;
) ;
* Read elspot prices
tsIso Time-stamp in ISO8601 format
elspotIsoBB(t,tsIso) "Elspot Prices_2013 (EUR/MWh) with backbone timestamp and ISO date"
ts_priceElspot(t) "Elspot Prices_2013 (EUR/MWh)"
$gdxIn input\elspot_prices_2013.gdx
$load tsIso elspotIsoBB ts_priceElspot=elspotBB
* Write input with domains at execution time to take in consideration modifications
execute_unloaddi "input\inputDataAdjusted1.gdx";
execute_unloaddi "input\inputDataAdjusted1Squuezed.gdx" ts_priceElspot ts_influx effLevelGroupUnit p_gnBoundaryPropertiesForStates p_gnu_io p_gn p_unit node p_gnn unit unitUnittype grid p_s_discountFactor unittype
......@@ -2,17 +2,17 @@
User tltoni
Date 12/16/21
Time 18:42:28
Date 12/28/21
Time 12:02:16
GAMS version 37.1
GAMS system GAMS Base Module 37.1.0 r07954d5 Released Nov 11, 2021 WEI x86 64bit/MS Window
version v1.5-56-ga96b0be+
version v1.5-58-g4ec63ce+
time (s)
Compilation 1
Execution 10
Total 50
Execution 8
Total 32
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment