谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 S. r5 M" p# z; zbegin model initialization function
. v, l4 i) G2 R; j& r& q& P create 1 load of load type L_null to P_Creation23 j6 z( Y' }. S7 z6 ^0 c0 Q7 L
create 1 load of load type L_null to P_Creation3
8 N& }: D' ^, q4 \$ q3 B create 1 load of load type L_null to P_Creation42 C+ e2 m( y0 Q$ R/ x+ A/ }: P
return true
8 Y/ m& O) |8 C6 A9 K+ S* N' Uend$ Q. m! @ @$ c
+ e' R6 G7 ]' d- I4 Z, D! A
begin P_Creation2 arriving procedure" o" m8 v( j7 w+ r" |
while 1=1 do
( O5 H& h0 S( W1 g, x+ j4 O begin
) `5 \$ s/ i+ M wait for 1 sec
' ^" D8 k; m; a create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
& x& O& n! O6 v% g$ F: ~/ P end
7 o$ {. N# j$ Qend
8 u5 q0 F8 C( d6 T+ J" J/ Y5 q+ r( ]/ ]$ d; J' u4 v8 `: d
begin P_Creation3 arriving procedure" q7 t t3 c$ q4 R, r" l. ~2 M4 m! W
while 1=1 do
5 U+ L' T1 l) B" N* E) v5 D begin
5 g5 ?: }4 |5 S# u, L9 \6 }; V wait for 1 sec/ o* A/ i! ]" d) k0 E5 T1 v9 x z2 g
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)3 K" l& ]8 O# i- P& q
end
/ k0 d6 M6 _1 A! \end
, k! w: v5 F, } j: N% d: e3 \* W6 n& m' b
begin P_Creation4 arriving procedure
2 o# F% q. n) bwhile 1=1 do. y9 q$ M. z) p5 c8 _ @4 }
begin& K4 e* y9 i4 M2 P+ B0 d
wait for 1 sec
# W5 ]1 d% e" s6 `2 D) e create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
/ R3 N2 K1 z3 {% D end
8 E0 t6 U( i5 @; Y! j7 m& Oend8 d+ `& j6 e$ F* ]8 N% p. Z
v2 h1 _- ^: r7 e* |' u* M
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |