Deliver geospatial models direct to decision makers with SyncroSim › Forums › ST-Sim & State-and-Transition Simulation Models › Problem running spatially explicit models using the Linux command line utilities › Reply To: Problem running spatially explicit models using the Linux command line utilities
Hi Mike. I am able to do a spatial run with this library no problem. Here are the steps and code I used using windows Power Shell. If you are still not able to run, it may be that you have renamed, moved or not included the folders containing inputs that accompany the ssim library.
# **********************************************************
# Example PowerShell Script to Run a Spatial Model in ST-Sim V3.0 from the commandline
# 1. Script was run using the library located at: http://www.apexrms.com/downloads/syncrosim/ST-Sim-Spatial-Sample-V2-4-6.zip
# 2. Download the library and extract the contents to a single directory on your computer
# 3. Open the library in the GUI to ensure the library is upgraded to your current version
# 4. Run this script to do a spatial run of the current management scenario
# **********************************************************
# Author Leonardo Frid, ApexRMS
# Date 2016.08.04
# **********************************************************
# **********************************************************
# Declarations
# **********************************************************
# The path to syncroSim on your computer
$syncroSimPath = “C:\Program Files\SyncroSim\1”
# The path to the library you want to run
$libPath = “C:\Users\Leonardo\Documents\My SyncroSim Files\Sample\ST-Sim-Spatial-Sample-V2-4-6\ST-Sim-Spatial-Sample-V2-4-6.ssim”
# The scenario Id for the scenario you want to run
[Int]$scenarioId = 210
# **********************************************************
# Run the model
# **********************************************************
cd $syncroSimPath
.\SyncroSim.console.exe –run –lib=”$libPath” –sid=”$scenarioId”
# **********************************************************
# End
# **********************************************************