谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);* G4 U- K, e8 U. L8 \9 p2 x% `9 K
begin model initialization function: K3 F& S( Z) n4 L" c* n8 f
create 1 load of load type L_null to P_Creation2, r: c6 W! u- S% v6 H5 Q
create 1 load of load type L_null to P_Creation3
3 {1 a& `+ B' ?6 ?) c% g6 B create 1 load of load type L_null to P_Creation4
* Z, @ w0 P( _ return true % a+ X L5 K# ?, _; W# V
end# ~) Q. {/ R' H5 Q5 G: k
4 A$ o" U& C: h1 @! x
begin P_Creation2 arriving procedure$ H1 H3 x1 k8 a6 N
while 1=1 do+ H" X! ]3 h* I {
begin- _ h# F3 @9 N2 m
wait for 1 sec& E1 t# K9 s% h% R c$ \! N
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
, A* m# E# j( E3 u' v1 q& K end
9 S' B/ O9 ?) x0 d& [7 W" V! _end( v0 I$ o$ m1 |) X
3 X6 u0 ]( a6 @7 c d, g2 A' `begin P_Creation3 arriving procedure* X7 Y" g$ C& e+ J
while 1=1 do& M- n+ a' o7 c3 U/ x4 w- \
begin0 J" M* h6 n% s: h/ s
wait for 1 sec
# Y0 F4 C( @0 n: z2 | create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); _( |7 P9 ~# K
end
1 O/ V8 e. v! }1 x7 d, |4 v6 Vend & E' b4 V' W# H, j) S$ {5 T
# l. d. B V5 @! m8 K W+ [
begin P_Creation4 arriving procedure& U3 R4 ^( a- r0 s$ |
while 1=1 do0 u, |3 Y c$ g' f5 Q
begin
* G( e: ]1 k0 O5 b6 {1 H wait for 1 sec
7 B9 j# w$ g7 R create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)1 P0 H. M' A& I
end
) P' B0 u+ b3 o& _' }' I# Q7 ~+ nend
9 N; {4 y0 j# @9 _; t' i3 ?+ r, u" Z) t! z) g
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |