谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
4 \1 m( m: T% _8 H8 ybegin model initialization function
8 i4 H! H$ e( L ?% Y1 v: I create 1 load of load type L_null to P_Creation2
4 x* H: ?8 r( j7 M( D create 1 load of load type L_null to P_Creation31 G, ]. U! `5 w( z
create 1 load of load type L_null to P_Creation4, m- R- g8 g, a$ ^5 A0 \5 m
return true , K! [' r4 j) h' e) [5 t
end8 \6 `5 v1 y) U7 n: `3 g" Q
8 V( I. j$ i" B9 p3 R3 r
begin P_Creation2 arriving procedure( I7 ]1 F. b5 {1 @! A0 o8 L; i; V
while 1=1 do& C1 P- \! @( i: O9 A
begin
( f5 Z0 h. r# |/ y4 m wait for 1 sec
2 b1 c& c1 k& I) \7 W- Z create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
7 P; V/ D# a' A! H# W7 Y) }9 Q end
6 [3 A7 m& [ s! m& V7 Y. L `! uend, U8 k& N! s: v$ ?- k
5 D- ]" ?8 f0 m7 F p. Q5 s1 Sbegin P_Creation3 arriving procedure# F7 K- q$ `' q
while 1=1 do
" [% g2 L" L$ ~% P begin
! a5 {. R; @& W9 C, S1 { wait for 1 sec( w6 y, ?: D7 R' c: P
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
% n1 j( n6 d5 e end
8 g6 b" j' m5 h I7 \# I1 Pend
+ A- W/ v6 t! _2 ^0 Y0 [) d# a4 m" C' G* t' k T8 L5 C9 l
begin P_Creation4 arriving procedure
: m1 r$ L4 {- Z! E8 _while 1=1 do
8 K: g: ?# w: i9 y" I. N1 {; D3 ? begin/ R7 l& Q' {! p
wait for 1 sec
# L. Q# K( i W* n- i create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
8 Z% G |+ Z4 i5 i" t end4 G Q0 N3 W% v$ Y& |/ f
end
: i9 [) b; e, q. t! q
0 h$ X/ h0 Q! G; q9 f# `/ ~/ c但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |