这个没必要用循环,直接用条件语句,设一个method,如果检测到A产品时,就设定singleproc服从A产品在机台上的服务分布,如果检测到B时就让singleproc服从B产品在机台上的服务分布,设定服务分布可以用函数setparam用法,你查一下help就有了。. d/ i( t6 @6 p0 [ c
setParam
$ V- F7 K# `3 }( ?Usage: <path>.<attribute>.setParam(<string>[,<any>,...]); $ m- V+ b- K% H% {0 i
" d" P/ Q. H/ D R% _' m$ R7 ^+ O J
The method setParam sets the type of distribution and assigns a complete set of arguments to the distribution. The first argument, of data type (string), sets the type of the distribution. Depending on the type, you have to enter additional arguments, such as Stream, Mu, Sigma, LowerBound, and UpperBound.
2 A d7 S1 p) K. M% w/ L# Y# }" B- t9 b. l( G& c
Example: singleProc.proctime.setParam("normal",1,30,10);( h& c; o9 f" w& I
singleProc.proctime.setParam("normal",1,30,10,1,100);
7 y3 u! K: \1 U- N+ R7 J% f singleProc.setuptime.setParam("formula","Variable1/20");6 w: q( v& Q' w$ N' b
generator.duration.setParam("dEmp",2,TableEmp) |