repast-simphony

Why can't Repast Simphony find model output in batch run?


I'm attempting to conduct a batch run of a model through the Simphony GUI. I have text sink with relative path "./Test_Data_FileSink" created in my scenario tree. This file is created and saved with single runs through the GUI. However, when I conduct a batch run, no file is created within the localhost instance. When I navigate to the instance, I see a debug.log, FAILURE_null, instance.log, and param_input.txt, but no Test_Data_FileSink file. The batch process attempts to compile the data across instances and returns an empty batch_param_map.txt and Test_Data_FileSink.txt within the designated output location.

Warning message is displayed through Batch Run Configuration Window below:

'WARN [SwingWorker-pool-2-thread-1] 12:15:28,906 repast.simphony.batch.ssh.OutputFinder - No model output found matching glob:{**\,}Test_Data_FileSink_ModelOutput*.txt in C:\Users\user\AppData\Local\Temp\simphony_model_1582046063159\instance_1'

There is an additional error in the batch run console log where the model might be looking for the UI.

repast.simphony.batch.InstanceRunner - Error while running model java.lang.NoClassDefFoundError: repast/simphony/ui/RSApplication

The GUI UI does allow for parameter input, but I can't see where the model depends on it to run if the parameters are already set. I've attempted to insert some conditional statements around setting the UI

if (!RunEnvironment.getInstance().isBatch()) {
 // do your GUI specific elements here
}

This breaks initialization of Simphony if I don't allow the UI to be rendered and doesn't seem to have much effect in the locations I've found it to work.

What else should I be trying?


Solution

  • The SpecialEffects class in the GeoZombies model references the RSApplication class which isn't available in the batch classpath, and it's not needed in batch anyway since all it does is provide some visual and sound effects, it can be removed from the model.

    1. Delete the SpecialEffects class
    2. In ContextCreator delete the static call to SpecialEffects.setUIEffects();
    3. In Human agent, delete the call to SpecialEffects.getInstance().playEnragedZombies();
    4. In Zombie agent, delete calls to SpecialEffects.getInstance()...