Methods to create or return a SyncroSim Session.

session(x = NULL, silent = TRUE, printCmd = FALSE)

# S4 method for missingOrNULLOrChar
session(x = NULL, silent = TRUE, printCmd = FALSE)

# S4 method for SsimObject
session(x = NULL, silent = TRUE, printCmd = FALSE)

session(ssimObject) <- value

# S4 method for character
session(ssimObject) <- value

# S4 method for SsimObject
session(ssimObject) <- value

Arguments

x

character or SsimObject. Path to SyncroSim installation. If NULL (default), then default path is used

silent

logical. Applies only if x is a path or NULL If TRUE, warnings from the console are ignored. Otherwise they are printed. Default is FALSE

printCmd

logical. Applies only if x is a path or NULL If TRUE, arguments passed to the SyncroSim console are also printed. Helpful for debugging. Default is FALSE

ssimObject

Project or Scenario object

value

Session object

Value

A SyncroSim Session object.

Details

In order to avoid problems with SyncroSim version compatibility and SsimLibrary updating, the new Session must have the same filepath as the Session of the SsimObject e.g. filepath(value)==filepath(session(ssimObject)). Therefore, the only time when you will need to set a new SyncroSim Session is if you have updated the SyncroSim software and want to update an existing SsimObject to use the new software.

Examples

# \donttest{ # Specify file path and name of new SsimLibrary myLibraryName <- file.path(tempdir(), "testlib") # Set up a SyncroSim Session, SsimLibrary, and Project mySession <- session() myLibrary <- ssimLibrary(name = myLibraryName, session = mySession) myProject <- project(myLibrary, project = "Definitions") # Lists the folder location of SyncroSim Session filepath(mySession)
#> [1] "C:/Program Files/SyncroSim"
# Lists the version of SyncroSim Session version(mySession)
#> [1] "2.3.6"
# Data frame of the packages installed with this version of SyncroSim package(mySession)
#> name #> 1 demodigits #> 2 epi #> 3 epiDataBc #> 4 epiDataCanada #> 5 epiDataWorld #> 6 epiForecastIHME #> 7 epiModelDeathHospital #> 8 epiModelVocVaccine #> 9 epiPublish #> 10 epiTransform #> 11 helloworld #> 12 helloworldPipeline #> 13 helloworldPipelinePy #> 14 helloworldSpatial #> 15 helloworldTime #> 16 helloworldTimePy #> 17 helloworldUncertainty #> 18 helloworldUncertaintyPy #> 19 landfirevegmodels #> 20 lucas #> 21 modelKarlenPypm #> 22 netlogo #> 23 stconnect #> 24 stsim #> 25 stsimecodep #> 26 stsimsf #> description #> 1 Demo Digits #> 2 Epidemic Base Package #> 3 BC COVID-19 Data #> 4 Canadian COVID-19 Data #> 5 World COVID-19 Data #> 6 IHME COVID-19 Forecasts #> 7 Death + Hospitalization Model #> 8 VOC + Vaccine Model #> 9 Data Publication #> 10 Remove Seasonal Effects #> 11 Hello World Package #> 12 Example demonstrating how to use pipelines #> 13 Example demonstrating how to use pipelines with python #> 14 Example demonstrating how to use spatial data #> 15 Example demonstrating how to use timesteps #> 16 Example demonstrating how to use timesteps with a python model #> 17 Example demonstrating how to use iterations #> 18 Example demonstrating how to use iterations with python #> 19 Landfire vegetation models #> 20 Land Use and Carbon Scenario Simulator (LUCAS) #> 21 Karlen PyPm Model #> 22 Runs the NetLogo agent-based modeling environment #> 23 Connectivity planning for future climate and land-use change #> 24 The ST-Sim state-and-transition simulation model #> 25 Calculates ecological departure in ST-Sim using the LANDFIRE Fire Regime Condition Class #> 26 Integrates stocks and flows into the ST-Sim simulation model #> version #> 1 1.0.0 #> 2 1.1.0 #> 3 1.0.0 #> 4 1.0.0 #> 5 1.0.0 #> 6 1.0.0 #> 7 1.0.0 #> 8 1.0.0 #> 9 1.0.0 #> 10 1.0.0 #> 11 1.0.0 #> 12 1.0.0 #> 13 1.0.0 #> 14 1.0.1 #> 15 1.0.0 #> 16 1.0.0 #> 17 1.0.0 #> 18 1.0.0 #> 19 1.1.0 #> 20 1.0.5 #> 21 1.0.0 #> 22 1.2.0 #> 23 1.1.14 #> 24 3.3.3 #> 25 3.3.0 #> 26 3.3.2
# Data frame of the base packages installed with this version of SyncroSim package(mySession, installed = "BASE")
#> name #> 1 demodigits #> 2 epi #> 3 helloworld #> 4 helloworldPipeline #> 5 helloworldPipelinePy #> 6 helloworldSpatial #> 7 helloworldTime #> 8 helloworldTimePy #> 9 helloworldUncertainty #> 10 helloworldUncertaintyPy #> 11 landfirevegmodels #> 12 lucas #> 13 netlogo #> 14 stconnect #> 15 stsim #> description version #> 1 Demo Digits 1.0.0 #> 2 Epidemic Base Package 1.1.0 #> 3 Hello World Package 1.0.0 #> 4 Example demonstrating how to use pipelines 1.0.0 #> 5 Example demonstrating how to use pipelines with python 1.0.0 #> 6 Example demonstrating how to use spatial data 1.0.1 #> 7 Example demonstrating how to use timesteps 1.0.0 #> 8 Example demonstrating how to use timesteps with a python model 1.0.0 #> 9 Example demonstrating how to use iterations 1.0.0 #> 10 Example demonstrating how to use iterations with python 1.0.0 #> 11 Landfire vegetation models 1.1.0 #> 12 Land Use and Carbon Scenario Simulator (LUCAS) 1.0.5 #> 13 Runs the NetLogo agent-based modeling environment 1.2.0 #> 14 Connectivity planning for future climate and land-use change 1.1.14 #> 15 The ST-Sim state-and-transition simulation model 3.3.3
# Set a new SyncroSim Session for the SyncroSim Project session(myProject) <- session(x = filepath(session(myProject))) # }