/* Nond-domination based selection routines */ # include <stdio.h> # include <stdlib.h> # include <math.h> # include "global.h" # include "rand.h" /* Routine to perform non-dominated sorting */ void fill_nondominated_…
NSGA(非支配排序遗传算法).NSGA-II(带精英策略的快速非支配排序遗传算法),都是基于遗传算法的多目标优化算法,是基于pareto最优解讨论的多目标优化. 在官网: http://www.iitk.ac.in/kangal/codes.shtml 可以下载到  NSGA-II  的C语言版源码,下载最新版后打开如下: 其中,nsga2r.c  为主文件,打开后找到核心代码,如下: ; i<=ngen; i++) { selection (parent_pop, child_pop); m…
遗传算法中的交叉操作是 对NSGA-II  源码分析的  最后一部分, 这一部分也是我 从读该算法源代码和看该算法论文理解偏差最大的  函数模块. 这里,首先提一下,遗传算法的  交叉操作.变异操作都是需要设定概率的, 即交叉概率和变异概率. 假设种群个体 大小为  popsize ,  那么交叉操作需要进行 popsize/2 次 ,   变异操作需要进行 popsize 次, 其中每次操作的时候都需要随机生成一个随机数来与给定的概率进行判断,若小于给定的概率则继续执行否则退出该操作. 如果继…
/* Test problem definitions */ # include <stdio.h> # include <stdlib.h> # include <math.h> # include "global.h" # include "rand.h" # define sch1 /* # define sch2 */ /* # define fon */ /* # define kur */ /* # define po…
/* Routines for storing population data into files */ # include <stdio.h> # include <stdlib.h> # include <math.h> # include "global.h" # include "rand.h" /* Function to print the information of a population in a file…
/* Crowding distance computation routines */ # include <stdio.h> # include <stdlib.h> # include <math.h> # include "global.h" # include "rand.h" /* Routine to compute crowding distance based on ojbective function valu…
This is the Readme file for NSGA-II code. About the Algorithm--------------------------------------------------------------------------NSGA-II: Non-dominated Sorting Genetic Algorithm - II Please refer to the following paper for details about the alg…
遗传算法的变异操作 /* Mutation routines */ # include <stdio.h> # include <stdlib.h> # include <math.h> # include "global.h" # include "rand.h" /* Function to perform mutation in a population */ void mutation_pop (population *p…
/* Domination checking routines */ # include <stdio.h> # include <stdlib.h> # include <math.h> # include "global.h" # include "rand.h" /* Routine for usual non-domination checking It will return the following values 1…
tourselect.c  文件中共有两个函数: selection (population *old_pop, population *new_pop) individual* tournament (individual *ind1, individual *ind2) 首先,第一个函数代码如下: /* Routine for tournament selection, it creates a new_pop from old_pop by performing tournament se…