From 6fc5715749ee95bda6801463b7fc605d72f94888 Mon Sep 17 00:00:00 2001 From: robinhasse Date: Wed, 25 Jan 2023 17:13:33 +0100 Subject: [PATCH] Residential and commercial floor space. --- modules/36_buildings/simple/datainput.gms | 10 ++++++++++ modules/36_buildings/simple/declarations.gms | 5 +++++ modules/36_buildings/simple/sets.gms | 7 +++++++ 3 files changed, 22 insertions(+) diff --git a/modules/36_buildings/simple/datainput.gms b/modules/36_buildings/simple/datainput.gms index 343ff9e83d..21ecb96746 100644 --- a/modules/36_buildings/simple/datainput.gms +++ b/modules/36_buildings/simple/datainput.gms @@ -35,15 +35,25 @@ pm_cesdata_sigma(ttot,"enhgab")$ (ttot.val eq 2040) = 3; *** floor space demand for reporting +* RH, Jan 2023: if clauses to maintain backwards compatibility with old input data for a while Parameter +$call "awk -F ',' '$0 !~ /^\*/ { exit NF }' ./modules/36_buildings/simple/input/p36_floorspace_scen.cs4r" +$ifthenE.resComFloor1 (errorLevel)eq(5) +p36_floorspace_scen(tall, all_regi, all_demScen, secBuild36) "floorspace, in buildings simple realization only used for reporting at the moment, not in optimization itself" +$else.resComFloor1 p36_floorspace_scen(tall, all_regi, all_demScen) "floorspace, in buildings simple realization only used for reporting at the moment, not in optimization itself" +$endif.resComFloor1 / $ondelim $include "./modules/36_buildings/simple/input/p36_floorspace_scen.cs4r" $offdelim / ; +$ifthenE.resComFloor2 (errorLevel)eq(5) +p36_floorspace(ttot,regi,secBuild36) = p36_floorspace_scen(ttot,regi,"%cm_demScen%",secBuild36) * 1e-3; !! from million to billion m2 +$else.resComFloor2 p36_floorspace(ttot,regi) = p36_floorspace_scen(ttot,regi,"%cm_demScen%") * 1e-3; !! from million to billion m2 +$endif.resComFloor2 *** UE demand for reporting diff --git a/modules/36_buildings/simple/declarations.gms b/modules/36_buildings/simple/declarations.gms index cac0be9b40..fe89ebd33e 100644 --- a/modules/36_buildings/simple/declarations.gms +++ b/modules/36_buildings/simple/declarations.gms @@ -8,7 +8,12 @@ Parameters p36_CESMkup(ttot,all_regi,all_in) "parameter for those CES markup cost accounted as investment cost in the budget [trUSD/CES input]" +$call "awk -F ',' '$0 !~ /^\*/ { exit NF }' ./modules/36_buildings/simple/input/p36_floorspace_scen.cs4r" +$ifthenE.resComFloor0 (errorLevel)eq(5) + p36_floorspace(tall,all_regi,secBuild36) "buildings floorspace, billion m2, in simple realization only used for reporting" +$else.resComFloor0 p36_floorspace(tall,all_regi) "buildings floorspace, billion m2, in simple realization only used for reporting" +$endif.resComFloor0 p36_uedemand_build(tall,all_regi,all_in) "useful energy demand in buildings in TWh/a, in simple realization only used for reporting" ; diff --git a/modules/36_buildings/simple/sets.gms b/modules/36_buildings/simple/sets.gms index 60077d72aa..641e766e21 100644 --- a/modules/36_buildings/simple/sets.gms +++ b/modules/36_buildings/simple/sets.gms @@ -81,6 +81,13 @@ Sets feelhpb feheb / + + secBuild36 "Buildings subsectors, only for floor space reporting" + / + buildings + residential + commercial + / ; cal_ppf_buildings_dyn36(ppfen_buildings_dyn36) = YES;