资源简介
模拟退火算法Matlab程序,包含两个代码,1.求解函数最优解. 2.二维空间路径规划
代码片段和文件信息
% clear
% clc
%
% %生成初始解
% sol_new2=1;%(1)解空间(初始解)
% sol_new1=2-sol_new2^2;
% sol_current1 = sol_new1;
% sol_best1 = sol_new1;
% sol_current2 = sol_new2;
% sol_best2 = sol_new2;
% E_current = inf;
% E_best = inf;
%
% rand(‘state‘sum(clock)); %初始化随机数发生器
% t=90; %初始温度
% tf=89.9; %结束温度
% a = 0.99; %温度下降比例
%
% while t>=tf%(7)结束条件
% for r=1:100 %退火次数
%
% %产生随机扰动(3)新解的产生
% sol_new2=sol_new2+rand*0.2;
% sol_new1=2-sol_new2^2;
%
% %检查是否满足约束
% if sol_new1^2-sol_new2>=0 && -sol_new1-sol_new2^2+2==0 && sol_new1>=0 &&sol_new2>=0
% else
% sol_new2=rand*2;
% sol_new1=2-sol_new2^2;
% continue;
% end
%
% %退火过程
% E_new=sol_new1^2+sol_new2^2+8;%(2)目标函数
% if E_new % E_current=E_new;
% sol_current1=sol_new1;
% sol_current2=sol_new2;
% if E_new % %把冷却过程中最好的解保存下来
% E_best=E_new;
% sol_best1=sol_new1;
% sol_best2=sol_new2;
% end
% else
% if rand % E_current=E_new;
% sol_current1=sol_new1;
% sol_current2=sol_new2;
% else
% sol_new1=sol_current1;
% sol_new2=sol_current2;
% end
% end
% plot(rE_b
- 上一篇:永磁同步电机矢量控制 有传感器 无传感器
- 下一篇:Dubins曲线Matlab代码
相关资源
- 基于遗传模拟退火算法的模糊C均值聚
- 模拟退火算法解决0-1背包问题
- Matlab模拟退火算法-模拟退火.zip
- matlab解决旅行商问题
- 基于MATLAB的模拟退火算法求解最短路
- 蚁群优化模拟退火算法、多目标,遗
- 简单的模拟退火算法,利用模拟退火
- 模拟退火解决tsp的Matlab程序+设计报告
- Matlab的模拟退火算法工具包
- 模拟退火算法解决旅行商问题-matlab代
- 基于模拟退火算法的遗传模拟退火算
- 模拟退火算法计算费马点
- 粒子群模拟退火算法
- 遗传模拟退火算法MATLAB
- 模拟退火算法matlab实现
- 模拟退火算法解决vrptw
- 模拟退火算法MATLAB实现代码2
- 模拟退火算法进行函数优化 matlab
- 基于模拟退火算法的TSP问题matlab实现
- 模拟退火算法的matlab程序,简单易懂
- SA模拟退火MATLAB代码详细中文注解
- matlab解决旅行者问题的三种算法遗传
- 模拟退火算法的matlab工具箱satools
- 模拟退火算法
- 模拟退火算法matlab程序
- 模拟退火算法优化神经网络
- sa_vrp.rar
- 实现模拟退火算法的矩形排样
- SA_GA 基于遗传模拟退火算法的聚类算
- jobshop-sa-jsp 模拟退火算法解决作业车
评论
共有 条评论