谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);' O* P+ S3 G3 a7 ?
begin model initialization function
* E" j! \0 |# c i create 1 load of load type L_null to P_Creation2) F- D; `. j7 d r+ W
create 1 load of load type L_null to P_Creation37 G" c; G" o% \% k$ D, b8 }
create 1 load of load type L_null to P_Creation4
S- G( |7 Y4 \ _ K$ _ return true 7 H! J; M0 F" x8 S# C4 U3 t
end
3 P2 \9 u& w6 w% M7 k& a. _
# q9 c/ h( n2 X& E5 |+ \begin P_Creation2 arriving procedure
0 X: h: P7 v! f/ u$ J' \while 1=1 do
9 V9 r8 O, m) u( H& m/ j2 Y3 Q' x begin
& e8 _( f* A9 e( R wait for 1 sec5 q5 b, w; d& a+ [
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
* w& O4 j8 p# Z& a1 ?9 D- I end
* f7 ^* U% F. k! L4 i9 p/ Q5 u+ Kend
: G: P o& I0 v/ V4 E- t8 C2 D; {# N! s
begin P_Creation3 arriving procedure
+ e2 G% L4 Q- @9 |& P) }5 Zwhile 1=1 do" B' ]' Q/ F: n6 h
begin* }( Z" g% p( v
wait for 1 sec
( Y4 h& R5 s; a. G0 k# I create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
5 A- i" o. T( Q, A' x end" M" t; v5 U# f7 E2 F
end
* U: W( P) q: _+ D; u7 H3 Z5 G. d" i
/ J! m/ I, F! N; Q) T9 Qbegin P_Creation4 arriving procedure
+ g: B0 V8 }5 t3 V) Y+ `while 1=1 do- @ {" K. W9 i2 A9 h7 h
begin3 L; a# W% Q4 B) p$ b
wait for 1 sec# D/ }7 \6 s, h; C5 B2 w* z
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 b0 y- e) ]0 c, Z/ V
end
5 H( W" W- D0 K5 G3 Z' j) Z ], nend
& o- g' l4 g! E- a( H
/ @, ]/ {5 V4 [, i$ D& X" I6 i但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |