谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
% n" s. k; N6 Z' [7 A. H- N+ Wbegin model initialization function
( ~: h! J$ L2 O* U: \ create 1 load of load type L_null to P_Creation2- _0 C7 O f2 `
create 1 load of load type L_null to P_Creation3
# G1 d Y1 R/ T) n+ @ y! i' ^ create 1 load of load type L_null to P_Creation4
# A2 h3 Q3 N" U X! W return true
2 [, P) `! r U4 send) V! f+ o6 i3 S0 e* S
5 G9 E! \) {) U/ P# D( `begin P_Creation2 arriving procedure( T* [$ T9 r3 n4 z9 g: `
while 1=1 do
* e' D) X, F5 K begin
! R: Q6 c% ?8 n& o# G; b7 a wait for 1 sec
) d- Z8 z! \" W6 ^' w create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
* \2 A$ y( Y0 s9 v" k, R end
0 I* q- W# g5 G7 j, Zend
) n5 ~- x$ V, D- i2 n' G$ x" }' q" u( s
begin P_Creation3 arriving procedure8 E+ E; b2 W4 }) h5 i' L
while 1=1 do
2 E) P$ W; ]8 Q3 G6 o9 M begin
4 f& J2 s+ _7 g# x! e" N. _ wait for 1 sec
! C' k7 s: D, C: k# @ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); L# m- o6 P, ~1 V5 O- k
end' |; o& [% `! h% Z
end
' Y+ v# C! L3 u5 e6 _, `% G
0 b A9 z5 O/ I+ V" H8 [2 I6 ]begin P_Creation4 arriving procedure
$ f" q' R3 Q5 A* Mwhile 1=1 do0 l! b5 k! x J, t/ k
begin( c3 F/ ^9 V7 B
wait for 1 sec- a4 e3 I' j8 t1 e( x# r
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)0 K* I7 {4 h- m, c1 c; f, z7 W* w
end S8 z+ @0 ~, H8 S# \" h
end7 |: l) G$ I0 w! Q
* {1 n! M9 }, F: g5 B" ]0 b# A% `% _
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |