From 31e3288d7acecd77e5f606a5f73846a63345e8e5 Mon Sep 17 00:00:00 2001 From: alextsimp Date: Mon, 28 Sep 2026 18:10:10 +0300 Subject: [PATCH 1/3] update: enhance config.json generation for daily integration test with additional parameters --- scripts/tools/daily_run.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/tools/daily_run.bat b/scripts/tools/daily_run.bat index 74ce8923..92aded2e 100644 --- a/scripts/tools/daily_run.bat +++ b/scripts/tools/daily_run.bat @@ -260,7 +260,7 @@ REM ---- 4. Write the daily-run config.json (also sets scenario 1 = NPi) ------- REM Paths read from the SET vars above; non-path settings mirror root config.json. call :blank call :say [5/9] Writing config.json ... -Rscript -e "library(jsonlite); cfg<-list(paths=list(model_runs_path=Sys.getenv('model_runs_path'), gams_path=Sys.getenv('gams_path')), behavior=list(withRunFolder=TRUE, withSync=TRUE, withReport=TRUE, uploadGDX=FALSE), scenario=list(scenario_name='DAILY_NPi', description='Daily main-branch integration test (mrprom + open-prom + postprom).', gams_flags=list(fScenario=1L, fEndY=2100L, CountrySolveMode='serial', Transport='simple', Industry='technology', RestOfEnergy='legacy', PowerGeneration='simple', Hydrogen='legacy', CO2='legacy', Emissions='legacy', Prices='legacy', Heat='heat', Curves='off', Economy='economy'))); write(toJSON(cfg, auto_unbox=TRUE, pretty=TRUE), 'config.json')" || goto :fail +Rscript -e "library(jsonlite); cfg<-list(paths=list(model_runs_path=Sys.getenv('model_runs_path'), magpie_path=Sys.getenv('magpie_path'), gams_path=Sys.getenv('gams_path')), behavior=list(withRunFolder=TRUE, withSync=TRUE, withReport=TRUE, uploadGDX=TRUE), scenario=list(scenario_name='DAILY_NPi', description='Daily main-branch integration test (mrprom + open-prom + postprom).', gams_flags=list(fScenario=1L, fEndY=2100L, CountrySolveMode='serial', biomassReferenceEJ=150, ccsStorageReferenceGtCO2=400), land_use_emulator=list(source='magpie', carbon_price_scenario='Npi_Default'), maturity_factors=list(levels=list(low=0.5, def=1, high=2), changes=list(solar=list(tech='PGSOL', mult='def'), windOffLam=list(tech='PGAWNO', mult='def', region='LAM'), bmsccsMid=list(tech='ATHBMSCCS', mult='def', from=2030L, to=2050L), bmsccsLate=list(tech='ATHBMSCCS', mult='def', from=2051L), lpgCars=list(sector='PC', tech='TLPG', mult='def'))), soft_link_magpie=list(project='uptake', existing_prom_run=NULL, max_iter=1L, price_tol=0.05, quant_tol=0.05))); write(toJSON(cfg, auto_unbox=TRUE, pretty=TRUE, null='null'), 'config.json')" || goto :fail REM ---- 5. NPi: task 3 rebuilds data/+targets/ (via mrprom) then runs NPi ----- call :blank From 35254aa85a28cc2fd6f41eba5a1e1266390d81ea Mon Sep 17 00:00:00 2001 From: alextsimp Date: Tue, 29 Sep 2026 11:30:10 +0300 Subject: [PATCH 2/3] Bug fix: correct activity elasticities references from "ELL" to "LAM" --- core/input.gms | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/input.gms b/core/input.gms index b1afb08f..626608ae 100644 --- a/core/input.gms +++ b/core/input.gms @@ -42,9 +42,9 @@ $ondelim $include "iElastA.csv" $offdelim ; -imElastA.L(runCy, SBS, ETYPES, YTIME) = imElastAL("ELL", SBS, ETYPES, YTIME); +imElastA.L(runCy, SBS, ETYPES, YTIME) = imElastAL("LAM", SBS, ETYPES, YTIME); imElastA.LO(runCy, SBS, posElast, YTIME) = 0.001; -imElastA.UP(runCy, SBS, posElast, YTIME) = 5 * imElastAL("ELL", SBS, posElast, YTIME); +imElastA.UP(runCy, SBS, posElast, YTIME) = 5 * imElastAL("LAM", SBS, posElast, YTIME); imElastA.LO(runCy, SBS, negElast, YTIME) = -10; imElastA.UP(runCy, SBS, negElast, YTIME) = -0.001; @@ -54,7 +54,7 @@ $ondelim $include "iElastA.csv" $offdelim ; -imElastA(runCy,SBS,ETYPES,YTIME) = imElastA("ELL",SBS,ETYPES,YTIME); +imElastA(runCy,SBS,ETYPES,YTIME) = imElastA("LAM",SBS,ETYPES,YTIME); imElastA(runCy,DSBS,"b1",YTIME)$(not TRANSE(DSBS)) = imElastA(runCy,DSBS,"b1",YTIME) / 4; imElastA(runCy,DSBS,"b2",YTIME)$(not TRANSE(DSBS)) = imElastA(runCy,DSBS,"b2",YTIME) / 4; $ENDIF.calib From 5860bb5a6503bbc9b3e25f7f40ccc8221259ffc7 Mon Sep 17 00:00:00 2001 From: alextsimp Date: Wed, 30 Sep 2026 16:46:00 +0300 Subject: [PATCH 3/3] Add validation to abort execution if input table is empty and include new carbon budget price paths --- core/input.gms | 9 +++++++++ core/sets.gms | 2 ++ 2 files changed, 11 insertions(+) diff --git a/core/input.gms b/core/input.gms index 626608ae..b0381567 100644 --- a/core/input.gms +++ b/core/input.gms @@ -58,6 +58,15 @@ imElastA(runCy,SBS,ETYPES,YTIME) = imElastA("LAM",SBS,ETYPES,YTIME); imElastA(runCy,DSBS,"b1",YTIME)$(not TRANSE(DSBS)) = imElastA(runCy,DSBS,"b1",YTIME) / 4; imElastA(runCy,DSBS,"b2",YTIME)$(not TRANSE(DSBS)) = imElastA(runCy,DSBS,"b2",YTIME) / 4; $ENDIF.calib +* Stop if the entire input table is empty or zero; individual zeros are allowed. +abort$(sum((allCy,SBS,ETYPES,YTIME), +$IFTHEN.calibCheck %Calibration% == Calibration + abs(imElastAL(allCy,SBS,ETYPES,YTIME)) +$ELSE.calibCheck + abs(imElastA(allCy,SBS,ETYPES,YTIME)) +$ENDIF.calibCheck + ) = 0) + "ERROR: iElastA.csv contains no nonzero activity elasticities. Execution stopped."; *--- parameter iDiscData(SBS) "Discount rates per subsector ()" / PCH 0.12 diff --git a/core/sets.gms b/core/sets.gms index 97d36936..b92ea8cd 100644 --- a/core/sets.gms +++ b/core/sets.gms @@ -351,6 +351,8 @@ UPT_200 UPT_400 UPT_600 UPT_800 +SSP1_800f +SSP2_800f / RegulaPolicies(POLICIES_set) Set of policies entering in the regula falsi loops