Package org.jgap

Examples of org.jgap.Chromosome


    conf.setSelectFromPrevGen(1);
    conf.setPreservFittestIndividual(false);
    conf.setAlwaysCaculateFitness(false);
    conf.setKeepPopulationSizeConstant(false);
    Gene[] initialGenes = importInitialGenes(conf);
    Chromosome c = new Chromosome(conf, initialGenes);
    conf.setSampleChromosome(c);
    return conf;
  }
View Full Code Here


    });
    for (EcBuildOrder bo : history)
    {
      try
      {
        Chromosome c = buildChromosome(conf, bo);
        logger.fine(myFunc.getFitnessValue(c) + "");
        population.getPopulation().setChromosome(cindex++, c);
      }
      catch (InvalidConfigurationException e)
      {
View Full Code Here

    {
      IntegerGene g = new IntegerGene(conf, 0, requiredActions.size() - 1);
      g.setAllele(0);
      genes.add(g);
    }
    Chromosome c = new Chromosome(conf);
    c.setGenes(genes.toArray(new Gene[genes.size()]));
    c.setIsSelectedForNextGeneration(true);
    return c;
  }
View Full Code Here

    gaConf.setPreservFittestIndividual(true);

               
    GeneFactory gf = new GeneFactory(geneType, in.getSize());
   
    IChromosome sampleChromosome = new Chromosome(gaConf, gf.getInstance(gaConf),
          chromesize);
   
               
    gaConf.setSampleChromosome(sampleChromosome);
    gaConf.setPopulationSize(popsize);
View Full Code Here

TOP

Related Classes of org.jgap.Chromosome

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.