those programs run only a single step of the while loop, choosing only a single configuration, so that is not really what I desired.
Or maybe you just wanted to show Destroy function. I was aware of it but it did not seem to accomplish destroying the previous initialisation.
Some time ago I used the code :
static argos::CSimulator &cSim = argos::CSimulator::GetInstance();
static SomeLoopFunctions &cLoopFunctions = dynamic_cast<SomeLoopFunctions &>(cSimulator.GetLoopFunctions());
cSim.Destroy();
static argos::CSimulator &cSim2 = argos::CSimulator::GetInstance();
cSim2.SetExperimentFileName(filename);
/* Load it to configure ARGoS */
cSim2.LoadExperiment();
but then that gave me errors about controllers being duplicated:
"Controller id \"" << strId << "\" duplicated"
Just wondering if that, or a similar strategy, could work.