inputDataAdjustments.gms 4.92 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
$ontext
Supplementary tool for backbone energy building model
We read inputData.gdx and write inputDataAdjusted<x>.gdx, e.g. inputDataAdjusted1.gdx

inputDataAdjusted1.gdx
- New lower and upper temperature limits
- Elspot prices 2013

2021-12-28 Toni Lastusilta (VTT)
$offtext

* 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 '//'
$oneolcom
$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
$onmultiR
$gdxIn input\inputData.gdx
$load grid node unit unittype unitUnittype effLevelGroupUnit
$offmulti
$load ts_influx p_gnBoundaryPropertiesForStates p_gnu_io p_gn p_unit p_gnn p_s_discountFactor
$gdxin

* Modify Input (optional)
Scalars
  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     /
;
Sets
 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" /
;

if(modify_input=1,
* 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
Set
  tsIso Time-stamp in ISO8601 format
;
Parameters
 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
$gdxin

* 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