谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);# e8 i, X! y0 h2 q7 n% ?0 R5 Y
begin model initialization function
! k5 O2 \7 H5 ?8 ~* r create 1 load of load type L_null to P_Creation2; Y. ]( f9 x# i6 d3 A% z
create 1 load of load type L_null to P_Creation3
) x. p: ?0 z. m Y create 1 load of load type L_null to P_Creation4
7 c: m, l; e4 m1 k7 I return true
% o* J. k) B5 `* J& O# Q/ yend" j- ~4 h; C' |! D4 g% n
5 q; r6 k- W2 h$ a( b! b* k' |, H
begin P_Creation2 arriving procedure
. m+ U0 R- _2 U. `while 1=1 do
6 O& Z, a0 n' O begin
: R) z& ?7 V$ O; a2 i9 B( p8 e/ i wait for 1 sec
# X1 L9 v& S# D0 ~5 |. h create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 u6 ~# {' G) Q0 [1 Y end
8 t% `" k( N1 D; W) n9 | M) ]% hend; R0 T5 m" ?, s' I' V( X5 n( P
0 h4 I5 _% }( Z' a7 n$ X, A# z7 _begin P_Creation3 arriving procedure
: ]/ O1 ~* i. p Rwhile 1=1 do- f* n3 B4 P" v+ D
begin
' C- r4 {& |5 @$ W wait for 1 sec+ f/ q. U* p7 x. v
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
) o% Y6 z/ n' s+ u) { end6 v2 u& c( D' R
end ) L; G/ X$ L0 f: ] b* }% A% F
# t$ I& o4 o! R/ Z# d$ E! vbegin P_Creation4 arriving procedure, N p" Y0 U! ^4 [: }9 ~ ?
while 1=1 do" W R/ r% H5 U, M
begin; S. d4 c% R: a% b2 S% S
wait for 1 sec8 g3 T. a% @ R) ]4 X4 e( n! R0 j
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
* j7 T, z; t: H. ?$ x4 a3 e end* N: w8 t2 S# b( i
end+ l6 w' n) M# r8 P# g; e: ?5 y
/ m7 ~% [. u& D# D* v! I9 \但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |