谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);4 x5 j* t! Y8 q3 u0 K, O) }
begin model initialization function
7 F& y* F% e/ c4 K; N6 B create 1 load of load type L_null to P_Creation2
* a, f/ _$ |7 d! M2 S create 1 load of load type L_null to P_Creation3
# \& A' |: z0 U+ x0 p create 1 load of load type L_null to P_Creation4
5 F# E: C; L. x8 v; w return true
& _5 V2 V3 ^# o6 L; ^end
7 Q2 I2 J) Q; {9 P7 K9 u4 n r
; y8 Q$ q7 S8 x/ k1 [, Lbegin P_Creation2 arriving procedure7 k0 ~% t5 G$ O# r9 O
while 1=1 do. r# ^5 {2 D* h* |: b
begin& m* r7 l% S% q6 W
wait for 1 sec3 X8 J2 Z; v+ ~ d+ ~2 g% ^
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
) N3 ?% V5 @- M7 d1 O end o5 l) r/ v0 D3 l
end
1 [$ y& N3 T( s- ~; x4 q3 H5 h. \7 P. K( U4 J$ K1 D, Z
begin P_Creation3 arriving procedure
' J6 L! O' j, \while 1=1 do
+ B, t$ [% B2 t% L: w7 Z begin: Y, R: _) y$ Z0 v6 R
wait for 1 sec
) W2 c( V% _/ F, J1 V! n" S( _ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
' L! a: |* p- M' e+ L$ l5 \9 r- I) \7 D end
3 r3 S. a" I9 h1 I! Y6 Jend
) T+ f, T, D0 f, i- y! u
/ l! `7 J9 h0 Fbegin P_Creation4 arriving procedure
6 L4 `* T0 S$ R* d twhile 1=1 do
, m, S- h) W2 ?8 G$ `6 d d' X begin
. W4 f: O# c* _+ K3 G! @" u wait for 1 sec3 h8 @: s" @' P* `/ x
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
+ ~ f/ S$ }0 v# e! s end1 h. |2 I' j Y2 o
end1 q, |$ C! t& d3 T
8 Y6 c6 F+ U6 N/ e9 Q, w+ g" r0 C4 _
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |