谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);5 o/ e: ^2 U( w' r
begin model initialization function
7 r. d" T% ^, o1 d' e$ G create 1 load of load type L_null to P_Creation2
6 D p* a F; ? create 1 load of load type L_null to P_Creation3& _" k- o _3 W/ E" I q4 W; K3 X0 ?9 l
create 1 load of load type L_null to P_Creation43 A- R# x" W' A) c3 K. a; N
return true 7 O; A: E, V* Y% b7 b' ~
end. A) l! N, X9 B! j0 m' m4 k6 ?
- @, k$ U0 }6 T! T: Rbegin P_Creation2 arriving procedure. p- V( x4 M8 Z# Q, N9 p
while 1=1 do* \% R3 W) {$ m U+ y$ }
begin
# M+ y9 f7 f) n. |2 b wait for 1 sec2 S! K2 O% D* u
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)( e7 O5 d! @# f2 a
end: H w% c8 T: S2 @, b$ N
end8 r- O+ Z( p. B
# \- a4 H- k8 r3 Y1 z1 g
begin P_Creation3 arriving procedure3 L6 C% o9 f% T' b d& Z4 W: R
while 1=1 do! g3 l: H/ o* h) x( b
begin! i* C7 ^$ W! c
wait for 1 sec7 d- n3 g% g, Y/ C D! R S4 Q
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)+ E# J8 b6 \6 g( A \- ^
end
Y( h! ?1 x2 Uend
C ?) l/ U- k2 u- M6 I- l$ y/ |* P# ~
begin P_Creation4 arriving procedure
8 e& G9 u4 @% q) Z8 cwhile 1=1 do% n0 L# H ^9 x( b J3 H
begin, S5 L% t5 A( U
wait for 1 sec$ S7 a* K8 K& b; {# p K
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
- R/ R. w" ]# `( ?3 x end! u! V. f1 m9 d# j$ L
end
7 Y/ U. x1 o7 K" X
, s, l3 H( Q$ G! M$ k# V7 a但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |