谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);9 G) `7 _' \* W( t) o5 P! b, f
begin model initialization function
1 t9 y o7 x$ x- ^/ g* P; n2 y, ] create 1 load of load type L_null to P_Creation2+ K+ z# f) I1 q4 `4 r# B
create 1 load of load type L_null to P_Creation3
' F3 f) S1 p$ Y3 o0 Z1 K create 1 load of load type L_null to P_Creation4
2 E! _$ O' p) ?$ v) e- c, f$ Q0 B return true ) h P8 V4 ]8 i: s2 `
end: {0 o$ g) S9 v* s
3 r' x% h# _. {+ f2 |- m" e! Bbegin P_Creation2 arriving procedure% }/ h7 P/ v+ @6 @1 O! ?
while 1=1 do
2 v4 u+ B# a7 r$ V" a7 v begin% N# G0 w& Z3 h! o/ c" q. Z7 X/ H3 o
wait for 1 sec
, b& v% G3 [3 J7 l& m& h create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die), p; J- Q! y$ ?* C% a9 b1 P
end8 o2 u" X( `: w, c$ l
end
# E1 H. m. I4 E; Y& S$ S: u, Z6 ~7 j2 r3 Z" K0 @) W$ f6 J0 y# F
begin P_Creation3 arriving procedure
$ h5 [; G( l/ Q: fwhile 1=1 do
" D5 z5 F0 [+ w! X( g begin
: @$ U5 R. ?- k wait for 1 sec
3 \$ r" ?2 w1 w) M: V9 x create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)3 b! {* O. h$ w8 y- c9 P& ?/ T
end
1 b* h8 ]4 j- E' N* e& r) _end
" P! P" S( L" d- p! X. W: G; a
, x1 a/ |; m) v/ ]8 R$ H; n Bbegin P_Creation4 arriving procedure
6 Z: Z1 \6 ^, Z; }+ U3 H: awhile 1=1 do
; P5 Z+ M+ q" [& U2 g! ] begin5 s, B% w7 e- @- s, A
wait for 1 sec+ e! T3 Q4 ]* j% s% s
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). W0 u- K4 _# c% H1 ^2 A7 _
end) }- w5 J' Q& W: R9 m
end
4 {7 R6 y$ O5 D% ?4 V: }3 F, V6 U# p7 Z! d
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |