谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);0 O* k( C! k0 {7 L2 F! j. ?
begin model initialization function1 d5 q& F9 q8 L, r9 |' s% \
create 1 load of load type L_null to P_Creation23 o; s! [& H9 {7 D" o+ I
create 1 load of load type L_null to P_Creation3
, T6 v2 l1 J( e( W create 1 load of load type L_null to P_Creation4" @7 ?9 m' K2 Y: y' r* X- \* g
return true 7 I$ \ w) C" _, a
end" Y3 f! G$ D' M/ r: V
( z, X c n" h2 C2 t
begin P_Creation2 arriving procedure
& }. @4 a4 q1 e! Vwhile 1=1 do2 g9 s1 x- W0 O9 R8 v) e' t
begin4 y) ]8 w4 z, v3 A5 i8 J
wait for 1 sec+ k9 ?9 T# _1 x$ b o* Y N% V4 N
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)2 k9 s" C) L3 u3 V2 p
end
7 @% Y6 i) V6 W3 X* g5 E! bend, L; p: a2 V( p. u$ k7 J( o
+ p/ e6 C& _8 B1 W. ?
begin P_Creation3 arriving procedure
3 k4 M. p1 G7 n6 N' u$ Q$ |/ r" {3 [while 1=1 do
0 r T5 i' Q f' H begin
. m! M9 _: P2 t/ a& F, y, x wait for 1 sec
* R9 K; a, W+ u4 K$ E create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
& ?& e4 y* G y$ K& ~3 v9 P, x7 g9 r end! O% @+ l4 Z. b: Y$ F7 [
end
' d3 r" A3 {3 `7 ]9 C, t
?% e, D- o/ i* Y' Zbegin P_Creation4 arriving procedure. q4 ^) [8 O- a9 T
while 1=1 do$ s/ D; o4 K$ Z2 g& s
begin4 Q! U, A. W& K$ A8 _
wait for 1 sec
) l( Y8 Q+ E. l- T0 w8 M/ ` create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
& `$ K% e' v, \4 \* Q end; ^% ~9 b* D% _' \+ M
end
8 p- V" p3 s( ?: N/ ~1 f: t, j$ D7 U! j3 p1 h
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |