谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
4 a9 k G+ Q. fbegin model initialization function
) k# k$ h% n4 C2 V' E/ J7 C q) f create 1 load of load type L_null to P_Creation2$ h4 c0 P3 P6 V7 Q
create 1 load of load type L_null to P_Creation3
% H! Z R! r, B3 f/ Z: l" S4 j2 r create 1 load of load type L_null to P_Creation4
0 c, M1 L% U& l, Y& b6 k3 D return true
& Y. x5 `. J! U" fend
3 b! e0 s, Y7 d9 @! N2 w+ @, P: F* H
. Z7 m+ B+ @: M, N0 ~begin P_Creation2 arriving procedure
3 l# N: P& n6 E9 p( vwhile 1=1 do# A; }, H5 D& i! F7 i, F& O8 ]
begin5 R* ]* X# x' {& d% a
wait for 1 sec
$ R; |; O1 m* @3 |% L7 [0 u: } create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* s/ o0 Z2 K6 u
end9 n ^5 X V% j5 o2 Y* m( K
end
) {6 r. ?5 S L3 V$ i9 B* N$ J" x" [ }) J9 B- L( G- i+ T; N
begin P_Creation3 arriving procedure
, ]: D; i& |7 n& B: lwhile 1=1 do$ k a% b8 C+ A6 J D) K
begin5 ?" o2 X% ~& w# u5 h+ n$ N3 R
wait for 1 sec
! Y- |$ p; l I1 H8 w6 T0 l create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)$ _5 B$ {( M! J+ z* z: P
end
( |$ \) |; E! m6 j! Q3 Y& q6 Pend
- d1 T: i7 ~; r3 a( x. ?; m$ D9 ~/ @8 L1 [
begin P_Creation4 arriving procedure& g$ S( U# m1 A
while 1=1 do
" H2 k" ]* `7 h! l/ y( E) w4 [' ]. M begin4 m3 Z, f- a8 A6 ~( d0 C
wait for 1 sec) f( N Y" D: W8 o8 n3 Q
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die): R4 U3 V$ ]7 Z4 E
end
* B! m$ T0 k7 H/ Dend. G, X$ j: o! D3 k. x
" V# {! ^0 o2 N: \
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |