这个没必要用循环,直接用条件语句,设一个method,如果检测到A产品时,就设定singleproc服从A产品在机台上的服务分布,如果检测到B时就让singleproc服从B产品在机台上的服务分布,设定服务分布可以用函数setparam用法,你查一下help就有了。/ S$ A9 `7 P- X5 v9 [% H- x
setParam - x; v* }# L1 p; ~
Usage: <path>.<attribute>.setParam(<string>[,<any>,...]); . G, a0 C' C8 v3 u# i; U
~; G0 P# p/ S
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. ! R) d4 T* N# j
- n( G, y! B! kExample: singleProc.proctime.setParam("normal",1,30,10);/ n: D4 J/ |7 y% i: t8 @
singleProc.proctime.setParam("normal",1,30,10,1,100);
j! d$ o7 X- S6 z3 v" \ singleProc.setuptime.setParam("formula","Variable1/20");% t6 K& _0 J, L: y* H) ~. H
generator.duration.setParam("dEmp",2,TableEmp) |