As the algorithm is written in Java, I use JNI to launch ARGoS.
Currently I am creating the Simulator at the beginning of the algorithm, then do sequential executions.
I'd like to run the simulation simulatneous, much like in the galib-example, but without a fixed set of instances.
I would be very happy with a solution, that uses a method, that can be called multible times and just instantiates a complete independent instance of ARGoS.
Currently I'm trying something of the following:
Code: Select all
double LaunchArgos(int genome[], int length) {
CSimulator &cSimulator = argos::CSimulator::GetInstance();
cSimulator.SetExperimentFileName("experiments/construction-nsga2.argos");
cSimulator.LoadExperiment();
[...]
cLoopFunctions.ConfigureFromGenome(genome, length);
cSimulator.Execute();
return cLoopFunctions.Performance()
}
Is there a way to get around this?