谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);+ m' j: I3 P( t$ O: c1 A
begin model initialization function. `2 f0 [5 n, u1 ^+ Y
create 1 load of load type L_null to P_Creation2
5 S! n3 u4 \! w& x1 Z create 1 load of load type L_null to P_Creation3
% j% |6 ~" Y9 A1 c: [. h7 O create 1 load of load type L_null to P_Creation4
# e! C8 _8 [/ K9 G return true * C- U; F- q. E# k) i
end
5 w# _ f; m' ?" ^4 C9 @0 M M, J0 L2 t! y
begin P_Creation2 arriving procedure* ]8 p+ t" G7 R1 z1 A5 `( G. u3 r
while 1=1 do- }4 V' m* A. A q7 E. F* V
begin
2 }) ?/ m3 R: n wait for 1 sec
, H C, j# t w+ S" B. y3 t create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 C0 Z$ H/ n$ D+ R: Q, S. [ end# T7 l/ M; ]$ ]! F! r
end
& [. L1 Z$ l/ K. e8 R* a; T6 V: i& w% Y1 I) ]
begin P_Creation3 arriving procedure
7 l6 a. H8 U! s3 _while 1=1 do+ w0 C% F3 F% M$ H
begin
* }% u( p$ L2 p6 T* _5 I+ ]/ m$ n wait for 1 sec
+ ]) o# k) i* h2 i; j8 N/ f; M create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
) G8 e& h; {, u6 o end
2 A0 I0 \/ y6 I- U7 S1 _8 rend
( `4 i, O: k/ v4 E6 m4 [9 b6 H- k
begin P_Creation4 arriving procedure6 S+ w: W1 t! L# V& P. w
while 1=1 do
- j- r. Z! ]& o6 U$ q# N. N0 l: P begin i7 U- ~% k6 o5 T
wait for 1 sec; b b- ~% N8 Q; t+ }
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
9 c& c r% R4 r' W! t9 f) q end
) g1 X' F1 G# k- w( Kend! e, d2 v1 u1 O! N, C
' k' a% ~" _+ D! @5 h5 z但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |