谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);0 p9 _) v- B' @! K* e, L, n& P
begin model initialization function& `5 U- j! q( @9 S+ k& n
create 1 load of load type L_null to P_Creation2; v) l A- b9 T+ O
create 1 load of load type L_null to P_Creation3
0 B4 r- T; b7 n" Q# t7 e& L' B create 1 load of load type L_null to P_Creation4
I& K- a4 ]& R0 y v7 ?- _ return true ; X* N/ }3 J! m/ G( l9 Z2 `3 q+ K
end
2 p3 T6 h2 o5 t" [0 ]( u* q6 x2 N- B4 H2 h# o( p
begin P_Creation2 arriving procedure& C$ h, w0 q' T
while 1=1 do4 D6 S# h, a3 @, g1 X, ]
begin
/ s+ d9 n7 d6 a+ }" Q wait for 1 sec
7 J( a; @- p- e; R; o/ f( { create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
% ~# u2 L* k; K: W end1 t1 J3 {1 e' ]2 V2 X
end( K& s4 v% c+ x) u6 M: ]5 L; c
! |! `1 _- F7 `+ }
begin P_Creation3 arriving procedure: [- A. w5 w5 Y* V2 d7 G
while 1=1 do/ u0 a$ w9 @* }! C+ W- O
begin4 ^8 x& G Y% s# q
wait for 1 sec
4 ]6 p4 k9 V% H create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
' J& l$ v& w& }: ~+ ] end3 s7 u8 ]* u: L3 W
end + x5 ]# j4 S- F; g/ d1 d0 a
8 l8 r0 n! d) ~4 k7 h5 V
begin P_Creation4 arriving procedure' @, C. m" F4 N9 R2 T2 P; K5 C
while 1=1 do p# f8 a, Y' S& _8 ^, N/ |4 Q/ M9 u
begin
! T. z8 f7 {* X% X6 J+ ]. w A7 b# L/ u wait for 1 sec8 H7 L, x- C8 x7 ~( n
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( i2 z7 P. u j end/ e Y) D9 K( o0 `4 x
end8 H5 |' x8 F) o* ]- w$ P
; f. Y) U; @/ i/ }) K但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |