谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
' \9 n r# Y" `4 ybegin model initialization function
7 F8 |) h) u% L0 [& c create 1 load of load type L_null to P_Creation2
2 Y, o3 @, m: d. M: n7 M* _ create 1 load of load type L_null to P_Creation3
3 I; Y) U" y* \0 a create 1 load of load type L_null to P_Creation4
+ t4 r- K R. f6 r% N return true
5 i# U1 Q3 ~, G: S* ^7 `end
1 c$ ?6 J1 s, U7 ]2 s/ v, {
" Q8 W, ~6 r) G Z9 @9 j! M5 }9 Ibegin P_Creation2 arriving procedure
/ O" n" u2 ?, W( Pwhile 1=1 do+ o4 x1 q" A7 r" n. `
begin, A2 k! V- E7 w9 P2 M
wait for 1 sec
1 I+ v4 n3 x& J# {6 T create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
3 N+ F1 D5 g" D1 I( y: R7 w$ e: o end
% M( M& n7 u# S7 M! Send
- @$ ?( c& {# J* @% O9 Z! Z1 W ~7 J6 B& d# A: u7 j
begin P_Creation3 arriving procedure% W+ `3 {8 Z, f8 r, d% u* T
while 1=1 do
1 w& ^4 F1 k: w' o. a begin
/ B* u; ^6 K z. a% X5 [ wait for 1 sec4 N4 f6 D+ o, c! L/ ?( a1 i* I4 q. ^- |
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
7 \9 t: P" ?$ ]+ C: s end
. t1 ^" C! [! vend
/ ^! L# \( u2 \) z1 c4 p5 E: P9 T- ^: j ^, h: [8 I( v
begin P_Creation4 arriving procedure" A* e/ i( p# q0 F8 c
while 1=1 do
' t0 U* R2 C! ^; g6 ]4 d g/ D begin
, [: K* n- `# h3 K% x% s wait for 1 sec' j8 b( B9 _* @/ c# W9 b
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)2 y+ n* A/ \ G: J
end: B2 [8 A- s! f' W$ i, Z4 M# G% |9 D
end P2 L9 ~' g" j, U' J
& r1 j) o+ D" }* @9 _但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |