谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
3 n& S, }+ b# c9 ?) Z2 c1 y/ Ybegin model initialization function3 e$ o* N: w% G* z$ [; }$ {
create 1 load of load type L_null to P_Creation29 j0 W* W, \3 [9 z# o, I+ N( i
create 1 load of load type L_null to P_Creation3/ ]7 X9 @# T" W0 o$ D v5 Z, O
create 1 load of load type L_null to P_Creation4
5 O2 y$ q6 ?4 z3 U5 T6 W return true ; Q# f$ X9 g% L; _! [- c
end
! Q& U# H! ]& w# O8 u0 f( x$ _' i2 H
begin P_Creation2 arriving procedure
( _2 G' k1 I( |! d y% @ gwhile 1=1 do
2 }" f7 ^! F ? begin
2 e7 Q6 G7 Y( @# R) ~ ]- p" J wait for 1 sec
4 r9 I+ b0 M9 N1 Q create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
5 G" ~9 B' w; _0 l0 g! o9 t) K5 C end
5 A% z* F o" cend
& B+ B: p7 S5 I- w! x" x2 M# u9 F) b
) O# B5 Y2 X3 O7 o- m) Xbegin P_Creation3 arriving procedure: ]3 r' h0 n) c" y2 o6 z
while 1=1 do
6 `; O9 q9 O, [% Q, I8 X begin
% g* m1 m% V& n7 ? wait for 1 sec3 E- q9 n* F) n: _* O% H; V
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
9 U- f8 r% J5 Y5 q2 H6 J% J end( b6 D+ j, E6 L# w1 H
end 3 Y1 _. h. @+ f: t1 \" k+ H! P8 P
, P. F. |% ^) t) ?, w
begin P_Creation4 arriving procedure
1 k$ {7 ]6 D+ B8 a1 Zwhile 1=1 do
. ~, N2 Q' S) q, E% J& k8 |5 U) h begin
' I8 a3 O6 ` |/ |& x4 g4 B9 N wait for 1 sec, |! m( }- @+ E8 Y
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)( b! k% n* H+ G# d
end
; s5 V9 g9 A% W& B5 [end
4 A' C8 H) }& o# |# w
, o8 ?, n6 D' P6 F4 ^. U, O但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |