谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
$ P T- i+ n, [+ T, M: l4 Kbegin model initialization function0 g: M) ?9 _- l: F$ ~2 \
create 1 load of load type L_null to P_Creation2
) J; M8 U1 f* x. E) e* p) h' w/ N create 1 load of load type L_null to P_Creation3* ]3 T: A u5 z R
create 1 load of load type L_null to P_Creation44 V% [0 K+ Z4 ^' A& c5 m0 f
return true
$ M) I; \' z B4 \5 i, G/ Eend' T- N3 A! ?6 F5 t7 p r: h
5 C' z n* g9 ]% r' M; hbegin P_Creation2 arriving procedure, ~2 c1 @ G, u8 V( j/ X( Q( T0 q
while 1=1 do* ^$ A( C+ m& e: b$ L0 \
begin O: {+ k8 f; n [) T
wait for 1 sec% L* g: t. j3 I
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)2 v: }* ~' _! g% q
end9 W0 L3 N$ j8 Z0 Y( S w
end
+ \6 Z, ~" R i; n
1 n, }0 E0 e. G1 r0 p4 jbegin P_Creation3 arriving procedure
0 @( n8 K% w( [8 R6 J' v lwhile 1=1 do5 x5 V6 S7 K+ H& H$ @2 c- S
begin: e$ Y4 n) k4 B6 i; A8 g k
wait for 1 sec
6 J- B/ E% d8 D create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# ~/ \8 g9 c/ B% p' j end
0 b1 h7 k" s+ E8 C* oend ; _) I5 u6 i% W
/ J7 ~# n5 G3 I
begin P_Creation4 arriving procedure
0 u% X3 k% I i3 K2 Uwhile 1=1 do$ {* K0 p8 B a3 ?
begin
: V" m: f$ t0 C& i' p wait for 1 sec
' \1 b3 R0 D: [7 C9 ^ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
* l( T5 V! }' N3 q end
! y/ p2 L& l# Eend& [ F2 N" e$ F) G
. o7 T; P7 ?9 d但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |