用create产生load时,系统先将其放在系统自定义的队列space里,在送到用户定义的process里。! n. `- H$ P& w! [" j
我的问题是,希望产生的load达到一定数目后,就停止,直到有新的空余空间(即排队系统中waiting space有限)。
) ~- X j: [7 t" `0 V/ U2 P" b现在我对产生load 的流程(P_Creation2)和load去的下一个流程(P_In2)都做了traffic limit.但space里的load数目却大于这个traffic limit. 所以模拟结果不能确定是否合理。
' p5 J, u: R+ f Z0 _$ l+ J& ~& m7 V$ [, }7 Q/ S' X1 L
不知有没有办法设置space的limit(现在我找不到这个系统自己定义的队列space)? 多谢指导。
9 a9 l4 k) B1 [, x
( ?/ E t: E7 V我的程序是(以前请教过各位):
3 c! x& ]* w, A9 a$ r% Q) M/ @0 K: K/ q# d
begin model initialization function
c; R" Q( R( ]: Z create 1 load of load type L_null to P_Creation2& l% o0 X: Y2 E% k3 A4 X6 p5 q
return true , ], t9 ?/ Y% c. G# G( j+ O3 i
end. s2 _8 o1 n3 Z
8 `; B) s9 X4 \/ H% r4 @' v" j: q
begin P_Creation2 arriving procedure
- H& E/ }+ j+ z) k$ Pwhile 1=1 do2 P* Y! [% |) _' I1 G' H3 O! ?
begin
5 c) Q$ r" l( b3 v$ e4 x% I wait for 1 sec- y& D( R7 K! \$ K5 Z. p
create 1 load of load type L_C2 to oneof(2 _In2,8:die)" ~$ E/ }. \, }: R, P) N! _6 V
end
2 X' R( W' U# y2 M5 Kend9 i: Z( C Q% ~' O6 L: h, l$ r$ d0 I
, C% Q3 S! E, u( jbegin P_In2 arriving procedure
( w& f8 U4 r3 l4 `7 T# ?. K move into Q_F29 t$ l& n% f0 w, |; ~
move into Elevator:cp21 \5 E2 C) J# h$ v
。。。。。 |