谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 Y' J& n5 ~6 A! A! _$ [begin model initialization function) C1 B8 z+ F! `- A0 k* \6 \
create 1 load of load type L_null to P_Creation23 T6 ?, Q* d# r
create 1 load of load type L_null to P_Creation3! I3 c' Y7 V; L3 h# F( n" E. N
create 1 load of load type L_null to P_Creation4
`* z+ `# V# ] return true
3 D& ?# x" o9 i( g; Aend
- D% C4 T4 \% \* J7 w2 E0 {+ ]% { X) l9 R$ m- ]- I
begin P_Creation2 arriving procedure
" V8 C+ q; m: Awhile 1=1 do
' s6 I/ @$ x9 N- _ begin- ?3 T$ {9 |8 ?) q
wait for 1 sec
/ J% `+ x$ g: ~! \) P/ j create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
. A6 P8 ?' V" I: \) E end. {' O6 @$ a! ]" N8 m" q0 T K0 E1 C6 O
end
2 B7 s8 x, P. c0 b2 x. k9 W- Z8 J" P$ L: ~1 b0 o
begin P_Creation3 arriving procedure
. U4 G5 p; A8 }while 1=1 do
3 I/ {! X. d, w begin
' o' H% u' f- k9 w$ l% U# T8 I wait for 1 sec# j$ |- K$ o- B2 @8 L
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)9 K$ e6 i9 @, s9 t3 v
end
" g2 ?* L2 v1 S. j7 f, Kend 1 b' Q t1 I5 ~$ B
* V( m, L. I8 ^/ W9 _/ Kbegin P_Creation4 arriving procedure8 j/ K7 o2 q2 a0 M/ g' q. [
while 1=1 do
5 J7 h7 j. U, Y8 w7 ? begin5 m' p0 b2 L% b2 a, ~2 q |
wait for 1 sec
0 T/ Z2 _& l& M8 \ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
5 Y2 x, n! h1 I+ W' z" I1 P' K end( c1 L: ] f1 a
end% N2 W5 l5 _, L3 ^ O8 A
, Z2 i' z' t6 W: h* y( Z- U
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |