谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null); U% P$ S: P- C
begin model initialization function* t2 b/ y+ ?" C/ U
create 1 load of load type L_null to P_Creation2+ z1 p$ e$ l9 V" e3 s r6 V
create 1 load of load type L_null to P_Creation3
. ^5 l: ?8 A: N1 t( N create 1 load of load type L_null to P_Creation4
$ f1 X8 Y9 J" _( s2 q return true 4 @- g) j2 A; f( |! l) S% ?8 S
end
0 N, g* C; e, T/ k$ F
$ m0 K" x6 d# }5 E, F S9 W: Ibegin P_Creation2 arriving procedure
$ O4 X3 u# m, c: `* Ewhile 1=1 do
! {( a7 w9 C: e |2 N- G begin2 }& I. K% e2 v5 i2 `1 R
wait for 1 sec
/ F) A/ }9 C$ b, N: T6 ?$ n- D create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
# L Q: _- ^" D# n' v end
4 a, z v8 b ~end
k9 _6 p3 L: [. _) A) T; @- B N/ _1 v( V* p
begin P_Creation3 arriving procedure
! Q0 @8 `# m; r+ `( _* X/ ?% g4 Cwhile 1=1 do2 X" o3 K8 |- N# b: w1 T
begin7 e5 V9 @3 l$ P$ F2 n
wait for 1 sec) r+ i* u! b4 D0 C' v! R
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)8 w& T. K. w8 P1 M) x/ N+ t" x
end
3 X0 r5 N# C6 e: a( nend & S* a2 C n5 U( u* Z
$ K& \3 h$ C, j% A2 E0 _begin P_Creation4 arriving procedure9 H: n) h e/ M {5 Y
while 1=1 do
3 i) n, ? P( T/ G4 l begin' {. v8 r! k" C; o4 r
wait for 1 sec
4 d/ i' `' c: v' k' t create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)- y8 d0 \6 z5 P
end$ \! I4 I& P8 {
end% k# m/ y+ y. ?, t9 d
3 Q3 g2 C: x1 ?, F. V: l' [
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |