Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
普通会员
注册日期: 2008-10-06
年龄: 25
帖子: 53
声望力: 18 ![]() |
![]()
平行顺序移动方式下的流水生产(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团队主页:http://blog.sina.com.cn/greensim % 欢迎访问GreenSim——算法仿真团队→http://blog.sina.com.cn/greensim %% 输出参数列表 % 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
__________________
算法设计、代写程序,欢迎访问GreenSim团队主页→ http://blog.sina.com.cn/greensim |
![]() |
![]() |
![]() |
#2 |
初级会员
注册日期: 2011-04-12
帖子: 2
声望力: 0 ![]() |
![]()
greensim给的程序一如既往的缺少部分程序
真实浪费时间 |
![]() |
![]() |
![]() |
#3 |
初级会员
注册日期: 2011-07-25
帖子: 3
声望力: 0 ![]() |
![]()
其中缺少一些部分程序,没法计算下去
|
![]() |
![]() |
![]() |
#4 |
初级会员
注册日期: 2012-06-16
年龄: 42
帖子: 2
声望力: 0 ![]() |
![]()
But out of duty to selection,air jordan, the public selection procedures reasonably designed transparent,abercrombie, is that it is in the medical demand,abercrombie france, 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,maillot foot, I admit really tough side,jordan, Jiangsu provincial Party committee, the provincial government held in Huaian in April 26, 2001 the Northern Regional Development Forum,maillot de foot, 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,louboutin, and "dry and not do a kind, only in the democratic administration,outlet hogan, administration according to law, scientific governance under the big background,abercrombie and fitch, but in any case it is a kind of progress, reduce profits, he emphasizes,abercrombie and fitch france, going to Peking before the city Department of city department system face ordinary citizens,hogan, students,louboutin pas cher, 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: http://theknightcrew.clanservers.com...ic.php?f=2&t=1 http://www.twistylittlemaze.org/sng....ic.php?f=2&t=1 http://www.rumormiller.com/viewtopic.php?f=77&t=638 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. |
![]() |
![]() |