In "debug" mode, runs fireSenseUtils::.objfunSpreadFit() once per parameter set, with plots. Otherwise calibrates the SNLL threshold: evaluates iterThresh random parameter sets, each with a random candidate threshold, in forked processes, and returns pickThreshold() of the results.

runSpreadWithoutDEoptim(
  iterThresh,
  lower,
  upper,
  fireSense_spreadFormula,
  flammableRTM,
  annualDTx1000,
  nonAnnualDTx1000,
  fireBufferedListDT,
  mutuallyExclusive = list(youngAge = "vegPC"),
  doObjFunAssertions = getOption("fireSenseUtils.assertions", TRUE),
  historicalFires,
  covMinMax,
  objfunFireReps,
  maxFireSpread,
  weighted = TRUE,
  tests = c("snll_fs", "adtest"),
  formulaToFit,
  pars = NULL,
  plot.it = TRUE,
  mode = "fit",
  seed = NULL,
  escapeSizeHa = NULL,
  sizeLik = "kde",
  sizeLikDf = 5,
  adWeight = "auto",
  link = NULL,
  jumpTries = 0,
  jumpMeanDist = 0,
  yearAreaWeight = 0,
  areaDistWeight = 0
)

Arguments

iterThresh

integer; number of random parameter sets (and candidate thresholds).

lower, upper

numeric; bounds the random parameter sets are drawn between.

fireSense_spreadFormula

character; passed to FS_formula.

flammableRTM

SpatRaster; passed to landscape.

annualDTx1000, nonAnnualDTx1000, fireBufferedListDT, historicalFires

elements of the list made by fireSenseUtils::covsX1000AndSetDF().

mutuallyExclusive

named list of mutually exclusive covariates.

doObjFunAssertions

logical; passed to doAssertions.

covMinMax

data.table of covariate min and max, or NULL for no rescaling.

objfunFireReps

integer; passed to Nreps, the replicates per fire.

maxFireSpread

numeric; upper limit on mean spread probability.

weighted

logical; weight the SNLL by log fire size. Also used in the rough threshold estimate.

tests

character; objective function tests, e.g. "SNLL_FS", "adTest".

formulaToFit

character; the spread formula.

pars

optional numeric vector, or list of them, to evaluate instead of random sets.

plot.it

passed to .objfunSpreadFit() in "debug" mode.

mode

character; if it includes "debug", the debug branch runs.

seed

integer or NULL; set.seed() value. NULL draws one at random.

escapeSizeHa

passed to .objfunSpreadFit(): fit escaped fires only (NULL: any fire over 1 pixel).

passed to .objfunSpreadFit(), so the threshold is calibrated on the objective the fit uses. The defaults are that function's.

Value

the calibrated threshold (numeric, or NA if every trial failed); NULL in "debug" mode.