谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);3 Q8 N8 B) x6 S( R- [1 C3 [- }
begin model initialization function
5 ~* o4 n y0 N create 1 load of load type L_null to P_Creation2% ?& d7 q+ U8 _! X) _# `0 q! N
create 1 load of load type L_null to P_Creation3 p3 u a2 g1 u* A
create 1 load of load type L_null to P_Creation4
* [8 J: ^ Q; j) U# E return true 6 \7 q) T- v; |9 w+ x
end% w" F0 K( e$ D. A
9 x: N8 @* R) h* i2 {
begin P_Creation2 arriving procedure+ m* h, j3 \) ^" y/ K. `) [
while 1=1 do4 b, o& ?: X+ ]/ M( w' x% ]
begin
$ h9 A' u# }4 V& ] wait for 1 sec
( m/ d5 }/ k$ g- t( ]; `- N create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)" Y6 s( T, [3 Z; _7 x% e# g, o
end$ Z/ {" k) |+ j+ V& D( p% m" S- J
end% Z% F& l% j* O, ~! ?
' \/ e7 h1 E4 Y$ p" t
begin P_Creation3 arriving procedure
% A! e0 Z3 j1 x! E1 r% U' a# jwhile 1=1 do/ G1 G, y) q8 p
begin
) G0 s* i5 b" W. N wait for 1 sec* j0 l" V) z4 K% {# [/ U
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
" Q3 L- l: k+ [4 P9 h$ l end
7 X8 Q. B2 Z2 qend
, v/ n- y {4 X
3 C$ T6 F# d: {; Z: {begin P_Creation4 arriving procedure
8 c1 b" j6 w! ]while 1=1 do+ b+ Q( x: x9 ^9 {3 Y
begin @# I3 ~1 H' |: l5 q) N5 a s @3 W
wait for 1 sec
% E/ u) e8 e: S6 R create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)3 x( a, o5 d2 P: Q) I
end
; y: i- s, ?0 Z) O4 Pend x/ \% n9 _* Z1 L( i2 o& v# v
6 ^) Z/ q! a9 K$ y o; K6 \
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |