谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);8 d- G, h/ Q8 I9 _- l) U/ p2 _5 {
begin model initialization function% Z8 ]+ j1 B- G( D
create 1 load of load type L_null to P_Creation2
. J" k4 w$ S$ \& v7 e create 1 load of load type L_null to P_Creation3
& I% W- ?6 g) s create 1 load of load type L_null to P_Creation47 M; d, G+ W% M
return true 5 H8 U7 Y# Q7 Y+ Y7 z3 H2 [
end8 ]5 R" Z' F; d
% [/ F. n6 @. A" ~8 z$ C
begin P_Creation2 arriving procedure' Q& S! ]2 j+ d4 k7 v
while 1=1 do
5 L# y1 O/ b: Y0 X+ h. H begin
" v2 @' @- f& p' j wait for 1 sec
# Q; {, S+ x4 E X1 d0 [0 @; c create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die); _5 t T5 d' \% Y
end) I) O4 H- X* b( u1 X! \9 w( }* e
end5 { H! I! t( P9 ` d9 v+ ]/ M, O
, p r6 X" D# b3 u: {& gbegin P_Creation3 arriving procedure5 A# A1 s# A4 Q V* a, }# F
while 1=1 do6 J6 u9 r3 |* g6 o2 G0 o$ _
begin8 X) x& t \* v) t- b$ a
wait for 1 sec
; g5 B. U, k( w! q q# ]4 O create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)# Q4 s6 |! @, H# A( W6 ~
end4 R: p3 z2 E. J# d3 o
end
7 d& E% x4 X0 x ^, ^4 h3 h
; p }4 L9 [# R3 e, h3 ?3 \begin P_Creation4 arriving procedure9 j6 F3 `, {* B/ A) ~8 k7 f
while 1=1 do6 W# b- g$ a9 I% Y! l
begin5 n' \1 G; \ T
wait for 1 sec+ ]1 I% b/ G( `
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)' l) ~6 Z, t8 J
end
|: [, U7 _5 |( mend
; z# f. ~( }& R$ j; D ]# |3 d& S# L: u0 g) {
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |