def run_algorithm(self): try: max_gen = int(self.max_gen.text()) algorithm = HillClimbing(max_gen) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:' + str(error))
def run_algorithm(self): try: max_gen = int(self.max_gen.text()) pop_size = int(self.pop_size.text()) num_children = int(self.num_children.text()) algorithm = EvolutionStrat(max_gen, pop_size, num_children) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:' + str(error))
def run_algorithm(self): try: max_gen = int(self.max_gen.text()) pop_size = int(self.pop_size.text()) clone_f = float(self.clone_f.text()) num_rand = int(self.num_rand.text()) algorithm = ClonalSelection(max_gen, pop_size, clone_f, num_rand) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:' + str(error))
def run_algorithm(self): try: max_gen = int(self.max_gen.text()) pop_size = int(self.pop_size.text()) weight_f = float(self.weight_f.text()) cross_r = float(self.cross_r.text()) algorithm = DiffEvolution(max_gen, pop_size, weight_f, cross_r) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:'+str(error))
def run_algorithm(self): try: pop_size = int(self.pop_size.text()) best_p = int(self.best_pop.text()) max_gen = int(self.max_gen.text()) p_m = float(self.p_m.text()) algorithm = Genetic(pop_size, best_p, max_gen, p_m) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:'+str(error))
def run_algorithm(self): try: max_gen = int(self.max_gen.text()) mem_size = int(self.mem_size.text()) consid_r = float(self.consid_r.text()) adjust_r = float(self.adjust_r.text()) rang = float(self.rang.text()) algorithm = Harmony(max_gen, mem_size, consid_r, adjust_r, rang) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:' + str(error))
def run_algorithm(self): try: max_gen = int(self.max_gen.text()) num_samples = int(self.num_samples.text()) num_update = int(self.num_update.text()) learning_r = float(self.learning_r.text()) algorithm = CrossEntropy(max_gen, num_samples, num_update, learning_r) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:' + str(error))
def run_algorithm(self): try: max_gen = int(self.max_gen.text()) pop_size = int(self.pop_size.text()) num_clones = int(self.num_clones.text()) beta = int(self.beta.text()) num_rand = int(self.num_rand.text()) algorithm = ImmuneNetwork(max_gen, pop_size, num_clones, beta, num_rand) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:' + str(error))
def run_algorithm(self): try: max_gen = int(self.max_gen.text()) pop_size = int(self.pop_size.text()) p_cross = float(self.p_cross.text()) max_local_gens = int(self.max_local_gens.text()) p_mut = float(self.p_mut.text()) p_local = float(self.p_local.text()) algorithm = Memetic(max_gen, pop_size, p_cross, p_mut, max_local_gens, p_local) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:' + str(error))
def run_algorithm(self): try: max_gen = int(self.max_gen.text()) init_f = float(self.init_f.text()) s_factor = float(self.s_factor.text()) l_factor = float(self.l_factor.text()) iter_mult = int(self.iter_mult.text()) max_no_impr = int(self.max_no_impr.text()) algorithm = AdaptativeRandomS(max_gen, init_f, s_factor, l_factor, iter_mult, max_no_impr) val, t_time = Runner.run_algorithm(algorithm, self.title) self.print_results(val, t_time) except ValueError as error: QMessageBox.warning(self, 'Value error', 'Invalid input:' + str(error))