用create产生load时,系统先将其放在系统自定义的队列space里,在送到用户定义的process里。
0 ^5 q2 I- r7 j+ N' D我的问题是,希望产生的load达到一定数目后,就停止,直到有新的空余空间(即排队系统中waiting space有限)。9 a4 o `4 D/ i5 U
现在我对产生load 的流程(P_Creation2)和load去的下一个流程(P_In2)都做了traffic limit.但space里的load数目却大于这个traffic limit. 所以模拟结果不能确定是否合理。" r- d8 |9 L- y
5 ~9 s, ?' Z# C6 H! X+ x
不知有没有办法设置space的limit(现在我找不到这个系统自己定义的队列space)? 多谢指导。$ p" w( s7 F5 D3 N. D5 A5 @5 j
7 @1 K; ^) l, b; `. z6 w8 a我的程序是(以前请教过各位):
* ]! f" W* b3 z5 T7 R, x) }
6 @& ~# D. l9 U3 }; V0 dbegin model initialization function
# d) ^8 x* T7 d7 s, Q create 1 load of load type L_null to P_Creation2( [( m T1 r, u6 N$ `8 c6 [6 h
return true
$ g8 v6 U! L; D6 D2 H2 Y2 cend
$ [5 S+ M9 D; p5 U5 }
( ` j. x8 i+ w6 t9 g$ ~begin P_Creation2 arriving procedure
5 P: G. r/ D. P! A1 p I# Fwhile 1=1 do
- [% v/ K% i. l- S$ i4 \ begin& Y, V& U! w! m1 q* l) ^& j9 i
wait for 1 sec+ K; s+ M }- B, x
create 1 load of load type L_C2 to oneof(2 _In2,8:die)
4 k& K. @, K! Y* w. F end
/ L+ `" [) I, U6 Wend
5 t' i9 U$ }) h; D, v/ {" L1 [
, H- {8 f2 [& C+ m R z% Pbegin P_In2 arriving procedure
- q9 C8 d5 t* W8 G: O" g; P8 C move into Q_F2
. A7 ~$ `, h; r; E# p6 u move into Elevator:cp2
% w/ `# \1 G1 A* ~* I) m。。。。。 |