Skip to content
Advertisement

Repast error when doing Batch run, ERROR: InstanceRunner – Error while running model

I have set up a simulation in Repast that is supposed to model people boarding an airplane. I wish to run it multiple times to get an average of how much time it takes to board the airplane for various methods. The model works completely fine when running normally, and the model output works just fine then. However, when I try to do a batch run it gives me this error in the console, and the final model output it gives is just an empty file. Also, the console gives this message:

WARN [SwingWorker-pool-2-thread-2] 17:40:56,274 OutputFinder – No model output found matching glob:{**/,}ModelOutput*.batch_param_map.txt in /var/folders/nh/8k546jq14l5gnwkjgxvch8180000gn/T/simphony_model_1651246794058/instance_2

WARN [SwingWorker-pool-2-thread-2] 17:40:56,274 OutputFinder – No model output found matching glob:{**/,}ModelOutput*.txt in /var/folders/nh/8k546jq14l5gnwkjgxvch8180000gn/T/simphony_model_1651246794058/instance_2

WARN [SwingWorker-pool-2-thread-2] 17:40:56,275 OutputFinder – No model output found matching glob:{**/,}ModelOutput*.batch_param_map.txt in /var/folders/nh/8k546jq14l5gnwkjgxvch8180000gn/T/simphony_model_1651246794058/instance_1

WARN [SwingWorker-pool-2-thread-2] 17:40:56,275 OutputFinder – No model output found matching glob:{**/,}ModelOutput*.txt in /var/folders/nh/8k546jq14l5gnwkjgxvch8180000gn/T/simphony_model_1651246794058/instance_1

From what I have seen, there could be four issues why a model doesn’t work in batch when it works normally.

  1. It doesn’t self-terminate. However, I am certain my model does this, it terminates as soon as all passengers are seated, and I know it does this in all normal runs.
  2. Display elements I have removed the display, and have no display elements in my simulation
  3. Model output My model output is written to a file ModelOutput.txt, with the same name each time, and it works fine when running normally.
  4. External libraries This is what I believe might be the issue. The only libraries I am importing are standard java libraries such as java.util.Random or java.util.list, as well as a lot of repast libraries. Could any of these be the issue? If so, how do I move them somewhere else while still being able to access them? I saw something about moving them into the lib directory but didn’t quite understand how.

Thank you for any help!

Advertisement

Answer

This error results when using a JRE > 11. (Note that when doing a batch run, the first “java” in the PATH is used which may not be what Eclipse is using.)

See the FAQ entry here for a solution:

https://repast.github.io/docs/RepastFAQ/RepastFAQ.html#_fatal_java_lang_exceptionininitializererror_caused_by_java_lang_reflect_inaccessibleobjectexception

The arguments specified there can be added in the JVM Arguments text box in the batch run GUI.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement