6
6
# ' Parameter combinations are selected by generating a quasi-random
7
7
# ' sequence and mapping it to a specified range for each parameter.
8
8
# ' Then, each parameter set is run through the offline land model in
9
- # ' each of the Perfect, Lagged, and Linear variants. (I.e., if N
10
- # ' parameter sets are selected, then 3N scenarios are run.)
9
+ # ' each of the Perfect, Adaptive, HybridPerfectAdaptive, HybridLinearAdaptive, and Linear variants.
10
+ # ' (I.e., if N parameter sets are selected, then 5N scenarios are run.)
11
11
# '
12
12
# ' This function is strictly for running the ensemble of models. Analysis
13
13
# ' must be completed after the fact.
@@ -58,7 +58,7 @@ run_ensemble <- function(N = 500, aOutputDir = "./outputs", skip = 0,
58
58
message(" ****************************************************" )
59
59
60
60
# Determine the number of parameters. If aDifferentiateParamByCrop = TRUE, then we have 3 parameters each for
61
- # lagged share and linear years. If FALSE, then only one paramter for each. In both cases, there are 3 logit exponents
61
+ # lagged share and linear years. If FALSE, then only one parameter for each. In both cases, there are 3 logit exponents
62
62
if ( aDifferentiateParamByCrop ) {
63
63
NPARAM <- 9
64
64
} else {
@@ -187,8 +187,8 @@ run_ensemble <- function(N = 500, aOutputDir = "./outputs", skip = 0,
187
187
# ' Parameter combinations are selected by generating a quasi-random
188
188
# ' sequence and mapping it to a specified range for each parameter.
189
189
# ' Then, each parameter set is run through the offline land model in
190
- # ' each of the Perfect, Lagged, and Linear variants. (I.e., if N
191
- # ' parameter sets are selected, then 3N scenarios are run.)
190
+ # ' each of the Perfect, Adaptive, HybridLinearAdaptive, HybridPerfectAdaptive, and Linear variants.
191
+ # ' (I.e., if N parameter sets are selected, then 5N scenarios are run.)
192
192
# '
193
193
# ' If the scenario type is "Hindcast", then after each model has been run, the
194
194
# ' Bayesian analysis will be run so that its results can be stored with the rest
@@ -364,7 +364,7 @@ run_ensemble_bayes <- function(N = 500, aOutputDir = "./outputs", skip = 0,
364
364
365
365
# ' Generate the ensemble members for a single set of parameters
366
366
# '
367
- # ' This generates one each of the Perfect, Lagged , and Linear scenario types
367
+ # ' This generates one each of the Perfect, Adaptive, HybridLinearAdaptive, HybridPerfectAdaptive , and Linear scenario types
368
368
# ' using the input parameters. The return value is a list of the three
369
369
# ' \code{ScenarioInfo} objects for the scenarios generated.
370
370
# '
@@ -411,12 +411,12 @@ gen_ensemble_member <- function(agFor, agForNonPast, crop, share1, share2, share
411
411
aOutputDir = aOutputDir )
412
412
413
413
414
- # # Lagged scenario - without including current prices (i.e., y[i] = a*y[i-1] + (1-a)*x[i-1])
414
+ # # Adaptive scenario - without including current prices (i.e., y[i] = a*y[i-1] + (1-a)*x[i-1])
415
415
share <- paste(share1 , share2 , share3 , sep = " -" )
416
- scenName <- getScenName(aScenType , " Lagged " , share , agFor , agForNonPast , crop )
416
+ scenName <- getScenName(aScenType , " Adaptive " , share , agFor , agForNonPast , crop )
417
417
418
418
lagscen <- ScenarioInfo(aScenarioType = aScenType ,
419
- aExpectationType = " Lagged " ,
419
+ aExpectationType = " Adaptive " ,
420
420
aLinearYears1 = NA ,
421
421
aLinearYears2 = NA ,
422
422
aLinearYears3 = NA ,
@@ -433,12 +433,12 @@ gen_ensemble_member <- function(agFor, agForNonPast, crop, share1, share2, share
433
433
aSerialNum = serialnum + 0.2 ,
434
434
aOutputDir = aOutputDir )
435
435
436
- # # Lagged scenario - with including current prices (i.e., y[i] = a*y[i-1] + (1-a)*x[i])
436
+ # # HybridPerfectAdaptive scenario - with including current prices (i.e., y[i] = a*y[i-1] + (1-a)*x[i])
437
437
share <- paste(share1 , share2 , share3 , sep = " -" )
438
- scenName <- getScenName(aScenType , " LaggedCurr " , share , agFor , agForNonPast , crop )
438
+ scenName <- getScenName(aScenType , " HybridPerfectAdaptive " , share , agFor , agForNonPast , crop )
439
439
440
440
lagcurrscen <- ScenarioInfo(aScenarioType = aScenType ,
441
- aExpectationType = " LaggedCurr " ,
441
+ aExpectationType = " HybridPerfectAdaptive " ,
442
442
aLinearYears1 = NA ,
443
443
aLinearYears2 = NA ,
444
444
aLinearYears3 = NA ,
@@ -479,9 +479,9 @@ gen_ensemble_member <- function(agFor, agForNonPast, crop, share1, share2, share
479
479
# # mixed scenario, using linear for yield and adaptive for prices
480
480
linyears <- paste(linyears1 , linyears2 , linyears3 , sep = " -" )
481
481
share <- paste(share1 , share2 , share3 , sep = " -" )
482
- scenName <- getScenName(aScenType , " Mixed " , paste(linyears , share , sep = " _" ), agFor , agForNonPast , crop )
482
+ scenName <- getScenName(aScenType , " HybridLinearAdaptive " , paste(linyears , share , sep = " _" ), agFor , agForNonPast , crop )
483
483
mixedscen <- ScenarioInfo(aScenarioType = aScenType ,
484
- aExpectationType = " Mixed " ,
484
+ aExpectationType = " HybridLinearAdaptive " ,
485
485
aLinearYears1 = linyears1 ,
486
486
aLinearYears2 = linyears2 ,
487
487
aLinearYears3 = linyears3 ,
0 commit comments