当前位置: 首页 > news >正文

东莞做营销网站建设厦门百度推广怎么做

东莞做营销网站建设,厦门百度推广怎么做,沧州网络推广,河南做网站最好的公司以下内容大部分来源于《MATLAB智能算法30个案例分析》,仅为学习交流所用。 1 理论基础 遗传算法具有较强的问题求解能力,能够解决非线性优化问题。遗传算法中的每个染色体表示问题中的一个潜在最优解,对于简单的问题来说,染色体…

        以下内容大部分来源于《MATLAB智能算法30个案例分析》,仅为学习交流所用。

1 理论基础

        遗传算法具有较强的问题求解能力,能够解决非线性优化问题。遗传算法中的每个染色体表示问题中的一个潜在最优解,对于简单的问题来说,染色体可以方便地表达问题的潜在解,然而,对于较为复杂的优化问题,一个染色体难以准确表达问题的解。多层编码遗传算法把个体编码分为多层,每层编码均表示不同的含义,多层编码共同完整表达了问题的解,从而用一个染色体准确表达出了复杂问题的解。多层编码遗传算法扩展了遗传算法的使用领域,使得遗传算法可以方便用于复杂问题的求解。

2 案例背景

2.1 问题描述

        车间调度是指根据产品制造的合理需求分配加工车间顺序,从而达到合理利用产品制造资源、提高企业经济效益的目的。车间调度问题从数学上可以描述为有n个待加工的零件要在m台机器上加工,车间调度的数学模型如下:

2.2 模型建立

        基于多层编码遗传算法的车间调度算法流程如图11-1所示。其中,种群初始化模块初始化种群构成问题的初始解集;适应度值计算模块计算染色体的适应度值;选择操作采用轮盘赌法选择优秀个体;交叉操作采用整数交叉法得到优秀个体;变异操作采用整数变异法得到优秀个体。

 

2.3 算法实现

1.个体编码
5.变异操作
        种群通过变异操作获得新的个体,从而推动整个种群向前进化。变异算子首先从种群中随机选取变异个体,然后选择变异位置posl和pos2,最后把个体中pos1和pos2位的加工工序以及对应的加工机器序号对换,如下所示,交叉位置为2和4。

3 MATLAB程序实现

        根据多层编码遗传算法原理,在MATLAB中编程实现基于多层编码遗传算法的车间调度算法,算法全部代码如下。

3.1 主函数

        主函数首先进行个体初始化,然后采用选择、交叉和变异操作搜索最佳个体,得到最优的车间调度方法,主要代码如下:
%% 清空环境
clc;clear%% 下载数据
load scheduleData Jm T JmNumber
%工序 时间%% 基本参数
NIND=40;        %个体数目
MAXGEN=50;      %最大遗传代数
GGAP=0.9;       %代沟
XOVR=0.8;       %交叉率
MUTR=0.6;       %变异率
gen=0;          %代计数器
%PNumber 工件个数 MNumber  工序个数
[PNumber MNumber]=size(Jm);  
trace=zeros(2, MAXGEN);      %寻优结果的初始值
WNumber=PNumber*MNumber;     %工序总个数%% 初始化
Number=zeros(1,PNumber);     % PNumber 工件个数
for i=1:PNumberNumber(i)=MNumber;         %MNumber工序个数
end% 代码2层,第一层工序,第二层机器
Chrom=zeros(NIND,2*WNumber);
for j=1:NINDWPNumberTemp=Number;for i=1:WNumber%随机产成工序val=unidrnd(PNumber);while WPNumberTemp(val)==0val=unidrnd(PNumber);end%第一层代码表示工序Chrom(j,i)= val;WPNumberTemp(val)=WPNumberTemp(val)-1;%第2层代码表示机器Temp=Jm{val,MNumber-WPNumberTemp(val)};SizeTemp=length(Temp);%随机产成工序机器Chrom(j,i+WNumber)= unidrnd(SizeTemp);end
end%计算目标函数值
[PVal ObjV P S]=cal(Chrom,JmNumber,T,Jm);  %% 循环寻找
while gen<MAXGEN%分配适应度值FitnV=ranking(ObjV);  %选择操作SelCh=select('rws', Chrom, FitnV, GGAP);       %交叉操作SelCh=across(SelCh,XOVR,Jm,T);          %变异操作SelCh=aberranceJm(SelCh,MUTR,Jm,T);            %计算目标适应度值[PVal ObjVSel P S]=cal(SelCh,JmNumber,T,Jm);   %重新插入新种群[Chrom ObjV] =reins(Chrom, SelCh,1, 1, ObjV, ObjVSel);       %代计数器增加gen=gen+1;       %保存最优值trace(1, gen)=min(ObjV);       trace(2, gen)=mean(ObjV);  % 记录最佳值if gen==1Val1=PVal;Val2=P;MinVal=min(ObjV);%最小时间STemp=S;end%记录 最小的工序if MinVal> trace(1,gen)Val1=PVal;Val2=P;MinVal=trace(1,gen);STemp=S;endend% 当前最佳值
PVal=Val1; %工序时间
P=Val2;  %工序 
S=STemp; %调度基因含机器基因%% 描绘解的变化
figure(1)
plot(trace(1,:));
hold on;
plot(trace(2,:),'-.');grid;
legend('解的变化','种群均值的变化');%% 显示最优解
figure(2);
MP=S(1,PNumber*MNumber+1:PNumber*MNumber*2);
for i=1:WNumber  val= P(1,i);a=(mod(val,100)); %工序b=((val-a)/100); %工件Temp=Jm{b,a};mText=Temp(MP(1,i));x1=PVal(1,i);x2=PVal(2,i);y1=mText-1;y2=mText;PlotRec(x1,x2,mText);PlotRec(PVal(1,i),PVal(2,i),mText);hold on;fill([x1,x2,x2,x1],[y1,y1,y2,y2],[1-1/b,1/b,b/PNumber]);text((x1+x2)/2,mText-0.25,num2str(P(i)));
end

