谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
" U6 Q/ C( ~& y7 l, `% w% zbegin model initialization function
, _, @6 x- t9 L* g8 ` create 1 load of load type L_null to P_Creation2+ S5 V: ^/ j0 X7 I6 b0 K
create 1 load of load type L_null to P_Creation3
, v' s2 G# T' y, e create 1 load of load type L_null to P_Creation41 `% u1 G% ^2 p2 y, U9 y' }# f
return true ! z/ ]: s! G W9 i8 s; h1 Y
end
5 j2 N; S6 h6 \$ L8 \' {, J: U- u+ F ^
begin P_Creation2 arriving procedure! k* i& b6 d) i7 t; b
while 1=1 do
, i' \; \* Q( W) {3 q5 ^' \5 k$ _ begin* `* ]2 Z$ J% G1 P0 d
wait for 1 sec4 D/ G+ n7 C7 ~! Q! L* Z
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 B2 P' k ^' L9 a end% V$ P x( ]1 e9 a# G4 r
end9 a5 D" }: U, D. a( F, P2 F0 e: i1 o; x# M
" g4 ]8 r7 r. B- \) w0 W+ @% k/ ?begin P_Creation3 arriving procedure
0 b" C0 }0 w3 Ywhile 1=1 do
8 M; C" u. u+ D$ n4 L) M# P begin
9 Y0 Q+ R( p' Y- E a9 ]6 @ wait for 1 sec: j, \9 w1 Z: n; x. W% J4 A9 `, c9 `
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
0 ^" I9 n& n8 c; F% `7 @. m end4 y5 M; A$ @6 t
end 0 z3 v+ d4 H- T1 E4 j4 n, b
, S. q: i/ S/ b& p, s0 @' S: lbegin P_Creation4 arriving procedure$ e9 a# d) H5 f# ~9 ?; |
while 1=1 do
. p8 J% z3 v- R. B' T begin4 Z. R, h( G* s7 ?9 v/ A
wait for 1 sec4 }! @+ s! `' Q
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)$ k, O, M$ t& w. {
end" l) N+ ^+ G; T) E& P7 |2 \
end i e. Q! T/ G9 P: ]$ ^/ Y
( q/ j% G. s( _& p7 C/ _7 L6 {但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |