|
|
Q1.4 \. |1 _. ]4 i; e: P% L ^, f- i
我的疑问是第四章中,用来做进行适应度评估的Function函数
3 \; t8 p; z2 l3 ]& b( ]$ w- l* r其中,事先给出的工位指数(StationIndex)=sum(cycleTime-stationTime)/(number of Stations)
" c2 s, w. Z/ _. H但是在function函数中,书中给出了
/ j' s! T7 _; u' G9 sfor i:=1 to Stations loop" W" e' L$ o8 }2 n/ c
mu:=cycletime-procstation[2,i];- -cycletime减去一个工作站中作业任务总时间;
/ w$ b, ]% G% f) G: B* i$ P. BstationIndex:=StationIndex+Mu;--这个也能理解
* l9 h, ?, O! ^sigma:=Mu*Mu;--这个用来求平衡指数的,也能理解/ F8 t8 m: v* C, X# f
StationIndex:=stationIndex+Mu;--这里就不是很清楚了,为什么又要加上这一句呢?这个不会跟上面那句重复了吗?/ o- l! b3 g2 J4 f1 O1 v
SmoothIndex:=smoothIndex+sigma;# b7 Y1 d3 k4 o+ U. B1 S
next;4 g3 L, O" r8 W- }7 ^
StationIndex:=stationIndex/Stations;
+ L. P* \7 ^% @1 c% VSmoothIndex:=sqrt(SmoothIndex/Stations);
- ?# q3 b' q9 C' X2 q! V1 n' H( P1 m
Q2:2 t9 v' t. `4 m. _
同时,本章中由于用的GAoptimization,给出的结果直接就复制到了tablefile中了。。1 H& ^( z6 }# c+ D/ D$ P
如果我想得到GA算法中一个收敛情况,那该如何来得到呢?+ V ]- e5 c8 }/ w. @; Z( K3 z
将每次的子代复制到一个tablefile中,然后导入到Excel中,然后使用Matlab来处理?0 L$ _) p1 }7 Z# a1 l( l: {
有没有可以直接在plant中显示的方法呢? |
|