The job mechanism is intended to allow you to fiddle with parameters
based on job information, but you have to override a hook manually.
You can either:
- make your own main() method, or add code to the existing one and
recompile. This isn't remotely so bad as it sounds, just look at the
existing Evolve.main method and there's a spot where you can add your
code. You can tell the job number (it's an integer called, oddly,
- override EvolutionState.startFresh() in your own EvolutionState
subclass (or scribble it into EvolutionState, where startFresh() is
empty). This is my suggested hook. Here the job number will be an
Integer stored in the instance variable self.job
Either way, you can change parameters in the ParameterDatabase by
just calling state.parameters.set(new Parameter(key), value), where
key is a String representing the parameter key, and value is the
String you want to set it to. Let's say you want to change
pop.subpop.0.duplicate-retries=100 when the job number is more than
4. You might write something like:
public class MyEvolutionState extends SimpleEvolutionState /*
assuming you're using that */
public void startFresh()
int job = ((Integer)(self.job)).intValue();
if (job > 4)
... now you just change your EvolutionState parameter in your
state = this.is.my.package.MyEvolutionState
Or something like that.
On Dec 17, 2007, at 7:49 PM, [log in to unmask] wrote:
> I was wondering if it were possible to change the parameter values
> for each job. Currently I have the Job number set to 3 and was
> wondering if I could then have three different values for the max-
> gene variable, a different variable for each job?
> Thanks in advance.