用create产生load时,系统先将其放在系统自定义的队列space里,在送到用户定义的process里。- x: Z |- O U% ]8 E( o3 U
我的问题是,希望产生的load达到一定数目后,就停止,直到有新的空余空间(即排队系统中waiting space有限)。1 p S( X# t$ g: b% n6 E
现在我对产生load 的流程(P_Creation2)和load去的下一个流程(P_In2)都做了traffic limit.但space里的load数目却大于这个traffic limit. 所以模拟结果不能确定是否合理。
. f, r9 u {1 q7 P
4 @9 U0 x, R8 L不知有没有办法设置space的limit(现在我找不到这个系统自己定义的队列space)? 多谢指导。
7 K2 y7 \7 ?0 R) I. {
9 g& U: I, G: M我的程序是(以前请教过各位):! Z, X; {- L9 c i3 m
" Q: f& T+ ?1 Mbegin model initialization function2 B% z# ?' X; l1 p7 s K6 s$ w
create 1 load of load type L_null to P_Creation2
9 ^8 s6 }9 U# \1 W return true - E3 s, g5 ]1 N2 B) A- V
end' O, f. `' l: N
/ T4 D& c) Z4 dbegin P_Creation2 arriving procedure
: |4 ]2 }: S4 A [' u9 l% E' awhile 1=1 do6 S) ~- M/ ]1 G$ k9 L
begin
: @3 \3 X& m! N wait for 1 sec1 C+ L0 d ^2 m2 R8 c
create 1 load of load type L_C2 to oneof(2 _In2,8:die)' }, Y" E, f$ j$ z( G, [
end6 ?: O6 v2 d& U" W- X$ C6 J
end
2 n t3 f5 @0 y9 h/ f, ^4 x; U. G9 @0 o7 Q8 a
begin P_In2 arriving procedure' F B1 S4 Q* }$ ?& k0 [
move into Q_F2) s, h9 N9 D# N5 n
move into Elevator:cp21 P4 F; z& D, l' B! e6 m" e9 v
。。。。。 |