谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);2 X! i- L% |; ?$ ], H; I
begin model initialization function* R7 r* V0 N6 k" [2 L5 |. U, i8 W
create 1 load of load type L_null to P_Creation21 u& B+ g! b* G2 s( n7 e+ H
create 1 load of load type L_null to P_Creation3* n" c- t' K5 D, f3 f" X) x% M
create 1 load of load type L_null to P_Creation4
7 m& k" M. V3 h" t8 e& a% s( I& l return true 5 e* X, z; }! m& f0 l+ ` T0 L4 M
end
& {& I: p0 T. v9 C# R! `* e" L( G
! M% r O" s; vbegin P_Creation2 arriving procedure5 h2 A0 m/ E0 ]3 C
while 1=1 do
; N" S. g( h; q0 K begin
0 O: _" M: X- [ wait for 1 sec& L7 V7 [( t- i' u/ r4 {
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die): b1 [- O! N3 v) f, x& q
end
9 c# x& V9 A$ W- k8 send8 M' C% J, q, T6 y$ M- v1 x
: K9 j4 s4 ~6 @8 i i6 ubegin P_Creation3 arriving procedure
9 \& ^! E: a0 {while 1=1 do4 ~% G# U4 {$ K9 c2 h" C- k( v
begin& _" [+ A: p) s2 Q+ h3 L
wait for 1 sec
8 [4 I* {8 [6 L, a$ H create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die), F; A8 S! {4 C, w
end
7 n6 L$ b, l, b% ~- Send ; s6 l, l% q9 {' E5 g
3 ] @: ]1 ^+ }- T. x+ K% K7 J; r7 y
begin P_Creation4 arriving procedure
& Q8 M7 d+ ^* N4 v) Fwhile 1=1 do4 G4 k* U+ ~* O3 L
begin
1 Q" \7 v8 e r6 C& A wait for 1 sec8 |* @: l' ^9 }, f
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)* {! @) O, {, ]9 o* C. p
end- V2 l/ N) M' E o
end
8 W: \3 O0 h- j' r- S; h7 L# R* C+ ?5 i9 h( {
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |