谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);5 c2 k! @ S% m: J9 Z
begin model initialization function
9 x+ d# X5 x/ g9 a9 n$ S create 1 load of load type L_null to P_Creation2
$ w$ E6 l- d$ K" U5 h create 1 load of load type L_null to P_Creation3
! ]% R8 c4 M- L create 1 load of load type L_null to P_Creation4
+ h& y D7 x, y8 m8 e) F return true ) o, T2 J* T4 Y. I7 \
end- j: `& K/ ?+ i6 H0 [1 U$ B
8 O4 b: |5 K2 d8 u2 _
begin P_Creation2 arriving procedure
$ M! L5 X8 l. d- [. g1 swhile 1=1 do
+ D4 I$ w& \: N1 T0 `: C8 \ begin6 N8 s+ u( v% g
wait for 1 sec" x7 e! N/ g6 U1 j) z
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)8 t7 W9 M& q4 a, C+ C6 X5 a
end
# p/ ^5 p7 V: e2 h0 V$ Q9 Wend! g/ t1 |2 w/ L! U
9 |% F% V, w# [+ d5 P& e0 abegin P_Creation3 arriving procedure
1 P2 d# M1 G' q" }8 bwhile 1=1 do+ G x B5 @8 k0 x' t
begin
/ ~; J' b2 Q7 T wait for 1 sec
$ s! z7 ?) q0 g9 ?- U9 Z4 @" u create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die): D5 G7 F, y# m' m) i
end" Y. u T: ?% E6 A9 j! z4 g
end
4 N1 O1 ` r$ U- _5 D7 h
% c4 a* Y: H, d7 s% [9 V7 c" Gbegin P_Creation4 arriving procedure8 h; ^" `) c( I/ i
while 1=1 do `6 `% P, B7 _! x8 P0 B# m% f
begin$ W, R/ t* P E2 b/ i9 S
wait for 1 sec: }: ?* L5 B: W/ B8 d
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)" k6 a8 p7 ]0 c
end: j* n( }& {* [( y4 w, A( _- g
end7 Z. j& g5 }. [, |8 @! q$ A
, b0 K& g1 l# f6 ]8 l3 D9 c) B
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |