Package presage

Examples of presage.PresageConfig


    this.setGenome(genome);
  }

  public void run() throws InterruptedException
  {
    PresageConfig presageConfig = new PresageConfig();
    presageConfig.setComment(comment);
    presageConfig.setIterations(iterations);
    presageConfig.setRandomSeed(randomSeed);
    presageConfig.setAutorun(true);
    presageConfig.setEnvironmentClass(Environment.class);

    EnvironmentDataModel envDataModel = new EnvironmentDataModel
        (comment, foods, groups, foodConsumedPerAdvice);
    Environment environment = new Environment
        (randomSeed, envDataModel, BasicFreeAgentGroup.class);
View Full Code Here


   */
  @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());
View Full Code Here

TOP

Related Classes of presage.PresageConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.