谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null); a/ g) j0 V+ S) Z
begin model initialization function) k8 Q e. |( {4 V1 `1 R% J
create 1 load of load type L_null to P_Creation2
5 r) u _, u0 e: d/ s( Q, a0 M9 S. { create 1 load of load type L_null to P_Creation3# X& E, u- ]" J: c' C% x1 o
create 1 load of load type L_null to P_Creation4
O, a8 m+ i% z# }; m return true
/ q8 c0 \1 n+ n4 F7 U& ]end
4 o, [1 r Z$ H |; |0 I4 B$ Y, N1 ~( n, N# {
begin P_Creation2 arriving procedure
' S; b% v0 J" D( g, ^+ v" `while 1=1 do1 I4 i& i9 Z" K' w
begin
l9 y/ z5 g. q wait for 1 sec
2 Z. \ S2 v5 _/ J" W9 ?$ j create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)2 g$ p% g% r% T5 N) S6 f8 ?. q5 d8 @
end
; K9 j; d5 ]2 U- E( Gend; u, p8 T3 G+ o0 a% n+ J* k% X) B
# ]/ k3 r) k' o( S+ m0 bbegin P_Creation3 arriving procedure
# Q& w% }) m, W7 m/ n9 ewhile 1=1 do+ w/ ?- k9 X8 y, m" N
begin E2 S7 O! J1 ^
wait for 1 sec: W: Y0 u6 R- g, t |) q6 d
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)3 g) W! D" B2 ~1 o9 k6 Q
end
) p0 g* ^( W% y z; c5 Oend 2 Z8 c0 w2 }; i$ m' L
& U. f2 }3 H$ w. nbegin P_Creation4 arriving procedure+ i/ P! W! T+ O( B7 p7 a9 a5 v8 h
while 1=1 do3 w! M+ r- I$ i
begin
3 W' V A8 l: D% l- D+ u/ w1 U wait for 1 sec
% ?9 D6 t M$ ?: A- A create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
, P! |( y+ T7 s& z" n+ Q* G end
& n& y$ u7 U8 D6 H0 R @end. V' J$ p& f. f" S: F7 W
5 g/ o$ D/ v; W* z
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |