谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);- S( [! h# Y; y8 q9 x4 {7 ~
begin model initialization function
0 c( o ]9 j- k& d' S, N create 1 load of load type L_null to P_Creation29 d, _, A3 o/ I4 f6 I: j9 `$ a U4 \' \
create 1 load of load type L_null to P_Creation3( _# M; [1 f) L3 P
create 1 load of load type L_null to P_Creation4
( F; [, z0 f0 y return true 2 |" o$ H7 ` ^" @+ t3 v$ h
end+ B- _% h- C: B$ D# n
6 B9 J- Y. o0 h) R* ?: @/ s8 Xbegin P_Creation2 arriving procedure
' J7 @; U8 ^! X/ K! @while 1=1 do& b8 j( T8 U* Q( Q: M
begin0 q' C% G4 P& r6 H- N
wait for 1 sec
0 w! A! G7 _9 ~ U8 V create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)# B" _" q1 B/ Y1 P; ]
end, J k$ e$ z1 v# ?' L
end
8 D# p8 s! N* q( U" ~: T; z5 v" ^4 s G/ ~9 P5 Z) B1 \, S
begin P_Creation3 arriving procedure+ k$ c! z% f. E4 n
while 1=1 do
! x: ?0 q# Q% h) A, s( H begin
( P) f. G+ p1 ]$ k wait for 1 sec
! E% b; b# \0 G# ~! o5 J create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die) ]+ ?5 @+ q% J; h, ?" q: m8 \/ K
end% U2 @- s9 j+ o- `3 @4 l
end 4 K4 }" j8 S6 I' ~- S
4 U- N3 @) k6 rbegin P_Creation4 arriving procedure# R+ B; G9 k) h& A
while 1=1 do
5 f6 A2 e8 _ h7 `8 Z" m" w7 V+ z begin1 u2 L. N$ O1 k4 S
wait for 1 sec4 v4 G4 {& U' K6 ~
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
9 S- J5 a) Z N end' `# J6 l2 s( i. _
end
, q, X$ v& i& [! m$ A! J' E( |
* q' ^5 m: ]1 k9 U3 \* ]2 s但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |