谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
- V! v' K% }' O8 i& o# J1 @9 Fbegin model initialization function
' e/ w9 \# v+ I8 V7 j6 e' U& [ create 1 load of load type L_null to P_Creation2
# o" b+ Z3 [# l create 1 load of load type L_null to P_Creation3
& ~- G2 s% b1 P" N- T2 | create 1 load of load type L_null to P_Creation4
2 x2 A( p( ~" Z7 V* f7 k% {7 U return true
3 _9 n: P; X$ l- i+ U& p0 cend2 F& E, T/ v7 V- h, B' x
$ Q) o0 G1 D- a% a; jbegin P_Creation2 arriving procedure
7 i, p( B: y3 |8 ywhile 1=1 do6 }- h/ I$ u( w( d+ W! J8 _
begin7 H2 r# s; [: z6 n* S- t4 T
wait for 1 sec
0 Z' w9 @; ~6 I$ H3 a create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* Y) F2 S" P( g2 o
end; T; z5 `6 a7 w+ e( S; |
end
- h2 _) c3 c( U! u- N' m7 o$ e% y. r$ v3 Q
begin P_Creation3 arriving procedure$ y4 Q, g8 J+ K. J" i7 b" @
while 1=1 do
. o, ^% k/ l1 o' A: T begin/ T' m1 W, t0 K- _+ g7 `
wait for 1 sec4 j. L4 `# H( h/ }
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
1 K. a* C) b/ I5 E end8 H1 n: }( r, d9 T& X: ~) d# m; e: t
end , C* ?: {$ V- x: `" o! G7 d0 G0 a
: w5 Y. U0 x! \& Y0 g
begin P_Creation4 arriving procedure" n! c- G! G% d$ V# Y
while 1=1 do
% w. R# M' \4 X" u begin
7 N8 n5 c' \& O0 T' B) i" H4 R, J wait for 1 sec5 w; F7 m! U# N; k8 E
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 D3 i3 S' b0 I" u3 j end
( T, Y1 l2 ?/ g7 send. s/ z+ s2 _) j0 [2 \4 z5 u* t8 w
! O+ }* w" X. H/ I* s但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |