谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
& m a9 p+ Y- |& Q; kbegin model initialization function5 q: h, C$ Y0 X1 M( S' h. Y: ~
create 1 load of load type L_null to P_Creation2
3 x% Z$ b. K5 f" ?& n create 1 load of load type L_null to P_Creation37 u5 r. N% @% E
create 1 load of load type L_null to P_Creation4
/ o: Q4 k* r) @6 R4 g return true + R' K( t& P; S7 |# a
end% S/ E7 y* B3 `/ E. P
% U7 H# E6 F: V
begin P_Creation2 arriving procedure% Y' Z8 | \! m) P
while 1=1 do5 K, _2 u7 s4 R
begin
; ~* I4 _ b' }* Y: h# R1 _8 a6 z wait for 1 sec
) h* @- y d: u* O: o3 \ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)1 a5 m! ^: n3 |4 i
end
1 r5 S8 Y$ a$ O8 o( e# w3 t9 hend% q, z: Z; s& W* {/ u+ r" a0 i
# j% M3 [7 i6 p: r8 C9 x, pbegin P_Creation3 arriving procedure
* k+ g* @( _ X) Ewhile 1=1 do n( k8 E- I$ x5 r8 _6 u( f3 A4 i7 n8 O
begin+ z U z; D% S* i
wait for 1 sec6 v8 O; C0 c- A0 f# j, a
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
( g1 i L- Z5 v* n. R end; L5 Q) D% a% t% o) [
end 0 L8 o: ^. R* q8 k3 W3 ~
9 B, y2 c/ a" H2 z
begin P_Creation4 arriving procedure) I ^8 H9 |; W8 r: {& _" T
while 1=1 do( D, n; L( M3 G
begin
. T( A. p* g4 J, h wait for 1 sec, X& \+ S1 p' c! v; O4 a
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
8 T- K4 m2 a+ E8 v end' g7 G0 e6 a* y1 \* S$ B$ |+ K
end
* G$ q4 F4 ^* J% w6 s! b6 a5 L. w) A+ F; Q$ |
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |