On Sep 1, 2014, at 7:18 AM, Simone Gabbriellini <[log in to unmask]> wrote:

> My model is working now, so thanks for all the suggestions so far. Still, I would like a run to stop after 10 steps, this is a parameter that the user can set in the UI, but I don't know how to pass it to the SimState... 

The SimState doesn't get told anything about the number of steps you're trying to run.  If you want to run for a set number of steps, you should do so in your outer main() loop; alternatively if you use doLoop(), you can specify it at the command line (for example, java -for 100000)

> I understand that from command line I can specify the maximum steps and the number of jobs, like do this simulation 20 times and each of the runs stops after 10 steps. What I am missing now is: is it possible to stop from the UI the simulation after x steps?

Sure.  Under the "Console" tab, see "Automatically Stop at Step"

You cannot use the GUI to specify jobs.  However if you just want to run multiple times, under the Console tab you can also check the box "Repeat Play on Stop" (and make sure that "Increment Seed on Stop" is also checked).