examples.grid.fitnessDistributed
Class ClientEvolveStrategy
java.lang.Object
examples.grid.fitnessDistributed.ClientEvolveStrategy
- All Implemented Interfaces:
- java.io.Serializable, IClientEvolveStrategy
public class ClientEvolveStrategy
- extends java.lang.Object
- implements IClientEvolveStrategy
Sample implementation of a strategy for evolving a generation on the client.
- Since:
- 3.2
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
CVS_REVISION
String containing the CVS revision. |
Constructor Summary |
ClientEvolveStrategy()
Default constructor is necessary here as it will be called dynamically! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CVS_REVISION
public static final java.lang.String CVS_REVISION
- String containing the CVS revision. Read out via reflection!
- See Also:
- Constant Field Values
ClientEvolveStrategy
public ClientEvolveStrategy()
- Default constructor is necessary here as it will be called dynamically!
Don't declare any other constructor as it will not be called!
initialize
public void initialize(GridClient a_gc,
Configuration a_config,
IClientFeedback a_clientFeedback)
throws java.lang.Exception
- Called at the very beginning and only once before distributed evolution
starts.
- Specified by:
initialize
in interface IClientEvolveStrategy
- Parameters:
a_gc
- GridClienta_config
- Configurationa_clientFeedback
- IClientFeedback
- Throws:
java.lang.Exception
- Since:
- 3.2
afterWorkRequestsSent
public void afterWorkRequestsSent()
throws java.lang.Exception
- Specified by:
afterWorkRequestsSent
in interface IClientEvolveStrategy
- Throws:
java.lang.Exception
isEvolutionFinished
public boolean isEvolutionFinished(int a_evolutionsDone)
- Specified by:
isEvolutionFinished
in interface IClientEvolveStrategy
onFinished
public void onFinished()
- Specified by:
onFinished
in interface IClientEvolveStrategy
evolve
public void evolve()
throws java.lang.Exception
- Specified by:
evolve
in interface IClientEvolveStrategy
- Throws:
java.lang.Exception
generateWorkRequests
public JGAPRequest[] generateWorkRequests(JGAPRequest m_workReq,
IRequestSplitStrategy m_splitStrategy,
java.lang.Object data)
throws java.lang.Exception
- Specified by:
generateWorkRequests
in interface IClientEvolveStrategy
- Throws:
java.lang.Exception
resultReceived
public void resultReceived(JGAPResult a_result)
throws java.lang.Exception
- Specified by:
resultReceived
in interface IClientEvolveStrategy
- Throws:
java.lang.Exception