谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);, W3 _6 o- p2 E5 j% ]9 U" v' f9 T
begin model initialization function
: K m# I) i/ A, \4 G" \ create 1 load of load type L_null to P_Creation28 ^* c s( ?& T9 |
create 1 load of load type L_null to P_Creation3
; q' m/ s5 o* f9 N) I create 1 load of load type L_null to P_Creation4
: d; P7 M1 C* H; e& r; v/ t return true : k- ]; T- e9 G8 A
end
" U4 d2 Z4 _1 b f% m! h# A1 U7 l. P
begin P_Creation2 arriving procedure6 s3 n( Y; A4 R/ r' F _
while 1=1 do2 v% @$ e; J) z! k5 w+ Q
begin2 p& Y+ w) p2 F) O. L- b
wait for 1 sec
- @! K: p- L9 A1 q5 V& }% h create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
G" \3 M { O [ end2 R, l% a8 F8 [: U3 R$ E6 A2 W0 k
end* K3 p- R' s7 l m7 w
0 K$ G; h3 Q( {6 t1 Kbegin P_Creation3 arriving procedure
+ \5 c: A/ o: t& M& Twhile 1=1 do
+ A5 P* z; M8 v2 D6 I8 N1 r begin5 G0 D# M7 }' l# _, [& t, g
wait for 1 sec, n/ B) j* L% U9 T+ D9 d; R
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)5 t- \0 {( u" V" g
end! D- @, M0 G5 o) T% F
end ) {8 m6 R7 J0 b* T
8 ]- X u# Q! u" s9 _begin P_Creation4 arriving procedure
4 }: A; y+ n) Z8 m1 b. k; hwhile 1=1 do
$ C5 F( P: d/ f- u( ^ begin
7 s. X7 F0 Q) _- d4 N% B wait for 1 sec V7 `1 q2 Q0 u. D s6 K, [, m, [% Q
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)( X/ t) w0 _/ a
end1 r( f' Y% Z" B
end6 k) ^3 [4 p5 s
4 T" M/ s6 g* ~# y
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |