谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);/ ? V0 w; T- O) [0 Q! I
begin model initialization function
( J* h5 \$ D5 J1 t! b7 K create 1 load of load type L_null to P_Creation2, `' c) |# z- @( A
create 1 load of load type L_null to P_Creation3
% M6 X6 }' n* G, }1 |, W create 1 load of load type L_null to P_Creation4
! E8 i( W, e! E4 @- I return true
" @' @/ r, C& _7 q tend1 \, n* x" ]. R0 A% P
' C) b/ Q3 F3 I4 V, c
begin P_Creation2 arriving procedure
! S' P; o; q9 T! iwhile 1=1 do
, @0 i! s( U: B6 |, f begin
' c% |, z z' q% U7 I wait for 1 sec. _. R& l9 w8 I8 s% ^
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)2 p9 g- d$ G( l1 Y: t( F/ N3 s( ^
end) ?% a5 m5 _ d" _% T; P$ v% ^5 {
end
9 i. z; E ?5 P* e+ U6 O/ i# x( M- X0 }" M
begin P_Creation3 arriving procedure2 Z2 ~7 L6 C( M9 I3 j- V" ~# @
while 1=1 do
3 }! q& O; o; L9 [ begin0 w6 B. A6 c; O6 Y" d1 d3 f
wait for 1 sec
9 d# F' m; m+ z6 X: V create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
1 w p5 O/ M( p6 q Y8 x* `9 W end
* ?$ t' y- p: H; q; z! Z2 Xend : q ]! q% ?. `: P: x2 }: b
/ y# m" e8 ^: L& @" Jbegin P_Creation4 arriving procedure; h# M/ ^. x$ a, o
while 1=1 do: u9 P/ k% b* m$ x2 }0 j, k
begin( J3 y- ?' Z! c" ~/ ^1 t
wait for 1 sec
4 c$ m% M- o6 R; k8 b6 G create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 E9 y6 q9 }" K; C end
, ~0 U7 I* ~4 f2 K# M) ~- Z7 zend
4 h, y0 h+ K, A; g2 c/ ?, w6 w5 `* s& i2 S" O+ U4 w% y
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |