public synchronized void simulationInitialized(ITaskRunner simRunner,
ComputationTaskRuntimeInformation crti) {
// TODO revise repeatability/RNG system to allow repeatable
// multi-threaded execution
IProblemInstance pInstance = null;
try {
pInstance = registerProblemInstance(crti);
} catch (Exception ex) {
SimSystem.report(Level.SEVERE, null, ERR_MSG_TITLE
+ "Error while storing simulation problem.", null, ex);
}
if (pInstance != null) {
// TODO this late setting of the seed does not work with randomly created
// models (see above)
SimSystem.getRNGGenerator().setSeed(pInstance.getRandomSeed());
SimSystem.getRNGGenerator().setRNGFactory(
new ParameterizedFactory<RandomGeneratorFactory>(new ParameterBlock(
pInstance.getRNGFactoryName())));
recordedProblemInstances.put(crti.getRunInformation().getExecutionIDs(),
pInstance);
}
}