谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);) N- P3 ~' Y+ F0 d* H
begin model initialization function
6 a* R+ b4 Y" p% m7 V create 1 load of load type L_null to P_Creation2
0 P5 @; _2 `, @1 y create 1 load of load type L_null to P_Creation3
J; x+ b1 w! J create 1 load of load type L_null to P_Creation4
; `! w3 }* I, d, r" O8 p return true " q- W% _: B1 n- U& n4 S' Q) c
end% Q$ t1 d2 g V& v, h1 Z0 I
+ G; o$ Q$ O2 t5 t
begin P_Creation2 arriving procedure
$ x# l# ^4 L: j# t8 }while 1=1 do
, @, j# E5 h0 r" b$ [9 d& h- S' } begin
( n; a: A3 y$ x% s wait for 1 sec
) O' f: J4 E. N- ]2 g5 ? g create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)" s' N3 t! Z& j2 I: \
end% o( V8 s' H ~1 i
end/ x5 `5 G9 k4 B( T3 c1 H( g$ }: K
/ N" ~) }8 y2 r5 I- N
begin P_Creation3 arriving procedure
. ?, L9 g1 |# ewhile 1=1 do
, E) }& c" o! u9 z5 F. b begin
8 ^; p, B0 c' P5 M& P# I1 m8 X wait for 1 sec9 [/ M2 t4 f! v) w
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
+ D- r9 w- U+ P1 L end
; }2 F. j' I9 ~+ cend 0 L- W3 L6 ~7 i7 l9 b' P
6 }, M, _. b1 e0 ^9 O4 d$ C* Abegin P_Creation4 arriving procedure
5 l Z9 y8 x8 ~0 d$ g* Qwhile 1=1 do
& |3 V" P# k2 n& M0 h: ^7 ]6 { begin
+ p, f3 S, W% k. X wait for 1 sec
/ n* j' ^2 S+ V4 L: Y% F create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( \2 Q& A5 i; s6 |& s end
& g, J/ q" K, P c1 Z- {end
7 d; |3 ?" f( c; y
5 H( Q$ `, ~" Z% F! m! o* ]但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |