public GeneticAlgorithm newInstance(GeneString[] initial, GeneticInstanceParameters parameters) { if (!(parameters is RandomRestartInstanceParameters)) throw new WrongParameterTypeException("A Random Restart Genetics instance can only be constructed using Random Restart Genetics Instance Parameters"); RandomRestartInstanceParameters rrParameters = (RandomRestartInstanceParameters)parameters; return new RandomRestartGenetics(initial, rrParameters); }
public GeneticAlgorithm newInstance(GeneString[] initial, GeneticInstanceParameters parameters) { if (!(parameters is FuzzyGeneticsInstanceParameters)) throw new WrongParameterTypeException("Fuzzy Genetics only accepts Fuzzy Genetics Instance Parameters"); FuzzyGeneticsInstanceParameters fuzzyParameters = (FuzzyGeneticsInstanceParameters)parameters; return new FuzzyGenetics(initial, fuzzyParameters); }
public RandomRestartRunParameters(GeneticAlgorithm algorithm, GeneticInstanceParameters algorithmInstanceParameters, GeneticRunParameters algorithmRunParameters, int promilleGoalDecreasePerRound, int numRepeatsBeforeRestart, bool verbose) { this.algorithm = algorithm; this.algorithmInstanceParameters = algorithmInstanceParameters; this.algorithmRunParameters = algorithmRunParameters; this.promilleGoalDecreasePerRound = promilleGoalDecreasePerRound; this.numRepeatsBeforeRestart = numRepeatsBeforeRestart; this.verbose = verbose; }
public FuzzyGeneticsRunParameters(GeneticAlgorithm algorithm, GeneticInstanceParameters algorithmInstanceParameters, GeneticRunParameters algorithmRunParameters, int numberToAverageScoreOver, int waitSinceLastImprovement, bool verbose) { this.algorithm = algorithm; this.algorithmInstanceParameters = algorithmInstanceParameters; this.algorithmRunParameters = algorithmRunParameters; this.numberToAverageScoreOver = numberToAverageScoreOver; this.waitSinceLastImprovement = waitSinceLastImprovement; this.verbose = verbose; }
public GeneticAlgorithm newInstance(GeneString[] initial, GeneticInstanceParameters parameters) { if (!(parameters is BasicGeneticInstanceParameters)) throw new WrongParameterTypeException("A Basic Genetics instance can only be constructed using Basic Genetics Instance Parameters"); BasicGeneticInstanceParameters bParameters = (BasicGeneticInstanceParameters)parameters; return new BasicGenetics(initial, bParameters); }
public GeneticAlgorithm newInstance(GeneticInstanceParameters parameters) { return newInstance(null, parameters); }