1 10 package org.jgap.distr.grid; 11 12 import org.jgap.*; 13 14 20 public class DefaultWorkerReturnStrategy 21 implements IWorkerReturnStrategy { 22 23 private final static String CVS_REVISION = "$Revision: 1.1 $"; 24 25 35 public JGAPResult assembleResult(JGAPRequest a_req, Genotype a_genotype) { 36 try { 37 IChromosome fittest = a_genotype.getFittestChromosome(); 38 Population pop = new Population(a_req.getConfiguration(), fittest); 39 JGAPResult result = new JGAPResult(a_req.getSessionName(), a_req.getRID(), 40 pop, 1); 41 return result; 42 } catch (Throwable t) { 43 throw new RuntimeException (t); 44 } 45 } 46 } 47 | Popular Tags |