谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);" U% f& V) d+ z; [& ]3 u5 w
begin model initialization function
4 Z: I }4 A: L' i D. h$ l a, M) Y create 1 load of load type L_null to P_Creation2
) j8 R; v, p( v# T& t% q* a+ ~; r create 1 load of load type L_null to P_Creation3
9 V, y: ~9 r+ m, B* j create 1 load of load type L_null to P_Creation4( {6 p7 {2 b& E" g( Y4 _5 i
return true * B. F, Y5 j0 P5 J
end7 M: O; ~& u, M
6 f& T. r% @0 } d" p( ]: m& Pbegin P_Creation2 arriving procedure
& j9 C- L" i3 M5 Q$ }while 1=1 do
& a1 p; Y8 x9 L! j' R' H begin6 T. R- x0 h8 j: u6 S3 a
wait for 1 sec6 h" X6 L! A( A
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
( [0 Y& P/ p1 V1 v end0 P% |1 I! A3 V3 d2 b0 B
end& M; N1 t, o4 I
{9 [$ Q y( s: [( M' `3 ~begin P_Creation3 arriving procedure
4 N. W8 ]% K, s- rwhile 1=1 do, s7 i" h2 u' }8 b. r G
begin
$ V1 Q8 t# i V7 N- O' }7 Y3 D4 g wait for 1 sec
~# w, ~. L# V: w0 K$ X: j create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
8 {. ~8 q+ A# q; T0 J- P/ H7 { end
5 j4 W$ D, e6 Q" {" @/ F. e/ oend & {7 g% I- X( S* S; Y+ }* v
. M# Y- r7 p) {/ [; t
begin P_Creation4 arriving procedure
: n4 ?+ M; A$ q0 e9 @2 k$ W O' Vwhile 1=1 do% j/ Z0 G2 T) ?& ]( a% ^
begin
9 c- D( v. J4 d1 _ wait for 1 sec
! h$ f I( r9 m1 b- V create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)2 N# s4 d5 N; e5 f2 |% D, D
end/ \$ c) \2 b; Z( }
end2 _9 D( o8 z Y; G6 D
" N% w/ o' ?- ?. c7 m. v1 q
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |