org.jgap.distr.grid
Class JGAPRequest
- java.lang.Object
-
- org.homedns.dade.jcgrid.WorkRequest
-
- org.jgap.distr.grid.JGAPRequest
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, ICloneable
public class JGAPRequest extends org.homedns.dade.jcgrid.WorkRequest implements ICloneable
An instance that creates single requests to be sent to a worker.- Since:
- 3.1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description JGAPRequest(java.lang.String a_name, int a_id, Configuration a_config)Constructor.JGAPRequest(java.lang.String a_name, int a_id, Configuration a_config, IWorkerEvolveStrategy a_strategy)Constructor.JGAPRequest(java.lang.String a_name, int a_id, Configuration a_config, Population a_pop)Constructor.JGAPRequest(java.lang.String a_name, int a_id, Configuration a_config, Population a_pop, IWorkerEvolveStrategy a_strategy)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Objectclone()ConfigurationgetConfiguration()IGenotypeInitializergetGenotypeInitializer()PopulationgetPopulation()IWorkerEvolveStrategygetWorkerEvolveStrategy()org.homedns.dade.jcgrid.worker.GridWorkerFeedbackgetWorkerFeedback()IWorkerReturnStrategygetWorkerReturnStrategy()JGAPRequestnewInstance(java.lang.String a_name, int a_ID)Creates a new instance using the given name and ID.voidsetConfiguration(Configuration a_conf)Set a modified configuration.voidsetEvolveStrategy(IWorkerEvolveStrategy a_evolveStrategy)Sets the strategy to use for executing the evolution with a worker for a single request.voidsetGenotypeInitializer(IGenotypeInitializer a_initializer)voidsetPopulation(Population a_pop)Sets the Population to store in this request so that it can be passed to workers.voidsetWorkerFeedback(org.homedns.dade.jcgrid.worker.GridWorkerFeedback a_feedback)voidsetWorkerReturnStrategy(IWorkerReturnStrategy a_strategy)
-
-
-
Constructor Detail
-
JGAPRequest
public JGAPRequest(java.lang.String a_name, int a_id, Configuration a_config, IWorkerEvolveStrategy a_strategy)Constructor.- Parameters:
a_name- Stringa_id- inta_config- Configurationa_strategy- the strategy to choose for evolution- Since:
- 3.1
-
JGAPRequest
public JGAPRequest(java.lang.String a_name, int a_id, Configuration a_config)Constructor.- Parameters:
a_name- session namea_id- request ida_config- Configuration- Since:
- 3.1
-
JGAPRequest
public JGAPRequest(java.lang.String a_name, int a_id, Configuration a_config, Population a_pop, IWorkerEvolveStrategy a_strategy)Constructor. Allows to specify a preset population with which the genotype will be initialized.- Parameters:
a_name- session namea_id- request ida_config- Configurationa_pop- Populationa_strategy- the strategy to choose for evolution- Since:
- 3.2
-
JGAPRequest
public JGAPRequest(java.lang.String a_name, int a_id, Configuration a_config, Population a_pop)Constructor. Allows to specify a preset population with which the genotype will be initialized.- Parameters:
a_name- session namea_id- request ida_config- Configurationa_pop- Population- Since:
- 3.2
-
-
Method Detail
-
setEvolveStrategy
public void setEvolveStrategy(IWorkerEvolveStrategy a_evolveStrategy)
Sets the strategy to use for executing the evolution with a worker for a single request.- Parameters:
a_evolveStrategy- the evolve strategy to use- Since:
- 3.2
-
getWorkerEvolveStrategy
public IWorkerEvolveStrategy getWorkerEvolveStrategy()
- Returns:
- the evolve strategy set
- Since:
- 3.2
-
setWorkerReturnStrategy
public void setWorkerReturnStrategy(IWorkerReturnStrategy a_strategy)
-
getWorkerReturnStrategy
public IWorkerReturnStrategy getWorkerReturnStrategy()
- Returns:
- the strategy which part of a result is returned by a worker
- Since:
- 3.2
-
getWorkerFeedback
public org.homedns.dade.jcgrid.worker.GridWorkerFeedback getWorkerFeedback()
-
setWorkerFeedback
public void setWorkerFeedback(org.homedns.dade.jcgrid.worker.GridWorkerFeedback a_feedback)
-
setGenotypeInitializer
public void setGenotypeInitializer(IGenotypeInitializer a_initializer)
- Parameters:
a_initializer- the IGenotypeInitializer to use- Since:
- 3.2
-
getGenotypeInitializer
public IGenotypeInitializer getGenotypeInitializer()
- Returns:
- the IGenotypeInitializer set
- Since:
- 3.2
-
setPopulation
public void setPopulation(Population a_pop)
Sets the Population to store in this request so that it can be passed to workers.- Parameters:
a_pop- the Population to store- Since:
- 3.2
-
getConfiguration
public Configuration getConfiguration()
- Returns:
- the configuration set
- Since:
- 3.1
-
setConfiguration
public void setConfiguration(Configuration a_conf)
Set a modified configuration. Should only be used to re-set a configuration because some parts have not been serialized.- Parameters:
a_conf- the Configuration to set- Since:
- 3.2
-
getPopulation
public Population getPopulation()
- Returns:
- the population used to initialize new requests. May be null or empty
- Since:
- 3.2
-
clone
public java.lang.Object clone()
- Specified by:
clonein interfaceICloneable- Overrides:
clonein classjava.lang.Object- Returns:
- deep clone of current instance
- Since:
- 3.2
-
newInstance
public JGAPRequest newInstance(java.lang.String a_name, int a_ID)
Creates a new instance using the given name and ID. Reason for this method: ID cannot be set other than with construction!- Parameters:
a_name- the name to seta_ID- unique ID to set- Returns:
- newly created JGAPRequest object
- Since:
- 3.2
-
-
DMelt 3.0 © DataMelt by jWork.ORG