用create产生load时,系统先将其放在系统自定义的队列space里,在送到用户定义的process里。. c9 {- Y' R, M. f/ }( {. |$ @
我的问题是,希望产生的load达到一定数目后,就停止,直到有新的空余空间(即排队系统中waiting space有限)。
( u# X# F$ U% m7 {& V现在我对产生load 的流程(P_Creation2)和load去的下一个流程(P_In2)都做了traffic limit.但space里的load数目却大于这个traffic limit. 所以模拟结果不能确定是否合理。
@4 f2 Z& @( E' A" B3 K4 P2 B, B' `
% R4 B" I' C) p: ^$ y5 ? T不知有没有办法设置space的limit(现在我找不到这个系统自己定义的队列space)? 多谢指导。
2 Y* a j+ R4 \( B! d* [
' X) m7 b! @, g6 v, [6 s我的程序是(以前请教过各位):# e+ f" L: c/ i* z, w/ _; j
" P( [" K' \; x2 ?begin model initialization function' ]0 M3 S% X8 X; l' |* n
create 1 load of load type L_null to P_Creation2" \2 r l, ?. n/ C+ `5 W
return true 2 \0 P v* w( ?) R t# A( t1 U
end
2 S0 ?) \: `0 D2 \! m, U; X
9 b6 t4 J, B, sbegin P_Creation2 arriving procedure/ s, _4 X& b) }; r2 Z
while 1=1 do8 ~. b% g2 ?/ v0 T% a
begin
! x4 p |1 u5 I6 X wait for 1 sec# H: v2 ~: a- b+ x
create 1 load of load type L_C2 to oneof(2 _In2,8:die)3 S7 H+ V' B' Y+ }
end& X/ l n( H. k, l! n
end/ }0 B8 b7 Y/ y
* o* V. y) |* A, {' \8 G, q! M
begin P_In2 arriving procedure" b" O% s: ]0 s% C- x
move into Q_F2! D. P: H9 M9 s3 c; p" e
move into Elevator:cp2" Z$ G9 N/ o, N. u
。。。。。 |