01: /*
02: * This file is part of JGAP.
03: *
04: * JGAP offers a dual license model containing the LGPL as well as the MPL.
05: *
06: * For licencing information please see the file license.txt included with JGAP
07: * or have a look at the top of class org.jgap.Chromosome which representatively
08: * includes the JGAP license policy applicable for any file delivered with JGAP.
09: */
10: package examples.grid.mathProblemDistributed;
11:
12: import org.homedns.dade.jcgrid.*;
13: import org.jgap.*;
14: import org.jgap.distr.grid.gp.*;
15:
16: /**
17: * Receives work, computes a solution and returns the solution to the requester.
18: * This is done by solely using the JGAP standard mechanism of the super class,
19: * JGAPWorker. You could do differently, see other examples provided with JGAP.
20: *
21: * @author Klaus Meffert
22: * @since 3.2
23: */
24: public class MyGAWorker extends JGAPWorkerGP {
25: /** String containing the CVS revision. Read out via reflection!*/
26: private final static String CVS_REVISION = "$Revision: 1.2 $";
27:
28: /**
29: * Executes the evolution and returns the result.
30: *
31: * @param a_work WorkRequest
32: * @param a_workDir String
33: * @return WorkResult
34: * @throws Exception
35: *
36: * @author Klaus Meffert
37: * @since 3.2
38: */
39: public WorkResult doWork(WorkRequest a_work, String a_workDir)
40: throws Exception {
41: // Doing the evolution as always just means:
42: // -----------------------------------------
43: return super.doWork(a_work, a_workDir);
44: }
45:
46: }
|