用create产生load时,系统先将其放在系统自定义的队列space里,在送到用户定义的process里。
5 Y! V4 @* w( \# Z4 K, |我的问题是,希望产生的load达到一定数目后,就停止,直到有新的空余空间(即排队系统中waiting space有限)。
! k6 b2 l$ M, e现在我对产生load 的流程(P_Creation2)和load去的下一个流程(P_In2)都做了traffic limit.但space里的load数目却大于这个traffic limit. 所以模拟结果不能确定是否合理。
7 y5 o5 y/ @3 A" ^! S3 K& U3 Q; W% Q3 W, l
不知有没有办法设置space的limit(现在我找不到这个系统自己定义的队列space)? 多谢指导。( Q7 `: E3 {% e, @' i3 L" _$ m: t
8 @0 B, _/ C8 u! C我的程序是(以前请教过各位):5 ~2 O) J6 @# ?
. O/ w9 e" L" F9 F$ o
begin model initialization function. ^! [( z) k& P
create 1 load of load type L_null to P_Creation2* y5 ]: o# a& J* O# ?2 u6 @
return true
% g- b, v$ T2 a! [+ N- Rend2 e- f0 _2 }1 c
6 C, K9 ~& q, X" r# [begin P_Creation2 arriving procedure; `, R; Q% C: F ?6 ^' e
while 1=1 do
|2 E+ [2 V. ` begin3 g9 n5 _, L% [5 o4 J1 t4 z
wait for 1 sec5 H5 E6 }9 n+ {. ?. J' i4 t6 Z
create 1 load of load type L_C2 to oneof(2 _In2,8:die)3 o0 l" M- v; T V
end
- o Z5 p' d) }# ~7 D- \) f6 n) Bend
, k- G5 b, g6 j! B+ z: I; Y+ Y/ a% M6 d$ V8 k& ~$ T! B: Z
begin P_In2 arriving procedure
& ?2 |" G) z/ V/ `+ D move into Q_F20 g8 u) m) m2 m" G
move into Elevator:cp2. H$ R& l6 w! L( z) A U Y
。。。。。 |