谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
5 r1 o! i/ J3 k% N, E; }) E. v6 R& Zbegin model initialization function# q& V5 Z( K; g( t7 b; e
create 1 load of load type L_null to P_Creation2
, E, A* p1 }* t5 r7 } S! J create 1 load of load type L_null to P_Creation3
0 q, v; i3 `' g3 e0 ~1 H3 Z; k create 1 load of load type L_null to P_Creation4
l% z% d. [( i1 H; ?) j return true
1 H V. _% I! s2 t# Lend
0 U _ u- \ M) {( r6 p# ?/ u( I# B7 j/ {
begin P_Creation2 arriving procedure
9 }/ Q3 ~5 Q" nwhile 1=1 do9 j( i+ J4 \- A
begin
7 p; o( R4 W @, a* k wait for 1 sec' m2 M$ |, b# V2 S7 I' g
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
, E4 i# t( x" N5 b& J! ~: z; W) V4 I7 ^ end
T1 X/ ?( o9 s, a; M$ bend
/ u7 x, h. w! K) d; b2 M. }1 Q! _+ t) v3 U+ [/ P# c
begin P_Creation3 arriving procedure: F: z# A) k" i8 U2 D& j8 D* J
while 1=1 do
# T. z( d; f1 Z8 e begin6 t( o2 A$ Z t5 b* t% h
wait for 1 sec; o# b. k: F. P% |( H% n
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)9 x+ u! o" ?" @/ L9 K# w' I
end" D, m7 `, V" q( x8 _& |" R
end ! t6 A" C* G; w* q
$ i; Q# m6 L# |& c
begin P_Creation4 arriving procedure
; D* p/ a# V# Rwhile 1=1 do
- X. d; o+ x; q/ D! i0 Y& ] begin" @( S' b$ D. f M; d
wait for 1 sec
$ w) d8 L. I1 L& f5 A create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die) o( |. h% d, M9 Y0 ^
end
& u. @, }7 }/ D! q$ N4 q8 f$ Xend0 S) s Y) i1 O# }# C5 D" ^+ d4 |. L
B, p2 _& }- v! B但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |