用create产生load时,系统先将其放在系统自定义的队列space里,在送到用户定义的process里。- V- _2 z3 e- O; b* A
我的问题是,希望产生的load达到一定数目后,就停止,直到有新的空余空间(即排队系统中waiting space有限)。
# s; [3 k7 Q* u+ Q4 g9 Y2 e现在我对产生load 的流程(P_Creation2)和load去的下一个流程(P_In2)都做了traffic limit.但space里的load数目却大于这个traffic limit. 所以模拟结果不能确定是否合理。. k' n& e7 |: h
, o4 @% |! K. D0 A
不知有没有办法设置space的limit(现在我找不到这个系统自己定义的队列space)? 多谢指导。& S- U; Q; ^+ l+ `2 _% J, k5 R" `+ x5 @
0 u# i' y0 O" q我的程序是(以前请教过各位):- _) g. ?/ B, z
8 |2 `- p" i* ubegin model initialization function
1 X0 J6 Z" m! F* { create 1 load of load type L_null to P_Creation22 t5 b, {4 J# M7 J: ~
return true : Q& A6 I# |/ F4 k# b7 \- t& i" G
end
# D% b6 c% B: Z1 L0 _) |0 T8 v0 Z& J+ F# I) M
begin P_Creation2 arriving procedure* p \& b% @7 M
while 1=1 do, w& ~3 W+ t5 G4 c# D, `; d
begin
+ ~4 g9 i# `3 h wait for 1 sec
1 g+ d$ M8 C# E2 E" F @! q: ]( K create 1 load of load type L_C2 to oneof(2 _In2,8:die)
6 I4 V# C7 o) a. W7 U7 t end2 F1 x- \, _+ N7 I
end
- Q; X# d0 Q0 n. V, V: { X! M0 i' U6 d/ G0 S6 C
begin P_In2 arriving procedure
% R. r7 D# S! j J6 M move into Q_F2; _3 \' c6 X [& \5 S% l
move into Elevator:cp2
% I/ Z5 z0 g! h7 m。。。。。 |