谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);% G( B0 @: g2 D: z3 P( C6 a
begin model initialization function
' I( }2 e2 Z6 K0 f$ \0 A create 1 load of load type L_null to P_Creation2& M. Q6 T9 S! d1 C1 B# @
create 1 load of load type L_null to P_Creation3( v8 v; q! ]5 y( N: v9 e/ K
create 1 load of load type L_null to P_Creation4
4 b) N8 O8 W; X$ K: K% w return true
6 @4 l; v0 a4 o& a: Bend
1 l0 }# \! R( S. E/ B- v& a0 V$ _. E
+ F+ n% Q6 r# `) Qbegin P_Creation2 arriving procedure4 I$ ~; d9 M3 l. p9 j
while 1=1 do
* b1 j) K- b/ A# B6 G begin$ x$ o/ h8 V# b6 Z, @) z3 g6 s+ {1 W
wait for 1 sec8 y- w, ?6 G4 o" s+ R) g# Q
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
' |% {9 V {* k* O. w end( P8 n3 n7 l$ D' b
end; J/ F, Z1 @- [) b, {' e3 x
+ I, m$ y! D, o8 \begin P_Creation3 arriving procedure$ s( T1 \& K4 o5 h7 Q3 u) a
while 1=1 do6 s* r1 d9 j: h3 V. x1 K
begin# L% [) ^6 l: U; z" }
wait for 1 sec# D$ ]% l+ I+ L4 |( A
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
$ n; A1 ]# {2 x0 a end) B f9 M1 d4 Y0 Y2 q2 X
end ! k7 O3 `) v6 L Z- k \ [
/ R- k( w) m- i& X. g
begin P_Creation4 arriving procedure
- q. Z) F# z4 gwhile 1=1 do! \$ g" o# X$ s
begin
9 x, V/ E# u% M t wait for 1 sec
, B% L+ n' Y# K& V" {, a create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
8 g% w* y1 v$ m1 W0 ?0 V end
; ?; \, n" b8 k+ ^end; c0 _) Y/ ^: F/ B( F% _
- ]8 o" [) Y4 ~! q
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |