谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);; R8 R7 S# w' T
begin model initialization function$ w+ K D0 K9 N$ J9 N
create 1 load of load type L_null to P_Creation2$ q4 K- ?3 B# z' F5 w" B
create 1 load of load type L_null to P_Creation3
1 S9 h9 E3 C: f# n1 [" n9 P create 1 load of load type L_null to P_Creation44 z0 V, P. E. n
return true , t4 U4 ^: y. F% M/ d
end3 f5 R+ u8 {) i0 l
. R# y* { y( x8 O: l
begin P_Creation2 arriving procedure
L% i! q6 }% n8 k$ F* Vwhile 1=1 do
% ~3 k; L% a+ r2 t! t6 P begin& b, C$ n- o3 w3 A
wait for 1 sec
% A7 V2 z: y" o6 i create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
7 Z4 u) Y7 @# q3 Y end
+ Q' C. y, k* n$ Bend
" q" u3 S2 b4 i; Y0 m% D1 y/ f. C3 F) I3 N) f
begin P_Creation3 arriving procedure6 I( h' k/ b* ]1 s, j8 h' v! x. M, `
while 1=1 do
% i; Q0 q# i' S* { begin& V7 o1 q1 L1 z7 M [
wait for 1 sec
}4 Q0 S+ a P' R create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)3 o9 T* o4 u" ]- l: Z+ Y2 o
end# H9 N3 a, R+ R) U4 R3 b& D
end
- z5 Z& w o. E8 i& P# f$ I, x0 ]5 I3 N9 H
begin P_Creation4 arriving procedure+ Y0 \7 h8 i8 R0 } h' Z3 _
while 1=1 do
5 H+ t" Q0 o: }- |7 G begin2 y' v6 I3 h8 h1 H) n7 b5 ?, K$ H
wait for 1 sec
; L" h! L' |: [+ y9 L- a( s% O create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
; K5 v& k) E- e( k+ [6 Z5 C end
6 a& b8 }+ ]8 h I! H+ Uend1 \" ~9 F4 U5 G
' V% ~% d' i+ m; B% N1 c6 x# o
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |