*/
@SuppressWarnings("OverridableMethodCallInConstructor")
public GenericSimulation(String comment, int iterations, long randomSeed,
double foodConsumedPerAdvice, String suffix)
{
PresageConfig presageConfig = new PresageConfig();
this.comment = comment;
this.randomSeed = randomSeed;
presageConfig.setComment(comment);
presageConfig.setIterations(iterations);
presageConfig.setRandomSeed(randomSeed);
presageConfig.setThreadDelay(1);
presageConfig.setAutorun(false);
presageConfig.setEnvironmentClass(Environment.class);
File rootFile = new File(System.getProperty("user.dir"));
// Path configuarations
File path = new File(rootFile,
"simulations/" + this.getClass().getSimpleName() + suffix);
configPath = path.getAbsolutePath();
presageConfig.setPluginsConfigPath(configPath + "/plugins.xml");
presageConfig.setEventscriptConfigPath(configPath + "/methods.xml");
presageConfig.setParticipantsConfigPath(configPath + "/participants.xml");
presageConfig.setEnvironmentConfigPath(configPath + "/environment.xml");
EnvironmentDataModel dm = new EnvironmentDataModel(comment, foods, groups,
foodConsumedPerAdvice);
Environment e = new Environment(randomSeed, dm,
chooseFreeAgentHandler());