|
|
Q1.* C3 G+ U# ?9 p6 q( d
我的疑问是第四章中,用来做进行适应度评估的Function函数
8 B4 G8 B8 i! Y9 d其中,事先给出的工位指数(StationIndex)=sum(cycleTime-stationTime)/(number of Stations)
. |, E" L3 F+ i2 y& U+ @但是在function函数中,书中给出了8 s; R! _. G3 _1 @
for i:=1 to Stations loop
4 i" {% p( q! A/ s x V& t7 a) Dmu:=cycletime-procstation[2,i];- -cycletime减去一个工作站中作业任务总时间;% c7 m# l4 x5 `+ i: z: [7 r$ K
stationIndex:=StationIndex+Mu;--这个也能理解
6 d' b' d; G$ h9 M* D: ?/ Xsigma:=Mu*Mu;--这个用来求平衡指数的,也能理解
5 y) w) n7 u# mStationIndex:=stationIndex+Mu;--这里就不是很清楚了,为什么又要加上这一句呢?这个不会跟上面那句重复了吗?$ ?8 d0 Y7 A& }$ K- k# y- S+ n
SmoothIndex:=smoothIndex+sigma;/ ^/ \2 p8 ~5 s, h6 T1 [+ f+ s
next;
+ B; c0 ~5 ~0 x% t! r1 ^+ L# C6 }StationIndex:=stationIndex/Stations;
( [* r0 B1 t8 ?) QSmoothIndex:=sqrt(SmoothIndex/Stations);
. o* @3 Z. N5 W& G! o
g4 U( B Z: m" _/ y) AQ2:
7 Z! U" y& t5 K k) X- q同时,本章中由于用的GAoptimization,给出的结果直接就复制到了tablefile中了。。
% s1 p# w4 o7 l2 D& |% k如果我想得到GA算法中一个收敛情况,那该如何来得到呢?% o4 f H% ]9 T/ U) ^
将每次的子代复制到一个tablefile中,然后导入到Excel中,然后使用Matlab来处理?
$ X! V6 I# O, b( y( s! |1 s有没有可以直接在plant中显示的方法呢? |
|