谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);1 T0 [. `0 h5 {+ y: ~+ c- M
begin model initialization function) I K. S Y1 }$ r1 M
create 1 load of load type L_null to P_Creation2
& j7 D+ D% g0 C+ f create 1 load of load type L_null to P_Creation3
9 _0 a H! g% X2 d/ g, X create 1 load of load type L_null to P_Creation44 I3 a+ E5 K' M4 V- U0 k4 s# p
return true , G0 `+ j) h& Z [" t; h) F- w/ y7 d; k
end4 y5 |/ P* q: i1 t5 A+ q8 I ~( k
* G [2 t/ B/ Z' Qbegin P_Creation2 arriving procedure
) O, F" a! y6 p& Lwhile 1=1 do
3 B; D$ O7 x7 p3 B9 u5 Q begin
v1 S: j3 K" _ wait for 1 sec# y1 ~3 A" S* K3 b1 t
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
& I7 W: C- m& m3 n# x( v end% P/ |, i5 {5 R+ a
end* L7 x X( T+ v4 A* O3 ~
5 l. S5 t# g( ?$ N( G
begin P_Creation3 arriving procedure
* w) _* @$ k7 x/ Q Wwhile 1=1 do
! i* J9 L9 H( Q/ ]& r' ^ begin
" _7 [4 o2 I$ l, R wait for 1 sec# r+ D- l y9 M$ e1 w$ i' Q
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
+ s: s- a( }) E% O5 W end
2 B2 A. R1 t, C3 Uend
" n% ~" c, }3 B Z7 d9 t
5 L+ D2 k4 S, m7 Vbegin P_Creation4 arriving procedure
# j8 b9 L/ y5 y9 o$ p/ ywhile 1=1 do, {1 B# ^* K& i
begin
4 M0 y+ J) L% a! S' D wait for 1 sec
o* q- k" k# K/ ~ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 K( I# z( w. R) o# S, B8 r end6 X6 C* o6 B. Y8 E
end0 d. N( _: C, z3 _6 W0 F
- r3 l' X5 D9 M$ Z: p
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |