Q:

Behaviour space simultaneous simulations error

I'm using behaviour space to run 100 simulations.
The problem is when I try to run more than 1 simulation at a time, some of the variables don't seem to be cleared properly.
Here is an example output: 

Each simulation (the first column is the run number) has a variable (in the last column) reset to 0. It then adds a number between 0 and 5 until it eventually maxes out at 25. Since it only runs 2 ticks, the max result should be 10...
However as can be seen, the next simulation occasionally starts out with the max value for the variable. Is this a glitch or has someone seen something like it before? (perhaps the parallel processing isn't properly working?)    
Problem/Solution
I had a setup function that initialized certain variables, THEN used clear-all, and then created turtles using the variables at the beginning. By looking at the results, it looks like rather than the new turtles being initialized... they somehow retained values from the previous simulation (with the score property already maxed). The problem was fixed by repositioning clear-all at the top. Note that this only caused problems when running multiple simulations

A:

Interface globals (e.g., sliders) do not have a default value (unfortunately!) so clear-all does not affect them.  This means you can run into problems if your BehaviorSpace experiments (i) do not specify values for all interface globals and (ii) describe simulations that alter the values of some interface globals.  In this case, one foreground run can affect the next foreground run, even though you call clear-all in your setup.
If you instructed BehaviorSpace to call your setup, which includes a call to clear-all, this is the only way I see for your problem to arise.  If it is something else, I hope you will post a description.

A:

It seems possible that you are running into https://github.com/NetLogo/NetLogo/issues/105.
Are you calling clear-all at the start of your setup procedure?