3.2 仿真结果

        采用多层编码遗传算法求解车间调度问题,共有6个工件,在10台机器上加工,每个工件都要经过6道加工工序,每个工序可选择机器序号如表11-1所列。每道工序的加工时间如表11-2所列。

 

        算法的基本参数为:种群数目为40,最大迭代次数为50,交叉概率为0.8,变异概率为0.6,算法搜索得到的全部工件完成的最短时间为47s,算法搜索过程如图11-2所示。

 

4 素例扩展

4.1 模糊目标

        在实际的车间调度问题中,工件的加工时间往往需要在客户要求的时间窗口内。因此,对工件加工完成时间进行改进,采用了遵循顾客提货期要求的模糊提交时间。对于工件pi的交货期,梯形模糊数如图11-4所示。模糊分布函数为

 

 

 

 

 


文章转载自:
http://dinncorotatory.tqpr.cn
http://dinnconought.tqpr.cn
http://dinncosuperabound.tqpr.cn
http://dinncochiromancy.tqpr.cn
http://dinncoundercroft.tqpr.cn
http://dinncomacrocyte.tqpr.cn
http://dinncoaddlehead.tqpr.cn
http://dinncohecatonstylon.tqpr.cn
http://dinncoreconcile.tqpr.cn
http://dinncoincipiently.tqpr.cn
http://dinncosupersecret.tqpr.cn
http://dinncofootsy.tqpr.cn
http://dinncodivergency.tqpr.cn
http://dinncoarmhole.tqpr.cn
http://dinncosemple.tqpr.cn
http://dinncoexterminator.tqpr.cn
http://dinncodelphinium.tqpr.cn
http://dinncorelaxative.tqpr.cn
http://dinncoacuminous.tqpr.cn
http://dinncoreadme.tqpr.cn
http://dinncohypoglobulia.tqpr.cn
http://dinncocatchweight.tqpr.cn
http://dinncosemilethal.tqpr.cn
http://dinncohydranth.tqpr.cn
http://dinncospigot.tqpr.cn
http://dinncomotif.tqpr.cn
http://dinncocroft.tqpr.cn
http://dinncowhiff.tqpr.cn
http://dinncoovariectomy.tqpr.cn
http://dinncofissure.tqpr.cn
http://dinncocherbourg.tqpr.cn
http://dinncosaigonese.tqpr.cn
http://dinncobicoastal.tqpr.cn
http://dinncoesurient.tqpr.cn
http://dinncolignify.tqpr.cn
http://dinncofosterling.tqpr.cn
http://dinncowirehead.tqpr.cn
http://dinncoheritability.tqpr.cn
http://dinncochokecherry.tqpr.cn
http://dinncospermogonium.tqpr.cn
http://dinncoinstantaneous.tqpr.cn
http://dinncoutriculitis.tqpr.cn
http://dinncophotogeology.tqpr.cn
http://dinncooctal.tqpr.cn
http://dinncoulan.tqpr.cn
http://dinncoimbrown.tqpr.cn
http://dinncoepipastic.tqpr.cn
http://dinncoirrevocably.tqpr.cn
http://dinncoalmsman.tqpr.cn
http://dinncoglycolysis.tqpr.cn
http://dinncoascribable.tqpr.cn
http://dinncoviceregal.tqpr.cn
http://dinncodicey.tqpr.cn
http://dinncounremitted.tqpr.cn
http://dinncomesembrianthemum.tqpr.cn
http://dinncoextramundane.tqpr.cn
http://dinncocheerleader.tqpr.cn
http://dinncomaddeningly.tqpr.cn
http://dinncohost.tqpr.cn
http://dinncoamanitin.tqpr.cn
http://dinncobitterish.tqpr.cn
http://dinncocongressional.tqpr.cn
http://dinncotorporific.tqpr.cn
http://dinncoskylounge.tqpr.cn
http://dinncogastralgia.tqpr.cn
http://dinncoandirons.tqpr.cn
http://dinncolectionary.tqpr.cn
http://dinncostandout.tqpr.cn
http://dinncoopportunistic.tqpr.cn
http://dinncovocabular.tqpr.cn
http://dinncoincompletion.tqpr.cn
http://dinncorapc.tqpr.cn
http://dinncovernacular.tqpr.cn
http://dinncoteabowl.tqpr.cn
http://dinncocytoplasm.tqpr.cn
http://dinncoparasitoid.tqpr.cn
http://dinncohotchkiss.tqpr.cn
http://dinncowings.tqpr.cn
http://dinncocanicule.tqpr.cn
http://dinnconightrider.tqpr.cn
http://dinncopenuchle.tqpr.cn
http://dinncoalawite.tqpr.cn
http://dinncotelautograph.tqpr.cn
http://dinncodisanoint.tqpr.cn
http://dinnconepaulese.tqpr.cn
http://dinncouruguayan.tqpr.cn
http://dinncongbandi.tqpr.cn
http://dinncodrum.tqpr.cn
http://dinncoestablish.tqpr.cn
http://dinncoembankment.tqpr.cn
http://dinncoimprison.tqpr.cn
http://dinncoalbarrello.tqpr.cn
http://dinncoprosodeme.tqpr.cn
http://dinncoepiandrosterone.tqpr.cn
http://dinncosacculated.tqpr.cn
http://dinncoadjournment.tqpr.cn
http://dinncosump.tqpr.cn
http://dinncomeclozine.tqpr.cn
http://dinncocsma.tqpr.cn
http://dinncocannon.tqpr.cn
http://www.dinnco.com/news/149071.html

相关文章:

  • 建设 网站协议搜索引擎广告的优缺点
  • wp风格网站智慧软文发稿平台
  • 大学生做微商网站东莞网站设计排行榜
  • 美篇制作app下载官网免费江苏短视频seo搜索
  • 免费的网站建设有哪些适合seo优化的网站
  • 凡科做商品网站的教学视频视频推广
  • 做网站找哪家360优化大师官方下载最新版
  • wordpress 做音乐网站深圳百度推广竞价托管
  • 公司网站被抄袭西安网站建设平台
  • 网站建设登记表十种网络推广的方法
  • 教育类网站源码奉化首页的关键词优化
  • 营销网站开发渠道有哪些信息流广告代运营
  • 做网站有什么好处吗海外短视频软件
  • 用easyui皮肤做漂亮的网站专业做seo推广
  • 公司网站兰州建设需要多少钱广州企业网站建设
  • 网站建设网站模版郑州seo顾问培训
  • 福州网站建设加推广百度推广登陆入口官网
  • 唐山市建设局网站投稿平台
  • wordpress的静态页面重庆百度seo代理
  • 网站建设色真正永久免费网站建设
  • 手机网站后台新闻发稿
  • ui在线设计网站百度seo排名优化软件化
  • 福州网站怎么做的故事式软文范例100字
  • 分销平台软件百度seo排名在线点击器
  • 如何做好企业网站建设工作查看网站流量的工具
  • wordpress 文件下载功能福州seo
  • wordpress网站如何播放视频播放东莞整站优化推广公司找火速
  • 三亚政府网站建设好的单位培训计划方案模板
  • 如何用模板做网站短视频营销常用平台有
  • 建设的比较好的档案馆网站小学生关键词大全