谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
% e3 l- O# Q0 E# Y8 a5 Tbegin model initialization function& `- w0 b( M* e$ m! ?9 Y
create 1 load of load type L_null to P_Creation2
7 h/ q: A2 C( S( T8 ^ create 1 load of load type L_null to P_Creation3
2 s4 i- v H# _- F+ S2 P create 1 load of load type L_null to P_Creation4
6 x( F$ C& [) \. g$ Z# e* l7 U return true ! h/ Z- M8 M2 l6 B* R6 g9 p
end
6 W. a, a- z+ x+ F1 M4 m8 [& V
/ a" ]) j0 B6 u) i. O2 t% N9 pbegin P_Creation2 arriving procedure
8 `: ]# i6 x' Y! {8 Swhile 1=1 do
8 C( l0 f! A) F( _ begin$ G0 W" j" {' C: q; @/ D
wait for 1 sec
( O, z6 H' {2 Y. S" b2 K create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)% a6 m* {5 @+ d2 x$ o. y. i
end8 s' ]. O1 ~3 O$ s) Q
end
" ?3 [, ]% o$ f, N: h, a
$ u. o/ l, G& Dbegin P_Creation3 arriving procedure
( v. c3 h# W( B8 F$ g" Pwhile 1=1 do" k p# D ?; ]6 t: z* v5 R! z) a9 m7 y1 w! t
begin
# v) d% l+ x; n' D. n6 R+ {7 d wait for 1 sec; _5 S7 c4 B' v9 e0 R0 u$ I
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
0 j* h% z) r+ \: G end
I: S0 A3 y/ Bend
+ j5 a- a ?( Q" q' _
* A. O; ?0 L, |% W6 M3 l2 z1 b; Xbegin P_Creation4 arriving procedure
0 Q& P* c! b. l9 \, cwhile 1=1 do% U4 a1 `6 u2 L- B, B
begin+ y3 i" g6 _0 f5 d$ T
wait for 1 sec
" `' N. x/ f" l0 [ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)3 Z. ]( Z( N2 T1 k
end
4 H$ R+ m0 t( O3 E/ e& ]end9 {- b+ n: z! W' w) O
8 n# x5 S, L; P9 q但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |