谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);$ h6 c1 i* O r+ a
begin model initialization function' t2 r, D, f0 a. A1 Z: X
create 1 load of load type L_null to P_Creation2. j2 {# x# e2 `4 U# N6 `
create 1 load of load type L_null to P_Creation3, s3 U6 b8 V$ q; i
create 1 load of load type L_null to P_Creation4
/ C6 O. u P; I% G, Q; s: b( ~$ } return true ! A1 \' c& A6 Y- d% w
end
3 ^/ _& _, e6 @' R( |# r- W8 L0 [
! ^3 l* H$ f7 R$ b3 s! e2 jbegin P_Creation2 arriving procedure
9 K; I% q) G- Y" f- Z0 cwhile 1=1 do
( q) \$ Q W9 q( B! D5 ` begin
4 ]+ d& H/ D0 [. F8 m5 g1 ` wait for 1 sec! {; n2 n, C% y% O- U+ }6 g
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
% u& t2 w7 d7 t; s: r* K! X end; Y4 V& f+ a/ o- G0 i" ` W& H8 t
end
! X( V0 j3 K, h& H$ U3 N* k) \6 G) v l9 w
begin P_Creation3 arriving procedure6 F& g, a v ?
while 1=1 do, | ?6 p; {1 L" Z- C0 R
begin- Y" O& g# {, v9 n5 } M* V i
wait for 1 sec0 ]- F1 N* k5 X& V; }- |' B
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
+ n \: u' x8 _. p" v end1 A) M& p. {3 z! Q8 s
end - O! ^5 `% I8 q1 h1 z
6 {* x1 P2 a9 n) f
begin P_Creation4 arriving procedure
/ N$ |. Y; {: W7 h: y. T# \1 p$ ^while 1=1 do% `( G* O; m5 ]6 x% G
begin
2 K: L9 m1 ?4 ` wait for 1 sec4 E/ x9 t. I4 \; b J1 }' \1 A( y2 [1 s
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)) E3 t) { |% a
end2 E/ U) {) e9 _
end0 Q! m' B$ N* F, H, C7 s4 N4 S0 P
. Y& l4 @9 V( v. }+ k1 Z
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |