euangelos
euangelos

Reputation: 53

BehaviorSpace interpretation of error messages

Trying to interpret the error message from BehaviorSpace (Netlogo) and I am not sure where to begin.

The simulation works fine when run from the GUI. However when I try to run it a few times on BehaviorSpace I get the following: 'Experiment aborted due to syntax error : expected a closing parenthesis here.'

Clearly there is something - somewhere - wrong with the code and BehaviorSpace picks it up. But where does one starts to find the source of the problem when there in not much information given from within the BehaviorSpace dialogue box? What does 'here' refers to? ( a line of code somewhere I assume, but where?...) Or could it be something within the BehaviorSpace dialog box? Any suggestions?

Upvotes: 0

Views: 163

Answers (1)

JenB
JenB

Reputation: 17678

A few things you can try.

The first thing you need is some reproducability. Modify the code to explicitly use a random-seed each run (randomly generated) and output that seed. Also make sure you are outputting every step, not just at the end of the run, so that you get some information from the failed run. The idea is to find a run that fails and use that seed to see if it fails in normal operation (with whatever global variable values that run used too).

Does it always fail on the same input parameter combination? It could be that those inputs lead to a very rarely used code branch.

Switch your BehaviorSpace to run the simulations sequentially and with only one processor. Is there something unusual about the run before the one that fails? For example, it ended due to a number of ticks stopping condition instead of naturally. If so, you may not have returned some variable values to appropriate initial values in the setup for the failed run.

Upvotes: 1

Related Questions