谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
( W$ h9 _# W4 g9 ~begin model initialization function
; S2 J5 P, \, w+ g& w create 1 load of load type L_null to P_Creation2/ l& I( m* p0 `* Z2 X& F' U6 n
create 1 load of load type L_null to P_Creation3: q7 `! ~+ J& i5 M, F1 ?
create 1 load of load type L_null to P_Creation4) w; _7 v0 U: V, ?* A0 w, L% X
return true
7 [) m9 J, f$ k3 q1 b. Y: Xend
9 ~0 W/ _( B& q% G k7 ]% s
; r. A" j3 V+ V+ T; o. m. Nbegin P_Creation2 arriving procedure
7 C4 O, K* l& Y, @while 1=1 do+ o7 u0 `6 q! D0 q
begin
$ C* X8 n2 U2 p% t wait for 1 sec% J' N$ x7 @' E- n3 l# R2 u
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
7 ], Q t, H. {8 A% E3 F end
( ]+ f5 |6 l; V; ^/ p: m9 }end
) d1 T5 x+ C/ `6 `: P( t S/ `, m$ e- @6 X/ X7 Z0 M6 N5 [
begin P_Creation3 arriving procedure
$ _8 H5 P* i7 t% E9 Kwhile 1=1 do Q8 R; \) Z# `/ E# W: ~; e: F
begin+ i, t$ ?5 h2 Y7 M0 J5 C: S
wait for 1 sec
b. y. V8 }% e create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)* r [1 _& B6 Y& Q- {
end
$ b( R) G4 j j& C0 \end $ |+ u2 h3 l( E# Y6 M
9 @: P' W: t5 Mbegin P_Creation4 arriving procedure9 p' F( l4 B5 Z: Q5 f
while 1=1 do& [7 }) u% B" v7 `1 P
begin
/ V/ s6 B3 ]4 D" Q* v wait for 1 sec: e* a% R6 O: u. f
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
' { z% |' b3 c" J: M end
& i( N5 d: G8 Q& Xend
8 Y" ^8 B: }5 n- R/ P6 ]0 @. {. x) t2 e4 e- `- K
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |