谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
3 p) Y/ d6 R* f5 [" x' E2 ~( `2 Obegin model initialization function! `2 X+ g/ B3 u/ ]3 s
create 1 load of load type L_null to P_Creation2
9 |8 d) l; J. E4 f& k, n create 1 load of load type L_null to P_Creation3- g' a' D& ?+ o4 p! ~
create 1 load of load type L_null to P_Creation4; ~+ \5 y3 ]- O$ M/ r4 w% ?; C
return true 4 d5 P7 C1 y" _6 C9 d8 ~4 T
end
3 m& ~% _2 y# f/ Z$ p" d0 v4 \0 N* G0 }5 b. O @5 d7 D/ l1 t
begin P_Creation2 arriving procedure) S/ J" m: | y# ?
while 1=1 do. r( B" V/ N$ ? `9 }1 j5 o8 d
begin
7 v( W( F8 B8 T/ h3 N/ a wait for 1 sec
% n @3 r8 h3 ]1 P create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)& D& `% m' Q9 D x
end3 q+ M' |& p: S+ ]5 r/ }! ^. Y$ z
end
: F% T+ T8 x2 T# d$ `' m0 J" R+ P, r A
begin P_Creation3 arriving procedure
, ], ] |- v6 P; e6 @while 1=1 do. H# s& A6 g9 z( q
begin
, r9 h: t/ U5 j8 }( b! t' ? wait for 1 sec
K7 {6 V) D& ]9 _# R create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)- P. b/ R. n! U+ ` v c5 J
end. v( ?( l* ~6 S2 X5 o
end
4 F/ _7 G7 n# L* _1 k* {7 y0 b5 |
' y2 u( }9 X# Y8 wbegin P_Creation4 arriving procedure7 h! V* R. i! X5 u0 t1 b2 r2 l+ K
while 1=1 do
6 A/ n0 t/ Y7 _/ m5 j+ X, M begin O. J9 l% {& F0 [4 q
wait for 1 sec1 ^8 N$ ^+ S2 E5 l
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). |: o! R# O' Y9 ]- d3 A. H: n$ J
end
$ Z$ ?% J8 K) x& e0 Gend
0 A! V5 I2 T7 c! |8 g* r5 }% ]# D: J, n, y
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |