|
|
Q1.
* R8 d1 j6 P, m, |& h" Q我的疑问是第四章中,用来做进行适应度评估的Function函数
3 J, ]. X1 w: b V( N5 ]* Q* X; Y其中,事先给出的工位指数(StationIndex)=sum(cycleTime-stationTime)/(number of Stations)
, m9 q4 H: x& w% B1 t$ s9 l% u o& I但是在function函数中,书中给出了0 `8 \7 \( P7 f, D5 n2 L) X1 c) F
for i:=1 to Stations loop8 z! D% i+ e$ L/ Y! k
mu:=cycletime-procstation[2,i];- -cycletime减去一个工作站中作业任务总时间;
- q5 h% |+ o8 H* f* wstationIndex:=StationIndex+Mu;--这个也能理解: H$ [9 e s9 j5 V' x
sigma:=Mu*Mu;--这个用来求平衡指数的,也能理解$ @6 c/ \' h. w5 M, U) w1 h
StationIndex:=stationIndex+Mu;--这里就不是很清楚了,为什么又要加上这一句呢?这个不会跟上面那句重复了吗?
0 N. {3 M2 K2 |! _" Y# ASmoothIndex:=smoothIndex+sigma;
! Q2 c/ i5 Y7 C$ v' g! ]7 ynext;, j& K5 j, ^, J- c, V
StationIndex:=stationIndex/Stations;
2 m$ B: c$ f# ^ e# L; OSmoothIndex:=sqrt(SmoothIndex/Stations);
- l/ Y2 [# X1 d' U
+ {6 Z) c/ s" A' HQ2:" L3 M) H' h2 _' I9 b
同时,本章中由于用的GAoptimization,给出的结果直接就复制到了tablefile中了。。1 T+ A5 [7 M# m+ T( O; P
如果我想得到GA算法中一个收敛情况,那该如何来得到呢?) O z) b, _4 k* r) X7 D# k
将每次的子代复制到一个tablefile中,然后导入到Excel中,然后使用Matlab来处理?
" k7 ]: W: s3 F8 ]6 V4 c. l/ O+ {$ {. ^有没有可以直接在plant中显示的方法呢? |
|