下载此文档

蚁群优化算法.doc


文档分类:IT计算机 | 页数:约19页 举报非法文档有奖
1/19
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/19 下载此文档
文档列表 文档介绍
上面为GUI界面和源码,下载后若还存在这2副png图,后缀和空格去掉。
代码优化前后的时间相差很明显。可以给初学优化算法的学生在程序结构和算法流程设计上
有个很好的认识。
to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin unrecognized PropertyName/PropertyValue pairs from the
% command line (see VARARGIN)
% Choose default command line output for TspACA
= hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes TspACA wait for user response (see UIRESUME)
% uiwait();
global AntsCod
global bContinue
global Change
bContinue = 0;
Change =0;
CityNum = str2num(get(,'String'));
AntsCod =round(100*rand(CityNum,2));
%if MapIndex == 1
%AntsCod(:,1) = (unidrnd(100,1,CityNum) - 1)';
%AntsCod(:,2) = (unidrnd(100,1,CityNum) - 1)';
plot(AntsCod(:,1),AntsCod(:,2),'mo','LineWidth',,'MarkerEdgeColor','r','MarkerFaceColor','b','Parent',);
% --- Outputs from this function are returned to the command line.
function varargout = TspACA_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = ;
function CityNumber_Callback(hObject, eventdata, handles)
% hObject handle to CityNumber (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of CityNumber as text
% str2double(get(hObject,'String')) returns contents of CityNumber as a double
% --- Executes during object creation, after setting all properties.
function CityNumber_Cre

蚁群优化算法 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数19
  • 收藏数0 收藏
  • 顶次数0
  • 上传人miaoshen1985
  • 文件大小161 KB
  • 时间2022-04-17
最近更新