谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
. `5 G, p) g4 {' w# v' Xbegin model initialization function
# B" S& {. r, q create 1 load of load type L_null to P_Creation2" e. ]% I" ?" z/ R
create 1 load of load type L_null to P_Creation3! z% ~7 }4 B' }2 R7 s) {1 ~
create 1 load of load type L_null to P_Creation4
" Z* @# x B1 q1 N! l return true " h) @ V/ S4 z+ @; N% U* |& j5 y
end
& M1 C0 i" Q% x/ F& H: h# ~' J' D. X; L
begin P_Creation2 arriving procedure
. d% D. O$ N5 r4 p, o8 O, bwhile 1=1 do
4 f) N* B* G; ]! x8 ~ begin
, ~: W. O2 ]2 D& W wait for 1 sec' N) p# O1 P6 J0 g
create 1 load of load type L_C2 to oneof(0.2_In2,0.8:die)" G2 u+ \ n$ g- }: ?5 o0 F
end3 h/ `8 h0 C9 ^0 K% k
end
w7 `3 @- ^+ A) H) A
1 I7 a4 Z$ G& ~begin P_Creation3 arriving procedure$ b, `$ d# a, @
while 1=1 do. z; O& q, K% G K0 P& E
begin
( s2 _2 @. v( x2 f- R wait for 1 sec
* B# k& i% `4 h' V create 1 load of load type L_C3 to oneof(0.2_In3,0.8:die), V4 @/ d' Q3 r, s( ]8 h! U
end: {0 F0 [ h9 J* x" ?' Y
end
' K! |# Z, P# j' V' G1 S' x+ T# N2 C C' Z, H& E
begin P_Creation4 arriving procedure
s U0 y; A: R1 }: y( `1 Swhile 1=1 do0 G" A( {8 T s2 w9 n# L
begin
5 m* I# W& r4 g! P. | k6 V wait for 1 sec; N" [& f5 i: H; m% n* [ H
create 1 load of load type L_C4 to oneof(0.2_In4,0.8:die)$ B6 H+ [. j+ W+ |* R1 `7 I3 j
end
. g( G( G% j- M0 b; l- O" p- Zend/ f, D7 ]# e# }6 Z: t
) n; ~% A7 E( v
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |