谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);- Q3 y/ G) j1 O+ W% p
begin model initialization function
( y5 x1 c# k: A% A create 1 load of load type L_null to P_Creation2
) f+ Z0 ?& P' m+ } B create 1 load of load type L_null to P_Creation3
& } r4 F$ q8 w0 Q, ~/ s) M create 1 load of load type L_null to P_Creation4
i! d2 Y/ J# ~. N9 R) B; ]4 |* t, ~8 k return true
: T+ Z# K$ P: L* ~$ v. M& A, O* K9 Dend% W4 h1 w U' i
: o" E3 M4 g: z8 O3 hbegin P_Creation2 arriving procedure
0 |, Z8 {! t# X9 @9 w" bwhile 1=1 do
; h& ^" F$ M4 S/ D8 h begin
0 U( u# x# R) ]; ~2 X- V5 a: P wait for 1 sec
, g. F' d9 ~, z create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die), q& M/ ^- ~: ]+ \
end
" e. b) w6 c; e" I3 K5 pend* M- Q* b8 y, e5 i5 ?
( ~& w; K! T* O1 H& G/ v- Tbegin P_Creation3 arriving procedure7 e! B$ Z O/ i+ ~8 f
while 1=1 do
6 \7 E! f/ A. A8 d3 w begin
4 Z9 [& M# G- K+ X wait for 1 sec
) a$ J4 H/ t' S% p: k create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)6 l" p6 x# M/ A' y# X+ j9 W0 O1 |
end' ?2 n T& ^4 x% y2 O3 U* ~+ G
end
3 \& B* d* Q9 \- P* D: L# \5 C3 d* P) x x2 `( M, f! b/ K! i- G7 Z6 D
begin P_Creation4 arriving procedure
' P; F3 R2 B, u4 @% W' xwhile 1=1 do, O1 P+ @ B9 |5 C4 \
begin
, v# Q8 ?; ]' L8 w" c p wait for 1 sec: m% E7 V' F/ c1 v( M
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)# L8 E5 E' @1 G% ^( ^2 @
end) N. \' n9 Y# N2 s G) q
end
$ c4 `5 z2 |2 l* M. B- |7 ^1 v% A3 c7 Z" s' S, }$ S
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |