| 127 | } |
| 128 | |
| 129 | int main() |
| 130 | { |
| 131 | EA::Chronometer timer; |
| 132 | timer.tic(); |
| 133 | |
| 134 | GA_Type ga_obj; |
| 135 | ga_obj.problem_mode= EA::GA_MODE::NSGA_III; |
| 136 | ga_obj.multi_threading=true; |
| 137 | ga_obj.idle_delay_us=1; // switch between threads quickly |
| 138 | ga_obj.verbose=false; |
| 139 | ga_obj.population=40; |
| 140 | ga_obj.generation_max=100; |
| 141 | ga_obj.calculate_MO_objectives= calculate_MO_objectives; |
| 142 | ga_obj.init_genes=init_genes; |
| 143 | ga_obj.eval_solution=eval_solution; |
| 144 | ga_obj.mutate=mutate; |
| 145 | ga_obj.crossover=crossover; |
| 146 | ga_obj.MO_report_generation=MO_report_generation; |
| 147 | ga_obj.crossover_fraction=0.7; |
| 148 | ga_obj.mutation_rate=0.4; |
| 149 | ga_obj.solve(); |
| 150 | |
| 151 | std::cout<<"The problem is optimized in "<<timer.toc()<<" seconds."<<std::endl; |
| 152 | |
| 153 | save_results(ga_obj); |
| 154 | return 0; |
| 155 | } |
nothing calls this directly
no test coverage detected