谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
, F; `6 Q: T1 _) M( F7 nbegin model initialization function
" C6 H' ~8 i0 j) _ create 1 load of load type L_null to P_Creation2
; f2 Q, q* R# q+ n6 h/ X; F& |) W create 1 load of load type L_null to P_Creation3( Z' X" C: O3 ]% p2 m6 k0 D% W
create 1 load of load type L_null to P_Creation4
% J' r, J! s' p8 H1 H1 P- M return true 8 o& k' S, G, |$ x; u; u
end; E& q2 ^' @/ \& G5 G
3 L6 X! F7 d+ U! i; \
begin P_Creation2 arriving procedure1 }4 f3 _1 q' F0 M
while 1=1 do' d9 h1 w1 \0 P/ A2 B
begin, A8 r0 [/ h5 \% }5 c
wait for 1 sec
3 c$ p' C6 A8 E v1 G2 P! y6 Z8 y create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
; g: j1 `1 H7 x- t end
% x' h6 L' V* P. r" e8 H2 @end8 v; V: h/ _1 d0 e3 I
; Y! {7 r2 K7 K5 D+ M
begin P_Creation3 arriving procedure
( ]1 R! a9 W3 r; owhile 1=1 do
. k; o/ \ U4 w% _ begin' o3 w4 P. b" m" I# p* P# G7 F
wait for 1 sec
. W$ i* b/ e1 \( b( u2 M) ~+ H create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
" j$ h. x3 i+ Z! h end; T! ^5 N; C- q4 a) H$ H/ q
end
0 s. {1 Q$ ]1 d4 s5 r6 {. R: b( V/ n# i0 t( ~
begin P_Creation4 arriving procedure8 `8 l+ L1 J0 {: X! w, j8 I8 a
while 1=1 do5 K$ ]! _0 W! e8 E) \
begin
% ?0 b! ?8 M3 Y- G: A% s5 t wait for 1 sec( b5 a( `$ f$ s# B3 m: J) {
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
% N8 h- Q7 T; U Y4 J2 \& o |+ {, P+ T- \ end
% e4 {; d, d( k/ q5 ]3 ?end* y1 a2 w. N; Q# W* F
3 h6 F, \3 r. w; e但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |