谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
* x* E+ S# g3 T8 E: gbegin model initialization function3 j- E5 ]; o& k" A( H1 |- W
create 1 load of load type L_null to P_Creation2
3 \& r. J5 E+ S6 c4 k create 1 load of load type L_null to P_Creation3, `3 z0 y2 u& Y& ]
create 1 load of load type L_null to P_Creation4
! n) d, W, v3 c4 Y" G return true
/ L+ k6 R1 E- x$ Zend
, Q% }( y4 v( R# b9 m/ g
" U* @" ?+ t# j6 `begin P_Creation2 arriving procedure3 b: m, U" h4 H
while 1=1 do
/ V: L" [$ ~9 _8 w: d! C: u begin2 |% Z: C) H+ D) n/ @6 k3 i
wait for 1 sec
1 f4 b3 g: F6 K" m6 Z( q8 u3 h3 r- ?) X create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)# _" X0 d9 G+ q' O& j! ^$ o: }
end
& }9 b$ l5 i! D2 Gend
8 B# [5 ~3 u6 r9 Z+ c# c* Q5 J! w/ g& j9 g1 v
begin P_Creation3 arriving procedure- n0 j6 Q: m5 C3 O: q# [9 F
while 1=1 do
2 J( V0 |7 Q& M6 B& t9 K/ j begin
, x, K- C* I9 L9 s8 b' @. s wait for 1 sec; M. q' W+ w( e1 l+ h
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
, d) w' ?. v7 h7 x3 m2 F; K) Q1 n end6 X5 m& R7 A# P* b7 E0 P/ U) V
end # B8 T" i8 H6 N8 Y. G
: k0 o5 V3 o! \+ t4 S
begin P_Creation4 arriving procedure
% y: U' D" Q; A" xwhile 1=1 do* l8 x$ _1 N% Q* v
begin
3 H, e7 U" |$ ~$ m9 d. e8 c. h wait for 1 sec
0 W c7 g# `+ P+ P& v: F create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die), H* y8 J" d$ z( z, z- b
end6 I' P- ]5 L S
end" ~" n/ ~% K$ B) _/ p9 L% h) v
1 L& y3 @, I' d: A" v5 w
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |