From 5e2d1137ee9fe786efdf0e601db48f9c1ecab48d Mon Sep 17 00:00:00 2001 From: orichters Date: Fri, 16 Feb 2024 09:26:32 +0100 Subject: [PATCH] fix cm_implicitPriceTarget regexp matching --- main.gms | 4 ++-- tests/testthat/test_01-start.R | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/main.gms b/main.gms index 22e3e6f02..6a583ad1b 100755 --- a/main.gms +++ b/main.gms @@ -1287,8 +1287,8 @@ $setGlobal cm_loadFromGDX_implicitQttyTargetTax off !! def = off !! regexp = *** option 3 should only be used if the target is defined for a region that has its carbon pricing controlled by cm_emiMktTarget in the 47_regipol module. $setGlobal cm_implicitQttyTarget_delay iteration 3 !! def = iteration 3, quantity targets only start after iteration 3 *** cm_implicitPriceTarget "define tax/subsidies to match FE prices defined in the pm_implicitPriceTarget parameter." -*** Acceptable values: "off", "Initial", "HighElectricityPrice", "HighGasandLiquidsPrice", "HighPrice", "LowPrice", "LowElectricityPrice" -$setGlobal cm_implicitPriceTarget off !! def = off !! regexp = off|Initial|HighElectricityPrice|HighGasandLiquidsPrice|HighPrice|LowPrice|LowElectricityPrice" +*** Acceptable values: "off", "initial", "elecPrice", "H2Price", "highElec", "highGasandLiq", "highPrice", "lowElec", "lowPrice" +$setGlobal cm_implicitPriceTarget off !! def = off !! regexp = off|initial|elecPrice|H2Price|highElec|highGasandLiq|highPrice|lowElec|lowPrice *** cm_implicitPePriceTarget "define tax/subsidies to match PE prices defined in the pm_implicitPePriceTarget parameter." *** Acceptable values: "off", "highFossilPrice". $setGlobal cm_implicitPePriceTarget off !! def = off !! regexp = off|highFossilPrice diff --git a/tests/testthat/test_01-start.R b/tests/testthat/test_01-start.R index f4cb0a68c..b28fdecf4 100644 --- a/tests/testthat/test_01-start.R +++ b/tests/testthat/test_01-start.R @@ -39,8 +39,7 @@ test_that("start.R --test succeeds on all configs", { file.path("../../config", "*", "scenario_config*.csv"))) } csvfiles <- normalizePath(grep("scenario_config_coupled", csvfiles, invert = TRUE, value = TRUE)) - skipfiles <- c("scenario_config_21_EU11_ECEMF", - "scenario_config_EDGE-T_NDC_NPi_pkbudget", + skipfiles <- c("scenario_config_EDGE-T_NDC_NPi_pkbudget", "scenario_config_NAVIGATE_300") csvfiles <- grep(paste(skipfiles, collapse = "|"), csvfiles, invert = TRUE, value = TRUE) expect_true(length(csvfiles) > 0)