谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
3 B' z( n* W; i4 y1 N0 Tbegin model initialization function
6 w# w( e3 g4 _: ? create 1 load of load type L_null to P_Creation2
: P5 C! l3 X d# T7 [+ B3 O# T) Z/ \2 ~ create 1 load of load type L_null to P_Creation3
' k8 q1 O3 m* S7 }: ? create 1 load of load type L_null to P_Creation4$ j- b4 o: c( a3 L3 S
return true
! k4 ^% j4 \; q# @end
& w% G! C y0 x- g& c, j D; Q: n0 A3 h9 X5 |1 x
begin P_Creation2 arriving procedure
% e4 l9 `* [1 Pwhile 1=1 do
5 G6 M% m, Y8 G. f, p6 X5 i% R begin: C" k& L# ]2 G5 d
wait for 1 sec
B- G0 j! H5 @7 [ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
0 m3 ^5 K0 Q! h3 }7 z/ k end# `! l4 ?' Q, t# o' G' A
end
( l* Z, w: b# K; d' x. P, D5 p0 G* v. I# u, `6 @5 A
begin P_Creation3 arriving procedure, S# Q& Y' W' q* }
while 1=1 do% k1 q8 ?, j i# F( ~$ L
begin; L+ F2 T$ b& I0 s' X" [$ e
wait for 1 sec
/ F$ B7 I) r9 ~% c3 u create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)) g6 Z; f( I# d% x
end* C; L; }6 P7 A6 c7 x3 z, ^0 F- i
end 2 Q) p7 b' Z0 ~, g
+ A* Q4 g; r5 S- A7 v- }* R7 b
begin P_Creation4 arriving procedure
* \2 G @0 ^$ l+ E* {while 1=1 do
; [+ a+ b- } J0 h begin3 P0 M g. I3 e) }4 ~( h
wait for 1 sec
! I4 ]# N/ `' z create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). C& i3 W0 d* z) ~$ H/ \
end
; C% `4 s# \1 s7 R( J4 q" Dend$ n. r" A; P9 j0 P
; ]6 V* I) X: z/ h
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |