谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
0 z0 v5 R$ R7 u9 n4 Hbegin model initialization function
7 I6 H+ M. P' S: ^; [ create 1 load of load type L_null to P_Creation2
, m+ }8 }; g7 w create 1 load of load type L_null to P_Creation3
1 J; n+ {1 n6 n3 o1 ?' A create 1 load of load type L_null to P_Creation4
$ t2 X1 Y, g7 ]# \; {+ Y3 W return true 2 B5 _# T& S; M. j( |* b/ _ H
end
/ Z% k& O4 i: [. g; Z' Y3 o6 Z. w7 b. K# X) Z+ I. S3 p) V
begin P_Creation2 arriving procedure: t& n: C$ G- Y5 m& z. O0 z
while 1=1 do- i! T$ h7 ~, c- K
begin3 O, O$ K0 @! F+ F* u: t
wait for 1 sec8 l; l# e9 K* V# e( q
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)" G& j+ g# @1 I( k7 a
end
, o& Q( R( Y; P- {end9 U: I0 t7 e: G5 H
) D/ \% {, a/ \$ F, y; X2 ~begin P_Creation3 arriving procedure$ v9 X2 O. i6 D# m9 h( E# z' Z
while 1=1 do
0 Q, g1 O* _* j& c+ ? begin: G& C% K5 r1 e* ]" ?: m
wait for 1 sec% H. _7 w8 e7 U1 ]- L# Q8 r8 M3 [$ |
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
" v' O! x6 \0 s end
8 s8 W, m" t6 J: x, p9 Nend & f1 @; |! R2 N) o' u4 z. P
: s: c5 H, s. Lbegin P_Creation4 arriving procedure
, B/ l) D( N' D" ?5 Rwhile 1=1 do# b# W1 U1 c- V
begin
. [( @/ J! J q) Z4 o wait for 1 sec
6 s- S5 i" ?# k7 q$ T9 { create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)/ B& h" B) t+ d) g; s9 X2 n
end1 Y, C& M. m3 L2 u
end
+ a! E8 ?' d& R p! x' o& Y1 U8 i
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |