谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
& `2 J) }- d q3 Rbegin model initialization function
' P& p' k* j' ~( T( y- M create 1 load of load type L_null to P_Creation2( T# R. c4 }1 v5 V" n u* K) m" m
create 1 load of load type L_null to P_Creation3! K( X2 J$ I5 o
create 1 load of load type L_null to P_Creation47 a3 Q6 H/ N- z* k: a
return true
5 O/ f0 |7 ]1 S, lend$ c% _4 e* E& w4 g
1 O2 c% A+ ~) G6 s x: f" lbegin P_Creation2 arriving procedure
/ T8 L# R; V3 R- ^1 y4 _while 1=1 do- D! @+ A/ o7 Q
begin' |: L( Y% R/ F2 A( W$ s% z
wait for 1 sec
4 E$ c ~# Y9 X5 d( N1 B create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 y* h$ F0 V. [: o- r! \ end6 i3 ^# k9 r; U/ q2 |, P
end
* Q7 i. Z, o5 ]+ T# M! B5 d, d) q: B, |$ Y7 X- C f" f
begin P_Creation3 arriving procedure
( n& q# ?3 ~. }4 |$ V' w, mwhile 1=1 do$ P0 i- C! l8 T) T# b! A. i
begin
7 t4 T# [9 a6 x5 U wait for 1 sec3 C, q1 {# }9 g% M4 Y3 D
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)' I7 L2 f0 C+ h( ^! Q+ h W
end/ o& h7 I* `9 ?* ^# \" {2 {' A
end
! L% Y4 h9 ?" O' B: _# x$ g( s. Q/ E, k+ B4 S% B2 o
begin P_Creation4 arriving procedure
$ H* y# O$ B- c5 n0 L. ywhile 1=1 do
& f: \ K0 j" i1 m+ D) c# e begin
: M/ Q P- L+ j- M wait for 1 sec8 o" L7 H1 }/ f3 g: L5 S
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
1 ?/ `. M) m. l, k, C end" m$ E9 x* [" X: g' w
end
# O4 D9 g2 [' e/ U) X3 I
$ y$ Z4 s+ A) ?但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |