:mod:`ocelot.cpbd.moga` ======================= .. py:module:: ocelot.cpbd.moga Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: ocelot.cpbd.moga.Moga .. data:: MPI_COMM .. py:class:: Moga(bounds, weights=(-1.0, -1.0)) .. method:: set_params(self, n_pop=None, weights=None, elite=None, penalty=None, n_gen=None, seed=None, log_print=None, log_file=False, plt_file=False) .. method:: generate_ind(self) .. method:: init_deap_functions(self) .. method:: feasible(self) .. method:: optimize(self, init_pop) .. method:: init_pop(self, init_pop) .. method:: eval_pop(self, pop) .. method:: get_good_inds(self, pop) .. method:: get_nondominated_inds(self, pop) .. method:: get_best_inds(self, pop) .. method:: apply_preselect(self, pop) .. method:: apply_select(self, pop, offspring) .. method:: apply_crossover(self, pop) .. method:: apply_mutation(self, pop) .. method:: replace_rand_by_good_inds(self, pop, good_inds, num=None) .. method:: replace_bad_by_rand_inds(self, pop) .. method:: replace_bad_by_good_inds(self, pop, good_pop) .. method:: replace_rand_by_new_inds(self, pop, num) .. method:: nsga2(self, fit_func, fit_func_args=[], init_pop=None, cxpb=0.95, mutpb=0.95)