谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);6 l+ U7 I" F. e' u# ]1 L0 R
begin model initialization function
. P' d4 Y7 I3 i. x6 a# g: z6 Q. \ create 1 load of load type L_null to P_Creation2+ o! l! x" Q$ i9 g2 E8 W0 Z# Y
create 1 load of load type L_null to P_Creation3
7 j( a$ B% u m- I create 1 load of load type L_null to P_Creation4
% i% D3 S7 R% t7 }3 \ return true
& j6 J2 r. \0 C( Y8 d# Fend
7 p* i8 m3 T0 w, F5 D7 f- s& J' A7 F0 P9 Y. ~; g7 I# ]- K
begin P_Creation2 arriving procedure
- V/ y7 W. Q+ P0 ywhile 1=1 do
( b- h7 \5 b; Z0 ]7 ^4 h/ P' Y begin( l2 s0 @4 |7 [' q! _' P
wait for 1 sec
* B1 z, X: B& O# c. z' n: B create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)$ m$ L( c! V) T
end8 c$ X Q; O' ]0 g& j
end' C4 ?8 w$ J; B3 P P( D
& n; U9 E8 I5 rbegin P_Creation3 arriving procedure
/ m8 r5 } s: ]: bwhile 1=1 do
7 }, s. f t; W" o begin
& O8 |3 Z' W0 A) E0 l6 `) ~. c4 D0 N wait for 1 sec
6 n% N- m5 @: K) C g9 R create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
4 b; o7 a6 \! _ }# N end$ I$ Z8 ^5 Q4 k
end ' L2 ^" V( B, @2 v- y
$ i1 C& `! C! D0 O9 ~/ [begin P_Creation4 arriving procedure G( k( U& }' d4 v5 b! X; q
while 1=1 do
& \) e+ d9 l9 \ begin/ a* r5 B+ `7 K# X! C
wait for 1 sec
' [2 {, [& x; w5 E% a create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( F# x/ N; A, ]) t end4 d; [: s9 O& \: ]1 B) a& }7 E* i) M
end
" q, d: T8 e \" W# l, W4 H1 u2 r# l$ I1 W
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |