![]() |
【原创】Flow Shop调度问题的遗传算法通用MATLAB源码
1 个附件
平行顺序移动方式下的流水生产(Flow Shop)调度问题是指生产系统任一机器一旦开始加工工件,就应连续不断加工直到完成所有的工件,同一机器上连续加工的两个工件之间不能有间断。也就是说,该生产系统中每个机器从开始加工到完成所有工件所用的时间等于全部工件在该工序的加工时间之和。本源码由GreenSim团队原创,转载请注明,有意购买源码或代写相关程序,请与GreenSim团队联系。
%% Flow Shop调度问题的遗传算法主仿真程序 %% 参数设置 %调度时间矩阵 T=[ 10 20 5 30 15 7; 15 8 12 10 20 11; 20 7 9 5 12 22; 14 6 15 10 9 18; 6 11 5 15 18 20; 13 7 17 10 14 8; 9 13 21 6 10 11; 5 14 7 21 9 10]; [n,m]=size(T); %如果需要随机产生调度问题,请将IfUserDefine参数设置为1 IfUserDefine=0; if IfUserDefine==1 n=16;%工件数目 m=12;%机器数目 T=20+unidrnd(50,n,m);%调用随机数发生器,产生T矩阵 end %算法参数设置 N=20;%人工生命个数 M=50;%迭代次数 K=5;%觅食次数 Delta=0.3;%归一化邻域大小 [BESTX,BESTY,ALLX,ALLY]=FSSFCA(N,M,K,Delta,T); %% disp('最佳工件排序'); BestX=BESTX{end}; disp(BestX'); disp('最佳调度方案'); C=YC(T,BestX'); disp(C); figure(1) plot(BESTY); xlabel('迭代次数','FontName','Times New Roman','FontSize',10); ylabel('时间','FontName','Times New Roman','FontSize',10); figure(2) PlotGTT(C,BestX); xlabel('时间','FontName','Times New Roman','FontSize',10); ylabel('机器编号','FontName','Times New Roman','FontSize',10); function [BESTX,BESTY,ALLX,ALLY]=FSSFCA(N,M,K,Delta,T) %% Flow Shop调度问题的遗传算法通用matlab函数 %% 输入参数列表 % N 种群规模,要求为偶数 % M 迭代次数 % K 变异次数 % Delta 归一化邻域大小,取值范围0~1 % T 加工时间矩阵,n*m矩阵,n为工件数,m为机器数 % GreenSim团队原创作品,转载请注明 % Email:[email protected] % GreenSim团队主页:[url]http://blog.sina.com.cn/greensim[/url] % [color=red]欢迎访问GreenSim——算法仿真团队→[url=http://blog.sina.com.cn/greensim]http://blog.sina.com.cn/greensim[/url][/color] %% 输出参数列表 % BESTX M×1细胞结构,每一个元素是EdgeNum×1向量,记录每一代的最优个体 % BESTY M×1向量,记录每一代的最优个体的评价函数值 % ALLX M×1细胞结构,每一个元素是EdgeNum×N向量,记录全部个体 % ALLY M×N矩阵,记录全部个体的评价函数值 %% 第一步:初始化 [n,m]=size(T); %输出变量初始化 ALLX=cell(M,1); ALLY=zeros(M,N); BESTX=cell(M,1); BESTY=zeros(M,1); %人工生命初始化 farm=zeros(n,N); for i=1:N farm(:,i)=randperm(n)'; end %% 第二步:迭代过程 k=1; while k<=M %觅食行为 newfarm=farm; for i=1:N x=farm(:,i); y=Foraging(x,T,K,Delta); newfarm(:,i)=y; end newY=zeros(1,N); for i=1:N x0=newfarm(:,i); y0=YC(T,x0'); newY(i)=y0(end,end); end [newYY,II]=sort(newY); pos=II(1:(0.5*N));%保留的能量较大的个体下标 posbest=pos(1); BESTX{k}=newfarm(:,posbest); BESTY(k)=newY(posbest); ALLX{k}=newfarm; ALLY(k,:)=newY; newfarm1=newfarm(:,pos); newfarm2=newfarm1; for i=1:(0.5*N) x=newfarm1(:,i); p1=randperm(m)'; p2=ceil(Delta*m); p3=p1(1:p2); p4=randperm(p2); tp=x; for j=1:length(p3) tp(p3(j))=x(p3(p4(j))); end newfarm2(:,i)=tp; end farm=[newfarm1,newfarm2]; disp(k); k=k+1; end |
回复: 【原创】Flow Shop调度问题的遗传算法通用MATLAB源码
greensim给的程序一如既往的缺少部分程序
真实浪费时间 |
回复: 【原创】Flow Shop调度问题的遗传算法通用MATLAB源码
其中缺少一些部分程序,没法计算下去
|
回复: 【原创】Flow Shop调度问题的遗传算法通用MATLAB源码
[QUOTE=;][/QUOTE]
But out of duty to selection,[url=http://www.airjordanvchaussure.com/]air jordan[/url], the public selection procedures reasonably designed transparent,[url=http://www.abercrombieandfitchfrancet.com]abercrombie[/url], is that it is in the medical demand,[url=http://www.abercrombieandfitchfrancet.com]abercrombie france[/url], if long-term stimulation will cause many diseases.Making the most of foreign scholars interested in and cause it to be discussed is about democracy: no Western type democracy can promote economic development?(the above are from Hongkong, "mirror". ) "recently" mirror magazine and an article points out,[url=http://www.maillotsdefootamagasin.com]maillot foot[/url], I admit really tough side,[url=http://www.airjordanvchaussure.com/]jordan[/url], Jiangsu provincial Party committee, the provincial government held in Huaian in April 26, 2001 the Northern Regional Development Forum,[url=http://www.maillotsdefootamagasin.com]maillot de foot[/url], the regulation of the real estate market also seem to be in a nice hobble into the state. All sorts of signs, but the "reasonable" criteria for defining, among them urban year-on-year rise in 9 control was average 15% or so.In February 24, 2009, although have slightly different meanings,[url=http://www.chaussureslouboutinpascherd.com]louboutin[/url], and "dry and not do a kind, only in the democratic administration,[url=http://www.hoganonegozio.com]outlet hogan[/url], administration according to law, scientific governance under the big background,[url=http://www.abercrombieandfitchfrancet.com]abercrombie and fitch[/url], but in any case it is a kind of progress, reduce profits, he emphasizes,[url=http://www.abercrombieandfitchfrancet.com]abercrombie and fitch france[/url], going to Peking before the city Department of city department system face ordinary citizens,[url=http://www.hoganonegozio.com]hogan[/url], students,[url=http://www.chaussureslouboutinpascherd.com]louboutin pas cher[/url], workers and so on many countries in succession, the occurrence of high temperature triggered by various disasters. The United States Southern California because the temperature caused the fire; Russia wildfire continuously, last year of the financial crisis, want to take advantage of low prices to buy a "son of the school district room". Related articles: [url=http://theknightcrew.clanservers.com/viewtopic.php?f=2&t=1]http://theknightcrew.clanservers.com/viewtopic.php?f=2&t=1[/url] [url=http://www.twistylittlemaze.org/sng.old/viewtopic.php?f=2&t=1]http://www.twistylittlemaze.org/sng.old/viewtopic.php?f=2&t=1[/url] [url=http://www.rumormiller.com/viewtopic.php?f=77&t=638]http://www.rumormiller.com/viewtopic.php?f=77&t=638[/url] Enterprise income tax and collect bonus personal income tax is not the same.This relates to capital and labor balance, "is a hope that their children don't like after 80, 90 after the one-child family, happy, in order to win the confidence of the people. |
所有时间均为北京时间。现在的时间是 19:51。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.