tradeoff_batch: Runs tradeoff_mod in batch mode

Description Usage Arguments Value Note Examples

Description

Function to drive large numbers of iteration of trademod

Usage

1
2
tradeoff_batch(parms, input_key = "ZA", todisk = FALSE, silent = FALSE,
  ncl = 4)

Arguments

parms

Matrix or data.frame providing input parameters permutations

input_key

Two letter location code indicating input data to load.

todisk

TRUE, in which case output data.table is written to disk

silent

Silent or verbose model. TRUE (default) or FALSE

Value

List of tradeoff_mod impact data.frames and conversion data.table if todisk is FALSE

Note

This is one place where parallelizing could be useful, replacing for loop with foreach.

Examples

1
2
3
4
5
6
7
8
targlist <- list(c("maize" = 2, "soy" = 2))
#targlist <- list(c("maize" = 2))
cpmlist <- list(c(1, 1))
cblist <- pareto_steps(c("Y", "C"), step = 0.25)
parms <- batch_params(targlist = targlist, cblist = cblist, 
                      currprodmodlist = list(c(1, 1)))
batch_test <- tradeoff_batch(parms = parms, input_key = "ZA", todisk = FALSE, 
                             silent = TRUE)

PrincetonUniversity/agroEcoTradeoff documentation built on May 8, 2019, 3:12 p.m.