谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);5 u/ m5 v' o% y6 k( O3 x
begin model initialization function' {* J2 k X# x# E, c0 ?0 z
create 1 load of load type L_null to P_Creation2+ n1 J" u5 O& o/ y! ?. A$ I
create 1 load of load type L_null to P_Creation3- j. j, ~6 _6 N6 J
create 1 load of load type L_null to P_Creation4( }; G; e6 b8 d+ O5 m+ s/ S
return true " Q# c4 Y( R3 u; A0 C- m/ q
end+ ~0 H+ c0 V( o3 e/ x
8 t3 ?) u5 q1 s& [
begin P_Creation2 arriving procedure; Z' n3 X' E7 z) n0 J ? v* k7 G* ~
while 1=1 do
: d) E$ J0 K+ |8 P9 a2 l6 k, _5 m begin
$ }( Z/ x& ~( }! H wait for 1 sec
+ k. P/ S( K% P; b& _" G& T* q6 ]/ @ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)5 o. @3 G+ T, O5 A- x7 u
end" n1 |+ D& w0 O9 Q. l8 x
end
; N" t+ x7 \8 _% t- [( ?; L, q5 N8 A1 L7 h# s! Q6 i
begin P_Creation3 arriving procedure* q+ p! w; e* B3 a- [
while 1=1 do; i b- i: h: h' j! G
begin' i6 x5 U, M- x. P9 C% u
wait for 1 sec8 W8 M U4 h$ E! ]' B! x
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)" `/ b& K! `& d4 V! o
end
, w4 {& B4 ~# n* q. B7 Mend
' F8 S5 U8 @" e: E- J$ ~: b
; \2 l0 r$ z, a, Pbegin P_Creation4 arriving procedure- h6 a/ V# r8 u3 y
while 1=1 do4 n7 K2 o( u' ~$ d. D* {
begin
! M# T( p( M$ _5 { wait for 1 sec
: C: m% t0 z4 \2 E1 X% p create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)8 D3 H1 `& { P% p$ D5 o- F9 j0 b
end5 d, E1 K$ V/ H# V+ J1 G
end
, b+ Z; R* R% \
4 Q# p2 c. C" N( [但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |