谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);- a" g7 c1 m/ l, A; o9 |
begin model initialization function5 i6 P1 J i1 C+ G
create 1 load of load type L_null to P_Creation2
# ^, B0 D% u4 u; C5 Q+ A5 _ create 1 load of load type L_null to P_Creation3
8 S. C U. s+ ^3 e* ^ create 1 load of load type L_null to P_Creation4 P: m# A+ m( K. z" p8 g' U8 p
return true
, A3 p+ c9 U. B2 Kend) L' N) F6 g3 d* m7 [. \; Q
) m3 n" M6 Z, A/ o& r2 d: i) Vbegin P_Creation2 arriving procedure- U6 E. o/ I6 ~$ W+ B. s, Y
while 1=1 do& K9 D4 M% F/ a3 @. O1 e
begin! M8 l; H% { V# a
wait for 1 sec
; ], X3 c5 Z: x create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die); r3 g# C' \' B4 V
end
7 z1 L# n7 l3 X! uend% I* }8 i2 q1 M' W8 B
5 \* L# o+ R5 ]- fbegin P_Creation3 arriving procedure8 k( ^/ W5 a; D8 s0 w+ K; S/ C( t
while 1=1 do
" T! v. V" e5 I begin) ?5 C7 z4 B) Z
wait for 1 sec* |9 w; b* ~/ }- p
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); n4 D+ ^2 n) _" ^1 _
end- n3 R& s0 x. j2 C5 b
end ' j8 F- Q* v8 e' R6 V0 D5 h
! n4 }, W" g) O/ L- g, N8 Q3 M
begin P_Creation4 arriving procedure
$ ~1 f6 x# l8 J# R( G7 ewhile 1=1 do; x. [3 A( }# C7 a% i1 Q8 h W! w3 n
begin
8 ?$ k. b. z2 K0 t! n. p! b wait for 1 sec
- ], g1 c2 O* G* _6 p, k: X create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)' \/ e: Z" a: L/ `! S: b. u8 w
end( h$ {$ R/ z$ o+ Z! M
end
) x" m% {, m& ]. k6 b
/ ^- _- u& }) u/ y4 X/ e但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |