JGAP

examples.grid.evolutionDistributed
Class MyRequestSplitStrategy

java.lang.Object
  extended by examples.grid.evolutionDistributed.MyRequestSplitStrategy
All Implemented Interfaces:
java.io.Serializable, IRequestSplitStrategy

public class MyRequestSplitStrategy
extends java.lang.Object
implements IRequestSplitStrategy

Sample implementation of IRequestSplitStrategy to split a single request into multiple requests for workers.

Since:
3.2
See Also:
Serialized Form

Constructor Summary
MyRequestSplitStrategy(Configuration a_config)
           
 
Method Summary
 Configuration getConfiguration()
           
 JGAPRequest[] split(JGAPRequest a_request)
          Creates single requests to be sent to workers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyRequestSplitStrategy

public MyRequestSplitStrategy(Configuration a_config)
Method Detail

getConfiguration

public Configuration getConfiguration()

split

public JGAPRequest[] split(JGAPRequest a_request)
                    throws java.lang.Exception
Creates single requests to be sent to workers. Here, each request consists of a number of chromosome from the original population (determined here) plus the rest of the chromosomes to be initialized randomly at each worker.

Specified by:
split in interface IRequestSplitStrategy
Parameters:
a_request - the request to split
Returns:
single requests to be computed by workers
Throws:
java.lang.Exception
Since:
3.2

JGAP