找回密码
 注册
关于网站域名变更的通知
查看: 596|回复: 1
打印 上一主题 下一主题

基于matlab GUI遗传算法优化求解

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2021-4-12 10:13 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
% u3 o3 I# G2 K8 E4 Y
一、简介
# `& c8 c- \, f: m1 遗传算法简介
3 m1 B. |! y4 k, M5 x遗传算法是一种模拟自然进化的优化搜索算法。由于它仅依靠适应度函数就可以搜索最优解,不需要有关问题解空间的知识,并且适应度函数不受连续可微等条件的约束,因此在解决多维、高度非线性的复杂优化问题中得到了广泛应用和深入研究。
7 p$ k7 }- R# ^. y! n- N遗传算法在模式识别、神经网络、机器学习、工业优化控制、自适应控制、生物科学、社会科学等方面都得到应用。
6 V0 C& j1 _+ v1 R9 L% y$ |- d
: e5 W6 v" _) O) N8 _6 F/ m+ @- V
3 g% b% {- s0 u6 J8 h6 h1 j5 a9 h2 遗传算法原理
2 i- Q0 m9 b7 F3 n- e+ \) o& t1 W* B
. b* n, I" }4 c! f6 d/ G1 M" m! B# Y1 H9 u+ u( L: z

+ G; T0 ]/ [4 ?& ~$ e3 f3 G, z
# q' E, k; ^1 v2 ]
1 w5 B6 G1 d& ?- ]" q, J

1 k* l6 j: V) [* z$ R/ d- Q9 F$ B0 i' Z) ]2 _
& f' p8 J) X0 }. m1 n+ s  q
% f5 s' O. x% g
( |, J$ R' q/ }% Y. w

8 ?7 I3 d: d+ Q" q4 ^
; T2 {2 l& k/ E7 j# u- O& N1 S# Z' d8 @' s; ]+ W

# d' S' J" a' b4 P3 N3 t
; S: f# k* \) e1 i二、源代码
$ E& Y, W7 P' t. I. G0 O0 i, {- k4 D6 q  h* P
  • function varargout = yichuan(varargin)
  • % YICHUAN MATLAB code for yichuan.fig
  • %      YICHUAN, by itself, creates a new YICHUAN or raises the existing
  • %      singleton*.
  • %
  • %      H = YICHUAN returns the handle to a new YICHUAN or the handle to
  • %      the existing singleton*.
  • %
  • %      YICHUAN('CALLBACK',hObject,eventData,handles,...) calls the local
  • %      function named CALLBACK in YICHUAN.M with the given input arguments.
  • %
  • %      YICHUAN('Property','Value',...) creates a new YICHUAN or raises the
  • %      existing singleton*.  Starting from the left, property value pairs are
  • %      applied to the GUI before yichuan_OpeningFcn gets called.  An
  • %      unrecognized property name or invalid value makes property application
  • %      stop.  All inputs are passed to yichuan_OpeningFcn via varargin.
  • %
  • %      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
  • %      instance to run (singleton)".
  • %
  • % See also: GUIDE, GUIDATA, GUIHANDLES
  • % Edit the above text to modify the response to help yichuan
  • % Last Modified by GUIDE v2.5 15-Jul-2016 21:52:11
  • % Begin initialization code - DO NOT EDIT
  • gui_Singleton = 1;
  • gui_State = struct('gui_Name',       mfilename, ...
  •                    'gui_Singleton',  gui_Singleton, ...
  •                    'gui_OpeningFcn', @yichuan_OpeningFcn, ...
  •                    'gui_OutputFcn',  @yichuan_OutputFcn, ...
  •                    'gui_LayoutFcn',  [] , ...
  •                    'gui_Callback',   []);
  • if nargin && ischar(varargin{1})
  •     gui_State.gui_Callback = str2func(varargin{1});
  • end
  • if nargout
  •     [varargout{1:nargout}] = gui_maiNFCn(gui_State, varargin{:});
  • else
  •     gui_mainfcn(gui_State, varargin{:});
  • end
  • % End initialization code - DO NOT EDIT
  • % --- Executes just before yichuan is made visible.
  • function yichuan_OpeningFcn(hObject, eventdata, handles, varargin)
  • % This function has no output args, see OutputFcn.
  • % hObject    handle to figure
  • % eventdata  reserved - to be defined in a future version of MATLAB
  • % handles    structure with handles and user data (see GUIDATA)
  • % varargin   command line arguments to yichuan (see VARARGIN)
  • % --- Executes on button press in pushbutton3.
  • function pushbutton3_Callback(hObject, eventdata, handles)
  • % hObject    handle to pushbutton3 (see GCBO)
  • % eventdata  reserved - to be defined in a future version of MATLAB
  • % handles    structure with handles and user data (see GUIDATA)
  • clear all;
  • close all;, v& w0 H4 @  n2 k( r
" l' l" j' \% a! z6 i
% E6 w! w7 e* h& f7 y4 P0 |

  F: n) S0 E0 Y& j7 s% [7 V三、运行结果# ]% x5 h' x$ e0 E7 z5 M

: K! e  N/ B/ f7 q
3 R3 M6 G) [# D0 H# r: x- X2 O% ^9 k6 j3 ~$ \
7 _1 P/ K; L* @
  • TA的每日心情

    2019-11-29 15:37
  • 签到天数: 1 天

    [LV.1]初来乍到

    2#
    发表于 2021-4-12 13:31 | 只看该作者
    基于matlab GUI遗传算法优化求解
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

    推荐内容上一条 /1 下一条

    EDA365公众号

    关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

    GMT+8, 2025-7-20 02:19 , Processed in 0.140625 second(s), 26 queries , Gzip On.

    深圳市墨知创新科技有限公司

    地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

    快速回复 返回顶部 返回列表