Menu Close

How to access ST-Sim results in R

Syncrosim Forums ST-Sim & State-and-Transition Simulation Models How to access ST-Sim results in R

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #6382

    I have used the code below to try to bring my ST-Sim model results into R Studio as datasheets. The datasheets have the headers I expect, but they have no other data in them. In the code sample below I try to access state class and transition results, but I’ve tried accessing all the output tables, and the result is the same for each. Am I accessing the right tables and if so, what code do I need to get the results into R Studio? The library I’m working with includes 800 models with results output for 10 iterations, every 100 timesteps.

    programFolder = “C:/Program Files/SyncroSim”
    Ses = session(programFolder)
    Lib = ssimLibrary(name=”MasterTEST19Dec2018-100yrresults”, model=”stsim”, session=Ses)
    Prj = project(Lib, project=”BpSModels”)
    Scn = scenario(Prj, “All Models”)
    OutStateSheet = “STSim_OutputStratumState”
    OutStateData = datasheet(Scn, OutStateSheet)
    OutTransSheet = “STSim_OutputStratumTransition”
    OutTransData = datasheet(Scn, OutTransSheet)

    Colin DanielColin Daniel

    It looks like you are probably referencing the original scenario with your call Scn = scenario(Prj, “All Models”), rather than the Results Scenario that contains the output associated with this original scenario. Each original scenario can spawn multiple results scenarios – i.e. one for each time you run the original scenario. Only the Results Scenarios contain output.

    Try the command scenario(Prj) to see a list all your scenarios, including all the Results Scenarios. From here you can get the ID for the result scenario and then use the command Scn = scenario(Prj, ScnID), where ScnID is the unique ID for the appropriate Results Scenario.


    Yahoo! That worked. THANKS!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.