1 10 package examples.grid.fitnessDistributed; 11 12 import org.jgap.*; 13 import org.jgap.distr.grid.*; 14 15 22 public class MyWorkerReturnStrategy 23 implements IWorkerReturnStrategy { 24 25 private final static String CVS_REVISION = "$Revision: 1.1 $"; 26 27 38 public JGAPResult assembleResult(JGAPRequest a_req, Genotype a_genotype) 39 throws Exception { 40 IChromosome chrom = a_req.getPopulation().getChromosome(0); 41 chrom.getFitnessValue(); 44 Population pop = new Population(a_req.getConfiguration(), chrom); 45 MyResult result = new MyResult(a_req.getSessionName(), a_req.getRID(), 46 pop, 1); 47 return result; 48 } 49 } 50 | Popular Tags |