谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);+ }% r0 |) F9 h8 v
begin model initialization function7 q b1 H6 C- s; @# l& a; t3 v2 j
create 1 load of load type L_null to P_Creation2, x, @5 y6 {1 D5 y% k- u$ l
create 1 load of load type L_null to P_Creation3
8 M% l0 S5 l# }6 y6 u9 y8 v create 1 load of load type L_null to P_Creation4
, p+ Y- A0 g- z! e* w+ j return true " s D, {' v2 f; ^! c5 p' F& s' `1 M
end) E0 R4 D/ r+ N; x
# T+ H! [- s4 s, ]/ r" t
begin P_Creation2 arriving procedure
! X0 g7 M+ i3 {# I" W* Q: ^while 1=1 do4 j4 L& w7 K! Z: A1 ^
begin* E f% ]! A. S5 |; O- {
wait for 1 sec1 M- r+ w9 a; @ P
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
5 c3 l+ ^" T! x. h2 j/ g end
" l! `0 l6 K9 w/ X; rend5 d; s. U8 A! `1 |- ~
& q" U" X, m$ Z6 a' Hbegin P_Creation3 arriving procedure
! ]$ q, [/ V; P7 jwhile 1=1 do" i/ P: [& k9 F# b
begin
. T4 Z! T3 R l wait for 1 sec/ L# i1 ^7 J1 G. z0 }! N4 O: j
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)* K# [3 s3 ~& w/ d
end7 q0 x: d" w: K& B
end 6 z) [% {9 W" ~8 m
- }3 O, y. D. s+ e0 N Z5 U
begin P_Creation4 arriving procedure
: \4 _6 g6 B3 g2 qwhile 1=1 do
/ n6 r3 y1 `: v M begin
0 l* S& B# z( V, c0 C" _5 T0 }, Z wait for 1 sec
# ~$ w) `1 u/ m% K; o9 q3 Y& c" O. D create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die), B- u& k+ F% R5 b$ ^+ T( R
end0 m; r2 J- E* g) w; l
end9 o- b# Z7 K# O1 ?
# p5 Z+ h6 A/ ~( y% U但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |