谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
( n& h- C' S2 I. `- [! w, o# fbegin model initialization function
1 Y( n1 @7 [% X3 G2 K8 E, e create 1 load of load type L_null to P_Creation2
* p+ g i& f/ O& o9 w, \5 P, S7 o create 1 load of load type L_null to P_Creation3$ f; \6 s( D2 n& s3 }: Z
create 1 load of load type L_null to P_Creation4. g1 p% \' o/ X% x0 }. N _- ?" y/ Q
return true
) B9 W1 P' z0 O9 b. D' m' xend5 F6 ?0 Q0 ~- p, _. n
s, N2 ?- P: u7 q% Y2 ~* qbegin P_Creation2 arriving procedure
% u6 p: ?. f: x! {% a7 w) _while 1=1 do) L% d" e, A( T' V4 ?- p
begin$ H' e# d/ Q5 j4 k* x# b. b0 ~
wait for 1 sec4 c4 [! F+ s. E5 J- j
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
9 r5 J& ?% R. s# j+ V end
# y( f! c" b1 o4 p8 hend
! k' T* G! s6 ~# h P# l3 y8 p! |! @; Z1 T
begin P_Creation3 arriving procedure
6 L V, H2 T' Q8 g9 cwhile 1=1 do
& n k `+ S6 s9 p9 Y$ l: U+ {0 V begin
! a. |$ ?# T! c* f" ?& `5 { wait for 1 sec. a) Q; r% V4 W- a4 w3 m
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)( a% |- \. e1 l+ i# J
end! t J9 ^+ A+ Q9 s" G) r S
end
6 \7 M1 V) C4 C$ }' } ^8 F9 ]9 D! v1 ?8 H3 t8 h4 c, l
begin P_Creation4 arriving procedure* \: d4 g. y# K5 c B: w: T3 g
while 1=1 do
; e" @" p2 |+ {; Q- c begin
; F) P! J7 d2 f8 m' r* a wait for 1 sec Z8 M( U- Y, F' w0 Z6 ?
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 `! m. \% Z0 o- m& v |
end) K/ A( V( S( U/ V0 S' d8 x q
end! n8 S4 W1 X" h; |4 U' `. l
6 V& ]) K3 q8 H) ^9 C! ~; u, t
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |