|
Q1.
$ k' H6 x+ g# Z: }4 s我的疑问是第四章中,用来做进行适应度评估的Function函数
. U# R- \5 h6 K8 z6 E2 K& X2 R( }# ^+ P* d其中,事先给出的工位指数(StationIndex)=sum(cycleTime-stationTime)/(number of Stations)& b" U4 i1 `5 G% [7 {2 A
但是在function函数中,书中给出了
1 q3 q: m; {! v4 ]; Zfor i:=1 to Stations loop
/ ?. c0 V( N0 v" Lmu:=cycletime-procstation[2,i];- -cycletime减去一个工作站中作业任务总时间;- Y( c) @: d# j. X0 i
stationIndex:=StationIndex+Mu;--这个也能理解
! \: G% c. J3 B; |2 @' R" \2 nsigma:=Mu*Mu;--这个用来求平衡指数的,也能理解. e( Y1 A7 h9 G2 r0 G3 a8 u
StationIndex:=stationIndex+Mu;--这里就不是很清楚了,为什么又要加上这一句呢?这个不会跟上面那句重复了吗?/ n, G! T0 N5 R, C8 P @- h
SmoothIndex:=smoothIndex+sigma;
- H- K4 w2 ]6 b5 E1 bnext;* `+ {, [; ? Y# C \
StationIndex:=stationIndex/Stations;
& n9 E) }& L. h! {6 ]SmoothIndex:=sqrt(SmoothIndex/Stations);
3 u- E4 C$ W e' d) y, G3 v
2 p2 S/ P: }6 Y0 c. CQ2:6 z: X( E- k' g$ n
同时,本章中由于用的GAoptimization,给出的结果直接就复制到了tablefile中了。。2 f1 h8 f: T! B; C4 Q
如果我想得到GA算法中一个收敛情况,那该如何来得到呢?# M$ K$ q" \. Z( b3 y
将每次的子代复制到一个tablefile中,然后导入到Excel中,然后使用Matlab来处理?
8 h. w- H) L3 @6 V5 s6 j) w" H有没有可以直接在plant中显示的方法呢? |
|