谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
0 p& t) D2 L. {8 ]1 v7 k( r! Vbegin model initialization function
7 |8 S; n; u3 j8 N* S# y create 1 load of load type L_null to P_Creation2
# @1 h% P: \2 P e' P, p create 1 load of load type L_null to P_Creation31 j. f' ? J( S, ^, {9 o' F
create 1 load of load type L_null to P_Creation4! O k& r+ ?- f, m# z
return true ( e( q! z7 F" R. y& h- X+ g* W
end
1 J* {+ i/ z) x7 m) j( Q5 W ~$ P% Y. K/ I6 ^6 U' B
begin P_Creation2 arriving procedure
% `, }0 g0 h4 d4 G% wwhile 1=1 do
' D+ n0 i/ f: u0 T4 B( } begin
" K8 S& @& j6 p! _/ N( x: B5 Z wait for 1 sec# a1 U m/ S' g9 W# f; E
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)! S; I1 J4 ]2 Q, A; z- j. w# p
end
, y/ Z# D1 R1 z9 [end- N( F1 }: J( o2 Q
$ a# a; z: @) D4 T, K! Obegin P_Creation3 arriving procedure
% t/ r! v- d5 Z1 P! L0 Wwhile 1=1 do
. z4 H- _9 o7 i begin
P c, q0 k3 |- x8 x2 p wait for 1 sec) y/ }, H# `6 @+ L3 g
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die). @: q4 S) U( p' V6 w4 o- I
end
& N/ k7 }+ T& q' p6 u, `- |1 send % d) T5 c p# X
; N2 `0 ]) R5 ], G$ xbegin P_Creation4 arriving procedure3 `: _& n. [: p& x# \
while 1=1 do3 d; m9 b B4 }$ Y2 z0 C/ ^
begin
3 \' q1 ~& r" C4 Z6 O( T wait for 1 sec: g; e, S3 K# L9 r2 _) l. ^
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
0 P9 }: z3 H e end
/ `* y/ t: S2 N) wend3 K- O2 Z) v6 f! g E
. N& L! e0 I. E- a3 ^% S但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |