谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);; K& h3 q" |' Q
begin model initialization function
1 u* y3 G! N& [1 ~# n5 h0 `5 w; o( I create 1 load of load type L_null to P_Creation2, Q/ h/ j, S6 @% S; ^' _0 s
create 1 load of load type L_null to P_Creation3
6 l8 p @3 K4 R create 1 load of load type L_null to P_Creation4) d/ E5 U, q6 a
return true / k2 v% k5 Q; q/ [# U
end
! a- W0 Q& E/ N& E. t7 d' \. W
0 P J+ y. `; A( H4 lbegin P_Creation2 arriving procedure' d. D# Q: T3 \" A
while 1=1 do! Z, M* k9 d" e! b
begin
4 ~7 l$ h0 i+ q, q1 C wait for 1 sec8 N# T/ x/ W) ?' e! s2 b7 J
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)- K5 ]# n# z0 Q
end+ K; P4 E8 j$ q& s# ]3 {
end8 N. E2 _* C4 w! u1 w7 r
) i3 H1 p0 b) \) H, S
begin P_Creation3 arriving procedure
& O Q. K0 x# l. b, I- swhile 1=1 do
, S& ^" h, c4 r+ |1 l# u* `( m begin, w" q& ~! y+ m8 X
wait for 1 sec% K% E2 l: H9 y( [- C) T
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
% c' E4 Y/ W, N9 G C# P% B) t end5 C9 \3 s% e) l7 K. \# @- ]
end $ ?5 j; U# m7 y6 M' Z3 V F3 e3 }
* j0 |& ?' h9 L1 i9 Ibegin P_Creation4 arriving procedure% T" V# t/ e3 M8 G3 I
while 1=1 do: e$ s8 S7 f! ~' O! y: x4 X
begin
* }% y2 f2 D) l: T# O4 W y* p wait for 1 sec9 S" M. u1 ]2 T
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
! I) c9 X2 q7 s" N" k+ E end
% a" j) S5 ]* x/ Dend
: [6 d4 r0 ?( |3 z( q+ T. c" ]6 z, }0 H8 X& a7 V# F& ]) O, h
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |