谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
) B0 E' E3 g7 Ubegin model initialization function
1 ~1 v8 ]" @: _; R create 1 load of load type L_null to P_Creation2
. T4 M6 F9 M3 o; ^0 g T create 1 load of load type L_null to P_Creation3
3 C/ |( i& p; M$ W6 b create 1 load of load type L_null to P_Creation4( J5 {9 T! D# Y4 R; L% P
return true 7 ]; k, f' f6 f$ T( ~8 _! U' m
end3 H8 i+ |2 X( P) N: R6 O" B
X! ?! V: t* w5 c
begin P_Creation2 arriving procedure4 v: J* d+ Y+ u0 C1 k9 }0 t
while 1=1 do: O( n4 o, Q* x+ I
begin! A" X' [- Y1 L/ q1 u$ |$ n
wait for 1 sec
9 e f8 S g3 z' |( H) Z! S create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)4 C* [: ~9 @, D% |' N
end
+ e" T/ A: L" D1 C( S) ~end
. l5 G5 @0 w* @$ Y- h
: Q% g4 A! V, P2 o& \begin P_Creation3 arriving procedure2 r( U: t* a8 D, L( k3 P
while 1=1 do
1 R% w, ^ `( ~ begin5 {8 A/ x M! V0 [
wait for 1 sec
1 l: a6 t, Z$ n1 O- t; N create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)0 n+ F5 s/ Z2 q
end9 j, d6 Q3 I! \! e+ N' H0 S8 G
end / {. f( {4 B# l4 r
! ?0 O- X' i1 Bbegin P_Creation4 arriving procedure
# O" ~! M' F7 W0 M9 rwhile 1=1 do
# A, T4 m0 ?- J p% N- f begin
# F6 R2 I8 I' B/ d, L2 L wait for 1 sec
0 n+ t, S. T/ y create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)& B* V7 z% {% y
end3 z$ a. \! u1 Q" J
end
0 B1 }8 `! I0 Y( D3 V2 i
3 z( z" W; l. A/ m2 I' Q0 ` T' X但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |