谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
K% |( |* g1 ?% h; kbegin model initialization function
( n) J. X5 {! [ create 1 load of load type L_null to P_Creation2
2 x; k1 @: F4 p7 @" s1 E create 1 load of load type L_null to P_Creation3
9 Z$ W2 C5 k9 S8 L create 1 load of load type L_null to P_Creation4
d0 |' G: j; C9 ? return true 5 h- k( c& e/ p+ C3 ]
end; ?% [* |) l8 G5 @' K0 e4 ]0 r
# u1 }$ x0 @6 Y0 `, b; c& Ybegin P_Creation2 arriving procedure
# O- ~1 {* r4 @6 Z7 }( t0 K. Zwhile 1=1 do
( H* Y9 v( q. }( u, f# G+ c begin
& U' t% \' s( `5 d$ g' `. d wait for 1 sec
# Y( @7 Y! Y1 c- n create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
# S- |2 b4 E' W: \ end0 G* K5 v% B' P
end, R: l. y: D7 D# d
1 {. v# S, M/ e- S; Kbegin P_Creation3 arriving procedure
& o7 h x/ G7 z) A1 e) Hwhile 1=1 do. M, W) e9 `" }4 w" }; f4 G
begin! E5 P4 c5 t# V! l3 N# ]4 f
wait for 1 sec
2 G, a1 p. A1 w* U0 Y create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die): Y4 m- O$ D& h- o" L8 D: N4 B
end
5 I$ L7 D d$ R* |0 ` Y* Eend 8 c: [" z6 ~; D) G/ z! U6 k
! ~% w5 C8 Q- F$ z
begin P_Creation4 arriving procedure
! t9 n4 [- l% I* kwhile 1=1 do
0 d. e' Y8 a" H2 D# J9 N9 ` begin( Z# Z: J) e$ D2 x+ O, q
wait for 1 sec, k% U& @/ t( \$ h$ o
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)8 n. M+ u; Z* d6 j5 \) W
end9 O% B4 z9 S! W# u% v
end
T) U8 @' Z: C) _0 B- S: T2 e; n$ Y/ Q- ?2 p
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |