谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);5 }" @( @! }) x- j/ M: @( p
begin model initialization function
9 s1 Y/ u5 x& c# |8 Z create 1 load of load type L_null to P_Creation2. h* L0 E6 o8 S2 K) c3 l4 j s
create 1 load of load type L_null to P_Creation3
5 f( c9 K' z( B, d `9 v1 U create 1 load of load type L_null to P_Creation4
1 K3 L5 {- \3 l o8 v2 f- J) Q, o return true 8 T3 q: _, l7 m: g& m
end
4 j8 H. I6 A) A- k1 Y# Y- A' J# [# `# K% {5 V
begin P_Creation2 arriving procedure# v0 E* w I# e" _
while 1=1 do
+ n6 W' c9 O( z6 @: u; k, B begin
' w0 G; v( i- u' C2 L* F7 Y% R wait for 1 sec
# [5 [; f% W" y create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die): S% Y+ c) k, C k v
end
- ^, t; x, G. N' J, t: }$ Mend; P/ K. C( p0 \- W! J2 Z7 @( `! O. K
; D4 x6 g1 W6 o4 q( T! \
begin P_Creation3 arriving procedure
/ g5 t- G# m9 x0 q& c& mwhile 1=1 do
, Y7 x' H& q+ `( P6 L% A begin
: @" T( p) F8 m* k5 s E wait for 1 sec
; {7 |' O" q& n create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
$ W3 C% T5 l0 I' V" h end: C3 }# _5 N5 U
end / v) [$ j, q. p2 n7 [, M
# K- G9 {4 z0 \0 P, D
begin P_Creation4 arriving procedure+ b2 e: Z1 L4 C) i* x# R, N# h. [
while 1=1 do% u7 T6 g; Z1 z. H3 S; {
begin/ C( D5 f8 M" }9 m7 a! N9 K
wait for 1 sec6 }- S: S# R7 }) [* e) T+ \
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). Q# N+ P( v1 e, R/ J" v+ u
end
1 q( C8 s2 \) ~1 _! mend
% k# V1 @! P/ ^! x1 V1 a' p* P* Q! q$ ?0 \% Y
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |