谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 m, d* X( q2 X$ Pbegin model initialization function0 \' z( c2 M, y4 j2 Y6 E
create 1 load of load type L_null to P_Creation2
6 t1 ? P! _- e' |; I, m' Z0 h4 s create 1 load of load type L_null to P_Creation3, z# V% n5 f. q3 m1 [! r
create 1 load of load type L_null to P_Creation42 ^2 a; V% S6 x! D+ x F
return true
6 X9 V/ N' ]& y6 w- K+ n$ [+ pend
0 V/ b; l* A) m; _* a3 b6 c7 ^0 ?, c: D4 m
begin P_Creation2 arriving procedure8 W8 o7 m6 e1 q; a( J% |& P# G4 ?
while 1=1 do
+ \9 s m& Q1 M3 T K$ k begin
' k- r! q) ]- R! O2 t8 K& B7 { wait for 1 sec
~- {* d7 p, u9 m3 { create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)3 g, e) ~3 Q7 R/ b! |
end
# I. ~5 `" J8 S1 k$ W4 _9 N3 J3 Send- ]5 e& V, k% P7 I( p: c+ f
* i" E) k4 s7 O" p2 _, X$ ]: u
begin P_Creation3 arriving procedure5 Z4 d F9 M y e5 W/ E/ i
while 1=1 do& K7 j2 ^0 D8 \7 C
begin
# z4 g# l# @: Q( d9 |$ t% E wait for 1 sec5 B7 M7 j7 p, G) c B
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)/ Y; \* O% g) @
end
" w Z7 P4 E0 o) Y) [; K. }4 h6 `( Kend , M% B6 W3 h9 F1 {
/ Q; @3 e% u6 M
begin P_Creation4 arriving procedure
6 F, K% [/ o. t0 ywhile 1=1 do6 o$ t, @1 @+ G: E" \) ]
begin! ^* V9 h4 |, J
wait for 1 sec4 ` O$ _% E% K0 H$ ?
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
: P5 `) l7 C; m% H0 ]2 Y end; E/ V' d+ [. O2 y$ k% N# l
end
! i% V; N9 F, _6 G. |7 \% N. [3 j! ^9 {
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |