谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
" n. ?# c% w; V# O& F: Fbegin model initialization function& O& ~) b( W0 {# q$ k$ t2 K
create 1 load of load type L_null to P_Creation2/ F: P2 I; E) Q' p1 v. {
create 1 load of load type L_null to P_Creation3) v% @+ b; E! _' O* r
create 1 load of load type L_null to P_Creation4, h0 S/ R. w. }- R: q
return true
w5 I( F$ n* L3 G$ `- U/ |! oend1 f( [9 I: u; R( e
3 x9 _; D/ R; z5 \& S' cbegin P_Creation2 arriving procedure( ~; ^% o7 p7 A4 _
while 1=1 do
6 f: P8 t. w' P begin
, F; |0 P6 e: a G+ s wait for 1 sec- {( t5 ]+ [1 F! Q" l: M- q
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)' c" ?, Y7 ]: h# X) W6 c/ k
end
1 r6 t9 _5 g$ o$ @2 K, Bend
; M- m O" ^ _. K8 t# I0 x
: I' P, h9 C; X) ~' W) vbegin P_Creation3 arriving procedure. H* o0 J) f0 f: P: S g, u6 Y% Q
while 1=1 do* J7 X# z, Z8 q# M) v+ Q. B" a9 a3 x
begin" s) J! g' J0 U5 `; G1 S( h9 _% o
wait for 1 sec
% O5 P' i9 j, l2 ?- p- L* E, f! ]4 T create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
, a% r* B8 \: W4 @' I* W4 v! S end/ V3 Y3 i c- ?
end / \4 v; Y1 l( k2 U' O
" s9 }2 ~7 V- n5 E: l+ f% jbegin P_Creation4 arriving procedure
) y% [, }0 M/ L( Z" q1 F- gwhile 1=1 do$ y. A0 o6 I0 b
begin5 P* S4 C* Z+ J- K/ M& @
wait for 1 sec
2 |5 o, a0 j) }4 f8 V create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
# `% k! m; c' b/ c" G! Y3 S# H end/ {, a/ q9 g9 H0 K; u+ }8 c; i( A
end4 @/ h8 [) T. I$ x* A) a6 [
, ~3 o0 n$ g- s9 R1 X但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |