谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
7 _- M& U( i3 B: r k, B' qbegin model initialization function
# t+ q2 Z) a' ?- r* O. `' f( f# C. @. d: F create 1 load of load type L_null to P_Creation2
3 m* c+ ~2 Y+ R create 1 load of load type L_null to P_Creation3
& j |" [& {1 c7 W create 1 load of load type L_null to P_Creation4
8 E) c8 j2 D2 X' A3 T- X return true
2 d4 }8 a+ f2 Z' uend
6 r7 Z5 y6 E8 M: S8 Z5 k2 l8 V* }$ e' a5 T" Z8 q; C0 Q4 u$ m
begin P_Creation2 arriving procedure+ H3 i; Q3 P: I: Q5 |7 n
while 1=1 do6 |7 ^" L" n1 R% z( B. d8 C" v0 b2 w
begin
* D( _# p' a. W; Q, w, l& r wait for 1 sec
, l+ D9 @& Y3 {1 b; p! f create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)6 d1 i0 y5 `8 t% `3 W, [
end" D1 G4 j( x0 B% }
end2 r$ M7 g: k( ~# O+ `) x5 E, O
" ?) O' a( h) J3 e4 i3 H" j/ s
begin P_Creation3 arriving procedure
7 a' A9 B# b* E, Q) D% pwhile 1=1 do; g% q! S: d) D
begin
( u5 u: I! o1 `. Z" D wait for 1 sec
, W1 |! U3 K; ?3 H4 W7 [ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
R7 f }' ~; r% T% ? \ end6 z# _4 [" ]) n& H m+ U
end ) Q3 X8 o: }& ^+ N) w) z
q D- i: S: i9 a3 z2 z9 B* E3 ]: zbegin P_Creation4 arriving procedure
4 P: m0 m9 C( u3 n" ?3 h9 Uwhile 1=1 do
% [! g% t/ }3 a7 p4 z begin1 A! b2 _, Y. X* J7 r* p* w
wait for 1 sec b- T, [" [8 `, Y+ v! c1 |
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
, Q' J' ~* c) m& W end
% b- I7 P! O6 ]6 Qend* B! z$ W! G& ]9 l. J
1 C: \4 l k+ q. ?0 t9 \
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |