亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? nsga2.c

?? 在c語言中實現的多目標優化
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* This is a Multi-Objective GA program.***********************************************************************  This program is the implementation of the NSGA-2 proposed by      **                                                                    **  Prof. Kalyanmoy Deb and his students .                            **                                                                    **  copyright Kalyanmoy Deb**********************************************************************The user have to give the input manualy or through a data file.The user needs to enter objective functions in func-con.hThe code can also take care of the constraints. Enter the constraintsin the space provided in the func-con.h file.Constraints must be of the following type:g(x) >= 0.0Also normalize all constraints (see the example problem in func-con.h)If your program asks you to increase the values of some parameters in theprogram come to main program and accordingly changed the values which aredefined against #define ...The program generates few output files. These are described as1.output.out*           This file has the detailed record for all the variables,*           the fitness values, constraint values, overall constraint            violation (penalty)  and their ranks for all the members*           of old population in the left hand side of the |**|*           and of new population in the right hand side.2.all_fitness.out*         This file prints the record of all the fitness values for*         different individual of new popultion created at all*         generations.3.g_rank_record.out*        This file maintains the record of individuals in global pop-*        -ulation at different ranks for all the generations.4.ranks.out*         This file prints the number of individual at different ranks*          in old and new population and finds rank ratios5.final_fitness.out*                 This file has the fitness value of all feasible and                  non-dominated individuals at the final generation6.final_var.out*                 This file has the all the variables of the feasible                  and non-dominated individuals at the final generation.                  The i-th solutions here corresponds to the i-th solution                  in the final_fitness.out file. 7.plot.out        This file contains gnuplot-based file for plotting                  the non-dominated feasible solutions obtained by the code.**************************************************************************         This is recommended to delete or rename all the *.out files*         obtained from the previous runs as some files are opened in*         append mode so they give false resemblence of data if the*         user is not carefulCompilation procedure:  gcc nsga2.c -lmRun ./a.out with or without an input fileInput data files: Three files are included, but at one time one is neededdepending on the type of variables used:inp-r (template file input-real)  : All variables are real-codedinp-b (template file input-binary): All variables are binary-codedinp-rb(template file input-rl+bin): Some variables are real and some are binary  */#include <stdio.h>#include <stdlib.h>#include <math.h>#define square(x) ((x)*(x))#define maxpop   500  /*Max population */#define maxchrom 200  /*Max chromosome length*/#define maxvar    20  /*Max no. of variables*/#define maxfun    10  /*Max no. of functions */#define maxcons   20  /*Max no. of Constraints*/int gener,       /*No of generations*/  nvar,nchrom,          /*No of variables*/  ncons,         /*No of Constraints*/  vlen[maxvar],  /*Array to store no of bits for each variable*/  nmut,          /* No of Mutations */  ncross,        /*No of crossovers*/  ans;float seed,      /*Random Seed*/  pcross,        /*Cross-over Probability*/  pmut_b, pmut_r,          /*Mutation Probability*/  lim_b[maxvar][2], lim_r[maxvar][2];/*Limits of variable in array*/float di,        /*Distribution Index for the Cross-over*/  dim,           /*Distribution Index for the Mutation*/  delta_fit,     /* variables required forfitness for fitness sharing */  min_fit,  front_ratio;int optype,      /*Cross-over type*/  nfunc,         /*No of functions*/  sharespace;    /*Sharing space (either parameter or fitness)*/double coef[maxvar]; /*Variable used for decoding*/static int popsize,  /*Population Size*/  chrom;             /*Chromosome size*/typedef struct       /*individual properties*/{  int genes[maxchrom], /*bianry chromosome*/    rank,              /*Rank of the individual*/    flag;              /*Flag for ranking*/  float xreal[maxvar], /*list of real variables*/    xbin[maxvar];      /*list of decoded value of the chromosome */  float fitness[maxfun],/*Fitness values */    constr[maxcons],     /*Constraints values*/    cub_len,             /*crowding distance of the individual*/    error;              /* overall constraint violation for the individual*/}individual;        /*Structure defining individual*/typedef struct{  int maxrank;            /*Maximum rank present in the population*/  float rankrat[maxpop];  /*Rank Ratio*/  int rankno[maxpop];     /*Individual at different ranks*/  individual ind[maxpop], /*Different Individuals*/    *ind_ptr; }population ;             /*Popuation Structure*/#include "random.h"       /*Random Number Generator*/#include "input.h"        /*File Takes Input from user*/#include "realinit.h"     /*Random Initialization of the populaiton*/#include "init.h"         /*Random Initialization of the population*/#include "decode.h"       /*File decoding the binary dtrings*/#include "ranking.h"      /*File Creating the Pareto Fronts*/#include "rancon.h"       /*File Creating the Pareto Fronts when			    Constraints are specified*/#include "dfit.h"         /*File Assigning Dummyfitness*/#include "func-con.h"     /*File Having the Function*/#include "select.h"       /*File for Tournament Selection*/#include "crossover.h"    /*Binary Cross-over*/#include "uniformxr.h"    /*Uniform Cross-over*/#include "realcross2.h"   /*Real Cross-over*/#include "mut.h"          /*Binary Mutation*/#include "realmut1.h"     /*Real Mutation*/#include "keepaliven.h"   /*File For Elitism and Sharing Scheme*/#include "report.h"       /*Printing the report*/population oldpop,  newpop,  matepop,  *old_pop_ptr,  *new_pop_ptr,  *mate_pop_ptr;/*Defining the population Structures*/main(){  /*Some Local variables to this Problem (Counters And some other pointers*/  int i,j,l,f,maxrank1;  float *ptr,tot;  FILE     *rep_ptr,    *gen_ptr,    *rep2_ptr,    *end_ptr,    *g_var,    *lastit;  /*File Pointers*/  rep_ptr = fopen("output.out","w");  gen_ptr =fopen("all_fitness.out","w");  rep2_ptr = fopen("ranks.out","w");  end_ptr = fopen("final_fitness.out","w");  g_var = fopen("final_var.out","w");  lastit = fopen("plot.out","w");  /*Opening the files*/  old_pop_ptr = &(oldpop);  nmut = 0;  ncross = 0;  /*Get the input from the file input.h*/  input(rep_ptr);  fprintf(rep_ptr,"Results in a file\n");  fprintf(end_ptr,"# Last generation population (Feasible and non-dominated)\n");  fprintf(end_ptr,"# Fitness_vector (first %d)  Constraint_violation (next %d)  Overall_penalty\n",nfunc,ncons);  fprintf(g_var,"#Feasible Variable_vectors for non-dominated solutions at last generation\n");  fprintf(g_var,"# Real (first %d)  Binary (next %d)\n",nvar,nchrom);  fprintf(lastit,"# Feasible and Non-dominated Objective Vector\n");  /*Initialize the random no generator*/  warmup_random(seed);   /*Binary Initializaton*/  if (nchrom > 0)    init(old_pop_ptr);    if (nvar > 0)    realinit(old_pop_ptr);    old_pop_ptr = &(oldpop);  // decode binary strings  decode(old_pop_ptr);   old_pop_ptr = &(oldpop);  new_pop_ptr = &(newpop);    for(j = 0;j < popsize;j++)    {      /*Initializing the Rank array having different individuals	at a particular  rank to zero*/       old_pop_ptr->rankno[j] = 0;       new_pop_ptr->rankno[j] = 0;    }    old_pop_ptr = &(oldpop);    func(old_pop_ptr);   /*Function Calculaiton*/    fprintf(rep_ptr,"----------------------------------------------------\n");

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
88在线观看91蜜桃国自产| 亚洲黄色av一区| 亚洲欧美国产77777| 蜜桃久久久久久久| 欧美性色aⅴ视频一区日韩精品| xf在线a精品一区二区视频网站| 亚洲一区二区欧美日韩| 成人18视频在线播放| 日韩免费一区二区三区在线播放| 亚洲欧美另类图片小说| 国产成人免费高清| 日韩欧美的一区| 日韩国产精品久久久| 色噜噜狠狠色综合中国| 国产精品免费aⅴ片在线观看| 美腿丝袜一区二区三区| 欧美三级视频在线播放| 亚洲女同ⅹxx女同tv| 99久久夜色精品国产网站| 精品国产亚洲在线| 美国十次了思思久久精品导航| 欧美日本一区二区| 亚洲成人激情自拍| 欧美三级日韩在线| 亚洲国产成人porn| 欧美综合一区二区三区| 亚洲一区二区精品视频| 欧美日韩精品一区二区三区蜜桃 | 日本欧美在线看| 欧美日韩精品三区| 香蕉影视欧美成人| 欧美日韩你懂的| 日本视频在线一区| 日韩午夜激情av| 国内精品久久久久影院色| 日韩三级视频在线观看| 麻豆91精品91久久久的内涵| 日韩女优av电影在线观看| 韩国理伦片一区二区三区在线播放| 精品成人私密视频| 成人一区二区三区视频 | 久久奇米777| 国产成人自拍在线| 国产精品久久久久久久久果冻传媒 | 精品88久久久久88久久久| 韩国v欧美v日本v亚洲v| 国产精品无码永久免费888| 一本一道久久a久久精品| 亚洲电影一级黄| 日韩精品一区二区三区视频在线观看| 久久精品理论片| 国产欧美一区二区三区沐欲| 99精品1区2区| 天堂久久一区二区三区| 久久久影视传媒| 91女人视频在线观看| 日韩精品高清不卡| 欧美国产成人精品| 在线免费av一区| 久久99国产精品尤物| 国产精品国产自产拍高清av王其| 91在线视频在线| 午夜视频一区二区| 精品国产1区2区3区| 国产成a人亚洲精品| 亚洲成人手机在线| 中文字幕精品一区二区精品绿巨人| 欧美无砖砖区免费| 国产在线麻豆精品观看| 亚洲精品中文字幕乱码三区| 精品国产乱码久久久久久蜜臀 | 成人18视频日本| 日本免费新一区视频| 国产精品久久毛片a| 欧美日韩高清影院| 99视频在线观看一区三区| 奇米色一区二区| 亚洲欧美日韩一区二区三区在线观看 | 精品捆绑美女sm三区| 91蝌蚪porny| 国产精品自拍毛片| 日韩电影免费一区| 亚洲精品视频免费观看| 国产三区在线成人av| 欧美一区二区三区白人| 色先锋aa成人| 国产99精品国产| 久久精品99久久久| 午夜久久久久久久久久一区二区| 亚洲图片激情小说| 久久久天堂av| 337p日本欧洲亚洲大胆精品 | 91美女精品福利| 国产成人精品亚洲午夜麻豆| 日本在线不卡视频| 亚洲成av人片一区二区梦乃| 亚洲精品欧美专区| 国产精品久久精品日日| 国产视频视频一区| 精品国产99国产精品| 日韩精品中文字幕在线不卡尤物 | 日韩精品免费视频人成| 亚洲制服丝袜一区| 亚洲视频电影在线| 亚洲视频一二三区| 国产精品乱子久久久久| 国产精品色一区二区三区| 久久九九99视频| 久久综合狠狠综合久久综合88| 91精品国产综合久久福利软件 | 国产亚洲欧美一区在线观看| 日韩一区二区三区av| 欧美一区二区在线免费观看| 欧美日韩一级二级三级| 欧美疯狂性受xxxxx喷水图片| 91九色02白丝porn| 欧美三级电影在线观看| 欧美日本韩国一区| 91麻豆精品国产91久久久久久久久 | 国产亚洲视频系列| 国产精品萝li| 一区二区三区美女视频| 一区二区三区鲁丝不卡| 亚洲国产精品一区二区www在线| 午夜精品久久久| 久久精品国产亚洲高清剧情介绍 | 天堂成人国产精品一区| 婷婷激情综合网| 久久精品久久久精品美女| 国内外成人在线| 91麻豆免费视频| 欧美三级电影精品| 欧美一级欧美三级在线观看| 国产偷国产偷亚洲高清人白洁| 中文字幕亚洲在| 五月激情综合婷婷| 韩国一区二区视频| 99久久777色| 欧美午夜一区二区三区| 欧美精品一区二区蜜臀亚洲| 综合自拍亚洲综合图不卡区| 亚洲bt欧美bt精品777| 国产激情91久久精品导航| 99r精品视频| 欧美一区二区美女| 亚洲欧美在线另类| 日韩中文字幕一区二区三区| 国产美女视频91| 欧美亚洲国产bt| 国产女人18水真多18精品一级做 | 精品视频全国免费看| 精品日韩av一区二区| 日韩美女久久久| 韩日欧美一区二区三区| 欧美丝袜丝交足nylons图片| 久久嫩草精品久久久久| 亚洲高清中文字幕| 国产成人精品一区二区三区网站观看| 色香色香欲天天天影视综合网| 2020国产成人综合网| 亚洲观看高清完整版在线观看| 成人免费看片app下载| 日韩欧美一区二区视频| 一区二区三区在线观看欧美| 久久精品国产99国产| 欧美日韩国产在线观看| 日韩码欧中文字| 国产一区二区三区蝌蚪| 678五月天丁香亚洲综合网| 国产精品激情偷乱一区二区∴| 美女高潮久久久| 69堂亚洲精品首页| 一区二区三区成人| 不卡一二三区首页| 国产网站一区二区三区| 黄一区二区三区| 日韩一区二区免费高清| 午夜精品久久久久久久久久久 | 亚洲第一搞黄网站| 色菇凉天天综合网| 欧美激情一区不卡| 国产主播一区二区| 欧美mv日韩mv国产| 另类人妖一区二区av| 9191国产精品| 亚洲午夜激情av| 欧美午夜影院一区| 一区二区三区**美女毛片| 91视频在线观看| 亚洲丝袜另类动漫二区| www.综合网.com| 国产精品久久久久久久久搜平片 | 国产精品一区二区91| 欧美v日韩v国产v| 麻豆一区二区三| 欧美一区二区成人6969| 美女网站在线免费欧美精品| 欧美色偷偷大香| 免费看日韩精品| 精品理论电影在线观看|