谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);4 z9 C* k( O* v4 s+ Y1 L
begin model initialization function/ N2 M' q+ N: Z/ S+ w0 K1 K! L8 b
create 1 load of load type L_null to P_Creation2
, J- |- s. r. ?$ h% s create 1 load of load type L_null to P_Creation3
# [6 l. g( V! q7 ~* `5 p1 X create 1 load of load type L_null to P_Creation4
* v( Q8 E% Y, P' q return true - n9 R" x/ _1 \
end2 Q, p3 ]! B; X: j o
" K+ U2 S; {7 z5 n- _6 v
begin P_Creation2 arriving procedure/ l" u- j3 {1 e, V
while 1=1 do
0 E _. X- ~: C, U, b5 V begin! u2 _) W( H: Z# _% ~' s
wait for 1 sec8 }8 x3 A# G/ u( v+ p" N
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die): S5 p. b! j/ m l; L7 l0 ]
end
* H. w. H* e! \2 c, n! J0 }end3 [* I: e9 h( R- I$ U
5 t, u) a: D3 l2 z+ N2 t" D& ~begin P_Creation3 arriving procedure3 b* l E: l# { N/ ~
while 1=1 do
- M. ~9 A% p* l( a1 D/ a- d begin
1 ?- ~2 ]5 J* R- r, o. D5 h wait for 1 sec
) v& \) {4 p @6 ~- M3 `' X; X create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
8 m& o' `( `1 x7 t1 }7 o, k& A4 q end; n$ O! X$ @! j) Z1 t" O$ a9 o
end
, T/ `) f3 H+ ?9 ?/ J+ z/ T, ]# Z
! g: s; B- r3 P" k+ T' \7 [begin P_Creation4 arriving procedure
. g- f! H4 @" }- Awhile 1=1 do; q' m$ d$ Q& |
begin# g. T' h7 V5 R3 \
wait for 1 sec1 L7 o9 r& U/ h4 p9 X* z
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
% Z& a2 a" X. J' n- k- h0 ? end
" T9 S0 e; `6 [$ V- D- yend4 c8 D5 Q/ D! T, L2 L
B4 o4 q# M$ |
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |