Command Line Options

On Windows machines, models can be run from outside of STELLA or iThink using command line controls. For example, to open the model "test.itm", run it and then quit you would use the following command:

“iThink.exe” –r test.itm

The following describes the command line options that are supported:

-r Run the model ballistically and then quit (don't save)
-rn N Run the model ballistically N times and then quit (don't save) [N > 0]
-rs Run sensitivity analysis as defined in the model and then quit (don't save)
-rd Restore all devices after opening (before the first run)
-s Save the model at the end of the last run
-i Import Now before each run
-x Export Now after each run
-nq Do not quit after the last run
-0 var Force the specified variable to zero after opening (before the first run)
-1 var Force the specified variable to one after opening (before the first run)

Example:

To use the command line options to run a model more than 32,000 time steps, follow these steps:

  1. Add a persistent link to export the values of the model to a spreadsheet.
  2. Connect the last values exported to a persistent import sheet.
  3. Save the model.
  4. Create a shortcut to STELLA or iThink using the -rn N option.

For example:

“iThink 9.1.exe” –rn 3 model.itm

This will run model.itm 3 times, picking up the last run’s values for the next run, and then quit. If the time specs for the model are set to 32,000, it will run a total for 96,000 time steps and the final results will be in the Excel spreadsheet.

To run comparative runs for different scenarios, use the -0 and -1 options to set the proper configuration switches, and the –s option to save after the run.

NOTE: You do not have to quit the software in order to change configuration settings, however, quitting is the default behavior.