谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);$ J9 ~& o. Q3 v8 k; ~6 @# R. K5 n% f
begin model initialization function
5 T+ l2 f. o0 N: p v& | create 1 load of load type L_null to P_Creation2
: N* ? T$ X7 V# R: d create 1 load of load type L_null to P_Creation3
: v( H# A2 v8 `( x8 ^' R) k create 1 load of load type L_null to P_Creation4, X& C ^3 g( |7 p# Z" w
return true : W# {2 f% L6 X% [9 H0 N9 f
end
9 f9 a* D& X/ X3 \( J
/ B9 b" m% w+ x. l) \begin P_Creation2 arriving procedure. Y3 R+ k; i$ T. M( I8 K$ S( {
while 1=1 do
3 e/ d9 ?) l- b" w( M+ G begin
& h5 O. S( G( r# r. `3 t% d$ g& w5 C wait for 1 sec) \3 \2 ~2 G: r6 m0 r( @: s5 j
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)7 O3 Q6 T9 w" |
end2 n7 o8 _! s( Y" {/ t: M
end
( Q3 U$ s1 {: _- s, I# C: u, V6 z. ] v1 i( @7 b* K' q: E
begin P_Creation3 arriving procedure5 k2 ]* x9 u; V5 A5 D5 x
while 1=1 do
, i M2 m; E* ]3 q/ s& ~9 A, L. N begin& r% G" Y+ ^; _& y8 T* `, g
wait for 1 sec6 n4 H: j* {7 d2 T* V+ f
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)* d8 [. {8 i4 D4 [
end
+ b1 j1 x: z* F" @+ aend * F' n6 l: ^, U, J; c, d
$ ?$ G' d6 f$ Q3 A" w# I1 u ?begin P_Creation4 arriving procedure& _5 @1 n* l' K
while 1=1 do+ h3 n8 I& K* f) ?) S
begin
; m4 w+ V! M8 J# w' b1 O wait for 1 sec
$ P6 X: f, |; t2 {" _2 g create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
" j2 y3 [% @ \' s4 b5 | S end V6 e* O* a' i: Z
end
, D' s8 P+ }6 v7 M1 w
2 X' x, R: L) M但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |