谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
4 \: @$ r5 u) q& G0 zbegin model initialization function, H1 i% @6 E8 q, H
create 1 load of load type L_null to P_Creation2, _; u. d4 r9 ]; ^/ D5 F
create 1 load of load type L_null to P_Creation3
! j& r4 R) L: z7 I K create 1 load of load type L_null to P_Creation4
2 d* B! I& F9 A+ Z) k return true ; K. H9 Y* B; ?7 @$ A5 W+ {
end6 L9 q& V* m8 ^ w6 n& D
0 d3 h. I Z6 B: h" v" M
begin P_Creation2 arriving procedure
9 N3 w' T u# Y% E: } Xwhile 1=1 do4 H' b+ |2 C4 G3 R$ @2 q
begin
% q$ z1 m) ~/ c) k- x wait for 1 sec
& _. Y# ?& D2 M5 s% x5 a: H- X create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die). b' F2 b/ U, N& d3 ~5 w, G# \
end
& e0 P3 z- Z$ n' F" @( N% z" N$ Zend
' e, }! N6 g1 y6 _% i: u- t) d
4 e1 S5 `( Y& d; ]5 W7 X& Abegin P_Creation3 arriving procedure% y; w0 R2 E5 g
while 1=1 do3 w9 f" L" ? l+ j! R, W
begin. k) l1 ?* Z% h x, G! \1 W
wait for 1 sec
: c3 S3 T# j4 E( I! m create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); Y5 X j9 A' a! J3 j, N
end
4 S/ N9 i: b) B; Eend
3 l& W+ }- |7 O$ \3 w( j2 e m0 W2 a% D; ~1 Q& F
begin P_Creation4 arriving procedure
1 b b. K" A! c' T: Swhile 1=1 do
( f& _) k- ^" Y& w( s5 S# T begin
% B( T$ y; v) P" f1 O4 ]* ?, V wait for 1 sec
( L$ @2 V C# P' v/ B2 r create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)" F/ F+ |( j8 A3 q$ K8 e9 T
end
# Q" @, a) [+ d! hend* K0 d2 q) H0 J2 M" l
k/ c, m I# {+ G( a0 j6 c9 a8 D
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |