谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);2 q. `# c; b; t8 O
begin model initialization function
$ ?9 c7 f8 ~2 X" e4 F create 1 load of load type L_null to P_Creation2
9 z4 b0 u' c0 E5 f create 1 load of load type L_null to P_Creation3
2 v- |% T0 M2 A, v create 1 load of load type L_null to P_Creation4( h, M" f$ F( z5 [1 Y' P
return true & s7 |+ G; B8 [# V7 F) J0 }
end1 g7 m0 D/ c/ h8 _- v
0 b3 m/ y4 x2 R& N3 z% e5 Y
begin P_Creation2 arriving procedure
1 v$ U8 J8 z' ]7 a, e& t- H2 swhile 1=1 do6 v4 l8 K' v5 I, h* x
begin3 G: G) l4 I! ]6 a
wait for 1 sec5 c' a% {: X$ |4 W, C" j: e
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
: q6 A D6 S2 H" U4 D; H2 A end9 H" \* T7 |2 u' K
end2 g! q' i# ?- \9 t" r" v- |5 v
@8 ]- y% g9 l* E! |7 \begin P_Creation3 arriving procedure) R F+ w) _1 `6 f9 T
while 1=1 do v. g' ]+ X7 V1 \- ]4 E/ p, f3 d
begin9 p3 ?9 c) F; C# x2 d O) v
wait for 1 sec2 q2 T x. A- H
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)! G; o2 @/ g. L& ]" p3 L: b5 Z
end7 Y$ B6 ?2 M2 v: M$ A' S( Z; Y
end ' s u0 z7 H3 N( X& O7 R9 h
8 v3 c' @8 B$ _) u U: `begin P_Creation4 arriving procedure
`, S8 d$ f( K+ h* v) ~, K; nwhile 1=1 do
& D* N6 |4 s7 F! e- p begin
. M& t4 r+ z( F5 S1 M wait for 1 sec# x; m, ]/ a9 w$ v+ W2 ~# w5 {
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
3 X) g, Q) E3 V) M) x# W" k: B end
' c' n: R: }* V7 s, rend1 w/ N( m; B: s |5 m
9 ~2 o7 Y/ q! q) c/ Z
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |