@Test (expected = Output.OutputExitException.class) public void testSetup2() { state.parameters.set(BASE.push(SimpleBreeder.P_SEQUENTIAL_BREEDING), "true"); final NSGA2Breeder instance = new NSGA2Breeder(); instance.setup(state, BASE); }
public void setup(final EvolutionState state, final Parameter base) { super.setup(state, base); for (int i = 0; i < elite.length; i++) if (usingElitism(i)) state.output.warning("You're using elitism with " + this.getClass().getSimpleName() + ", which is not permitted and will be ignored. However the '" + P_REEVALUATE_ELITES + "' parameter *will* be recognized.", base.push(P_ELITE).push(""+i)); if (sequentialBreeding) state.output.fatal(this.getClass().getSimpleName() + "does not support sequential evaluation.", base.push(P_SEQUENTIAL_BREEDING)); if (!clonePipelineAndPopulation) state.output.fatal(P_CLONE_PIPELINE_AND_POPULATION + " must be true for " + this.getClass().getSimpleName()); breedingState = BreedingState.BREEDING_COMPLETE; }
NSGA2Breeder extends SimpleBreeder { public void setup(final EvolutionState state, final Parameter base) { super.setup(state, base); for (int i = 0; i < elite.length; i++) if (usingElitism(i)) state.output.warning("You're using elitism with " + this.getClass().getSimpleName() + ", which is not permitted and will be ignored. However the '" + P_REEVALUATE_ELITES + "' parameter *will* be recognized.", base.push(P_ELITE).push(""+i)); if (sequentialBreeding) state.output.fatal(this.getClass().getSimpleName() + "does not support sequential evaluation.", base.push(P_SEQUENTIAL_BREEDING)); if (!clonePipelineAndPopulation) state.output.fatal(P_CLONE_PIPELINE_AND_POPULATION + " must be true for " + this.getClass().getSimpleName()); breedingState = BreedingState.BREEDING_COMPLETE; } }
NSGA2Breeder extends SimpleBreeder { public void setup(final EvolutionState state, final Parameter base) { super.setup(state, base); for (int i = 0; i < elite.length; i++) if (usingElitism(i)) state.output.warning("You're using elitism with " + this.getClass().getSimpleName() + ", which is not permitted and will be ignored. However the '" + P_REEVALUATE_ELITES + "' parameter *will* be recognized.", base.push(P_ELITE).push(""+i)); if (sequentialBreeding) state.output.fatal(this.getClass().getSimpleName() + "does not support sequential evaluation.", base.push(P_SEQUENTIAL_BREEDING)); if (!clonePipelineAndPopulation) state.output.fatal(P_CLONE_PIPELINE_AND_POPULATION + " must be true for " + this.getClass().getSimpleName()); breedingState = BreedingState.BREEDING_COMPLETE; }  }
NSGA2Breeder extends SimpleBreeder { public void setup(final EvolutionState state, final Parameter base) { super.setup(state, base); for (int i = 0; i < elite.length; i++) if (usingElitism(i)) state.output.warning("You're using elitism with " + this.getClass().getSimpleName() + ", which is not permitted and will be ignored. However the '" + P_REEVALUATE_ELITES + "' parameter *will* be recognized.", base.push(P_ELITE).push(""+i)); if (sequentialBreeding) state.output.fatal(this.getClass().getSimpleName() + "does not support sequential evaluation.", base.push(P_SEQUENTIAL_BREEDING)); if (!clonePipelineAndPopulation) state.output.fatal(P_CLONE_PIPELINE_AND_POPULATION + " must be true for " + this.getClass().getSimpleName()); breedingState = BreedingState.BREEDING_COMPLETE; }  void setup(final EvolutionState state, final Parameter base); @Override int numElites(EvolutionState state, int subpopulation); @Override void postProcess(EvolutionState state); Population breedPopulation(EvolutionState state); ArrayList<Individual> buildArchive(final EvolutionState state, int subpop); ArrayList<ArrayList<Individual>> assignFrontRanks(Subpopulation subpop); }
NSGA2Breeder extends SimpleBreeder { public void setup(final EvolutionState state, final Parameter base) { super.setup(state, base); for (int i = 0; i < elite.length; i++) if (usingElitism(i)) state.output.warning("You're using elitism with " + this.getClass().getSimpleName() + ", which is not permitted and will be ignored. However the '" + P_REEVALUATE_ELITES + "' parameter *will* be recognized.", base.push(P_ELITE).push(""+i)); if (sequentialBreeding) state.output.fatal(this.getClass().getSimpleName() + "does not support sequential evaluation.", base.push(P_SEQUENTIAL_BREEDING)); if (!clonePipelineAndPopulation) state.output.fatal(P_CLONE_PIPELINE_AND_POPULATION + " must be true for " + this.getClass().getSimpleName()); breedingState = BreedingState.BREEDING_COMPLETE; }  void setup(final EvolutionState state, final Parameter base); @Override int numElites(EvolutionState state, int subpopulation); @Override void postProcess(EvolutionState state); Population breedPopulation(EvolutionState state); ArrayList<Individual> buildArchive(final EvolutionState state, int subpop); ArrayList<ArrayList<Individual>> assignFrontRanks(Subpopulation subpop);  }