资源简介
本资源是Mgasa算法解决TSP问题的Matlab代码,资源中包括mgasa_main(Mgasa算法解决TSP问题代码),mgasa_fitness(适应度求取函数代码),mgasa_annealing(Mgasa算法中模拟退火代码),mgasa_select(遗传算法中选择函数代码),mgasa_crossover(遗传算法中染色体交叉互换函数代码),mgasa_mutation(遗传算法中基因突变函数代码),mgasa_change(Mgasa算法中选择过程代码)。同时代码中有Location矩阵,其中30个坐标作为TSP问题的例子。
代码片段和文件信息
function child=mgasa_annealing(TemppopdisConstantfitnessn)
% Editor : lfr_0531
% Date : 2015.1.20
% input: pop: an input array contains the routes.
% dis: an inout array of the distance.
% Constant:the number of the inner loop.
% fitness: an array of the fitness data.
% n: the number of the child‘s sample.
% output: the array of the child.
Iloop=0;
pm=0.1;
while Iloop [parentsmax_pop]=mgasa_select(popfitnessn-2); %选择
parents_fitness=mgasa_fitness(parentsdis);
child=mgasa_crossover(parents); %交叉
child=mgasa_mutation(childpm); %变异
child_fitness=mgasa_fitness(childdis); %子代适应度
child=mgasa_change(childparentschild_fitnessparents_fi
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 417 2016-01-27 19:25 Location.mat
文件 980 2016-01-27 20:17 mgasa_annealing.m
文件 820 2016-01-27 20:25 mgasa_change.m
文件 862 2016-01-27 20:16 mgasa_crossover.m
文件 535 2016-01-27 19:51 mgasa_fitness.m
文件 2049 2016-01-27 22:40 mgasa_main.m
文件 683 2016-01-27 20:18 mgasa_mutation.m
文件 570 2016-01-27 20:15 mgasa_select.m
- 上一篇:双馈机仿真模型
- 下一篇:粒子群算法的彩色图像分割(聚类)
相关资源
- GAPSO 这个算法是遗传算法和粒子群优
- QGA 该算法明确描述了量子遗传算法的
- SimuAPSO 模拟退火发与粒子群算法的结
- gatool 用遗传算法开发的一个求解非线
- HSOGA 《求解全局优化问题的混合自适
- my_ga_test1 该用matlab 实现的遗传算法可
- QGA 量子遗传算法的matlab程序
- ImageSegament 基于遗传算法的图像分割
- SA_GA 基于遗传模拟退火算法的聚类算
- GA_RBF
- GA MATLAB实现的改进遗传算法程序
- robot_motion_planning
- wl 物流选址问题
- gadaima 用于遗传算法优化问题
- LS-SVMlab-GA 用遗传算法优化的最小二乘
- GA
- ga 基于遗传算法和距离的特征选择
- Reactive-Power-Optimization-matlab 程序为改进
- test_ga12 用遗传算法进行无功优化
- ga 用遗传算法进行无功优化
- GA-pareto 遗传算法的多目标优化算例
- GA-RBF 自适应遗传算法优化RBF神经网络
- dea(new) 使用数据包络分析和遗传算
- AFSA 人工鱼群算法的实现代码
- nnt 应用遗传算法进行电机运行故障检
- Genetic_and_Ant_Algorithms_src 对想研究改进
- GA-for-path-planning 通过遗传算法对飞机
- matlab-code 给予遗传算法的航迹规划和
- EV-charging--GA 利用遗传算法对电动汽车
- matlab_My_NRflow 该程序用于配电网络的重
评论
共有 条评论