遗传模拟退火算法matlab通用源程序
遗传模拟退火算法matlab通用源程序
% maxpop 给定群体规模
% pop 群体
% newpop 种群
%t0 初始温度
function [codmin,finmin]=fc0(cc,v0,t0) N=length(cc(1,:));
%定群体规模
if N>50
maxpop=2*N-20;
end
if N<=40
maxpop=2*N;
end
%产生初始群体
pop=zeros(maxpop,N);
pop(:,1)=v0;
finmin=inf;
codmin=0;
for i=1:maxpop
Ra=randperm(N);
Ra(find(Ra==v0))=Ra(1);
Ra(1)=v0;
pop(i,:)=Ra;
end
t=t0;
while t>0
%用模拟退火产生新的群体
pop=fc1(maxpop,pop,N,cc,v0,t); %转轮赌选择种群
f=zeros(1,maxpop);
for i=1:maxpop
for j=1:N-1
x=pop(i,j);
y=pop(i,j+1);
fo1=cc(pop(i,j),pop(i,j+1));
f(i)=f(i)+fo1;
end
f(i)=f(i)+cc(pop(i,1),pop(i,N)); end
fmin=min(f);
for i=1:maxpop
if fmin==inf&f(i)==inf
dd=inf;
end
你可能喜欢
- matlab退火算法
- 遗传算法matlab代码
- 遗传模拟退火算法
- 遗传算法应用实例
- matlab遗传算法实例
- 粒子群算法matlab
- 公共自行车
- 哈密尔顿圈 遗传模拟 退火算法matlab 源程序5页
- 模拟退火算法-matlab7页
- 模拟退火算法及禁忌搜索算法的matlab源程序6页
- 完全图哈密尔顿圈的遗传模拟退火算法matlab通用源程序4页
- 模拟退火算法matlab源程序3页
- 模拟退火算法及禁忌搜索算法的matlab源程序6页
- 遗传算法程序源代码matlab7页
- 遗传算法matlab代码11页
- 遗传算法matlab代码3页
- 遗传算法matlab代码2页
- matlab、lingo程序代码3-背包问题(遗传算法)3页
- 遗传算法matlab程序代码7页
- 模拟退火遗传禁忌搜索的多用户检测算法_刁鸣_邹丽5页
- 一种基于模拟退火和遗传算法的模糊聚类方法3页
- 基于模拟退火改进的实参遗传算法及其工程应用4页
- 基于遗传模拟退火算法的移动机器人静态路径规划4页
- 遗传模拟退火算法49页
- 模拟退火遗传算法 源程序15页
- MATLAB.遗传算法和粒子群算法程序设计及实例应用11页
- 遗传算法及其应用实例5页
- 遗传算法在数据挖掘中的应用实例分析2页
- 遗传算法在数据挖掘中的应用实例分析3页
- Matlab遗传算法工具箱函数及应用实例2页
- matlab基本遗传算法应用实例2页
- 三个遗传算法matlab程序实例19页
- matlab遗传算法工具箱函数及实例讲解3页
- matlab遗传算法实例10页
- matlab遗传算法工具箱函数及实例讲解3页
- matlab遗传算法工具箱函数及实例讲解10页
- matlab遗传算法工具箱函数及实例讲解2页


