谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);1 x4 W' ~7 I; g# X+ m2 c
begin model initialization function
. Q2 j+ p7 a* W create 1 load of load type L_null to P_Creation2# P5 ^' K& r# D) o: C$ m' T
create 1 load of load type L_null to P_Creation3
$ H1 B! ~) |1 }. m* V, I create 1 load of load type L_null to P_Creation4
+ @: V m2 r1 V; y return true
+ t- E. H# K- J$ D& Z0 n: iend
& X$ `% |5 A7 a, P; m" v. e: g6 d& D Z# D
begin P_Creation2 arriving procedure: b) |, [9 z3 P/ n1 [. X
while 1=1 do
8 G# k: `8 Y/ E, [, n' Y0 V begin1 \. ] v: i, N9 y' Y/ Q5 S; M) o5 s
wait for 1 sec
: `6 L4 [& ?5 h. R$ r create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
' @, H6 N# |5 `5 `- J end5 m; d, J6 N" U5 o5 h8 Z% v' O2 _
end- J! G0 ]3 E) E: h( k9 @2 k
* D) }+ T) A6 T# m
begin P_Creation3 arriving procedure
! A* f& W# v, n0 V& s9 Cwhile 1=1 do
. R6 k3 S% @# B f$ q& }( N% X" [ begin
6 `' [- _5 x9 H2 h$ E wait for 1 sec1 }2 M4 e3 F; I2 p* I: @; i
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
* T& }/ w( p) A( b. Z9 C end
) ]7 V& E E4 a9 D. ?7 W) Wend * N8 X3 [0 E# f' E% w3 E- t
0 _0 T7 l# x4 c" i+ K r0 lbegin P_Creation4 arriving procedure. ^& x. Q: c$ }) i, o; h7 p
while 1=1 do' M7 B& P+ y4 o5 E: U1 K* ?- u
begin9 F3 K! l7 J4 `# u' {
wait for 1 sec
: f" E( L# w+ e$ _5 m# n create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)4 m1 ^9 s' C* f0 {/ ~5 g* ?- ^9 ^
end' x/ C5 P' _: M/ P
end9 O O; r3 J2 V2 W
8 J- y# \2 Q3 L" ]# C但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |