run: Run scenarios

runR Documentation

Run scenarios

Description

Run one or more SyncroSim Scenario(s).

Usage

run(
  ssimObject,
  scenario = NULL,
  summary = FALSE,
  copyExternalInputs = FALSE,
  transformerName = NULL
)

## S4 method for signature 'character'
run(
  ssimObject,
  scenario = NULL,
  summary = FALSE,
  copyExternalInputs = FALSE,
  transformerName = NULL
)

## S4 method for signature 'list'
run(
  ssimObject,
  scenario = NULL,
  summary = FALSE,
  copyExternalInputs = FALSE,
  transformerName = NULL
)

## S4 method for signature 'SsimObject'
run(
  ssimObject,
  scenario = NULL,
  summary = FALSE,
  copyExternalInputs = FALSE,
  transformerName = NULL
)

Arguments

ssimObject

SsimLibrary, Project, or Scenario object, or a list of Scenarios, or character (i.e. path to a SsimLibrary on disk)

scenario

character, integer, or vector of these. Scenario names or ids. If NULL (default), then runs all Scenarios associated with the SsimObject. Note that integer ids are slightly faster

summary

logical. If FALSE (default) result Scenario objects are returned. If TRUE (faster) result Scenario ids are returned

copyExternalInputs

logical. If FALSE (default) then a copy of external input files (e.g. GeoTIFF files) is not created for each multiprocessing job. Otherwise, a copy of external inputs is created for each multiprocessing job. Applies only when the number of jobs is set to >1 in the core_Multiprocessing datasheet.

transformerName

character. The name of the transformer to run (optional)

Details

Note that breakpoints are ignored unless the SsimObject is a single Scenario.

Value

If summary = FALSE, returns a result Scenario object or a named list of result Scenarios. The name is the parent Scenario for each result. If summary = TRUE, returns summary info for result Scenarios.

Examples

## Not run: 
# Set the file path and name of the new SsimLibrary
myLibraryName <- "testlib"

# Set the SyncroSim Session, SsimLibrary, Project, and Scenario
myLibrary <- ssimLibrary(name = myLibraryName,
                         packages = "helloworldSpatial")
myProject <- project(myLibrary, project = "Definitions")
myScenario <- scenario(myProject, scenario = "My Scenario")
myScenario2 <- scenario(myProject, scenario = "My Scenario 2")

# Run with default parameters
resultScenario <- run(myScenario)

# Only return summary information
resultScenarioSummary <- run(myScenario, summary = TRUE)

# Run 2 scenarios at once
resultScenarios <- run(c(myScenario, myScenario2))

## End(Not run)


syncrosim/rsyncrosim documentation built on Oct. 18, 2024, 1:29 a.m.