谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
6 }7 g+ P# v/ R, Fbegin model initialization function5 F( \ w4 P0 f( U* h; I& d
create 1 load of load type L_null to P_Creation2/ c/ _7 c) p" Y5 G: r. E6 `& p
create 1 load of load type L_null to P_Creation3
! l8 M* r( f- ` create 1 load of load type L_null to P_Creation44 D" o$ Z6 @6 X
return true 2 w. Z7 h7 E9 o& J6 M% D/ p) I6 l
end; M) P% I. ?9 G$ e+ _/ Y9 K, W: E
: d+ K. G5 n1 P6 @8 G6 Mbegin P_Creation2 arriving procedure t/ g/ F: s8 q, ]6 Y
while 1=1 do
& m1 M2 W* Y4 C: d begin
; v3 C/ d7 p$ A6 h. d& s wait for 1 sec
2 u7 L' g9 D& h* f! X create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
& V9 C! I1 k& @& X' ~ end
: z. Z7 N+ x/ \: S, Rend0 ~- A l( b/ W ?4 l* [
* }5 j6 ~, K& o; obegin P_Creation3 arriving procedure
9 M$ [) {! K4 R F+ \; F# F2 I$ F5 owhile 1=1 do
% X: U: V3 u+ s2 _. u begin3 |+ \2 ~3 Z# q1 V( E2 t
wait for 1 sec1 x/ n' \* K- j+ j
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)2 d5 c: n/ d5 O, f
end
, x3 b/ y+ g. _& ~6 X7 T' @! Aend 2 I9 g- }: N# v5 ? T, U. E
7 y' ]3 w. i( P1 s0 Gbegin P_Creation4 arriving procedure7 D3 q6 c2 V# v! t, _
while 1=1 do- `5 h2 f W! Y A
begin
% l1 C4 V- s, o0 E T& F+ f* w2 i wait for 1 sec
/ l& U0 C0 L2 t, s" F. P create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)& b( P9 v. {8 j4 O
end
! J! A" m' ?! M, l& B; P8 d$ bend3 L+ p. `9 N1 [3 ^& u7 P
n0 \0 _1 z6 Z/ K
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |