谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
& O: X- ]! B9 l1 j Ybegin model initialization function0 p4 X {" q8 B. H% t! U
create 1 load of load type L_null to P_Creation2
2 M1 I5 v9 m9 C5 d, ?2 i create 1 load of load type L_null to P_Creation3
' Q! I$ m; \. z7 ~ V create 1 load of load type L_null to P_Creation4
* W7 w, L+ O2 ~; L; _9 c" q \4 Q return true
6 b( T- H1 J0 `8 zend
! g/ d9 n% Z" z: F2 z9 E; v3 [* x( Y) s9 t7 ?+ d5 [% j: L2 [4 n
begin P_Creation2 arriving procedure
+ D1 P5 e3 V2 T$ X3 B0 \ mwhile 1=1 do
) H, V( C5 H+ b" h& p2 c7 G begin
/ ]* j5 ~, q% ] wait for 1 sec3 L1 c v. `0 J; W6 o
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
, ~, F& W d% D, \. \& p end% O4 Q0 |; `" a: y
end) _! R( K$ |& c
3 A& Q) j/ l9 @1 R2 @begin P_Creation3 arriving procedure
/ ]4 X7 E3 Z! r" Jwhile 1=1 do
% P- [# \0 T1 g0 p7 F: F begin/ t, z1 r( A1 P) [6 q8 Z! t. E" d
wait for 1 sec
7 K& c" ]9 v K: u9 K7 } create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)$ I7 `# }! u: P$ n3 k
end
$ I! ~$ J7 @) Y# bend 6 p5 g, j3 q; s6 \: T# l$ C, z' B
6 o& h' x# k! \# t% l
begin P_Creation4 arriving procedure
, `5 a; @7 a; [while 1=1 do" x! t' |4 n* I0 y2 a% E
begin. y- r8 T# ?* \# A, |" u$ i& f
wait for 1 sec
/ B! w7 `7 C& g4 {8 @' \ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
) ^0 F: G. J" W. m7 m; W$ o, g end7 l B' C" x1 `9 }2 j1 j1 \
end
, N) w" J p5 `( ~% b5 m5 B) X3 {
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |