谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);, A" G# A7 v& u& S* Z/ H) h+ V& R; p4 H
begin model initialization function
0 D! O5 p& D* o7 @( x% J$ w3 } create 1 load of load type L_null to P_Creation2) F l$ q: ^% |: a/ T3 w# [8 |% ?
create 1 load of load type L_null to P_Creation3+ |% q( c: {! _$ P1 u
create 1 load of load type L_null to P_Creation4
8 x. s. d" W! L$ T return true , ~$ z* C7 l) `" q/ I
end0 ~; v2 x; F. V! }6 Y
5 C4 X" s, g* z# l! H' pbegin P_Creation2 arriving procedure1 L9 T) _- u- ^7 ^! R4 d; i4 h
while 1=1 do
( z% @/ p0 v& g4 P4 f8 C/ } begin; X% b* _( P2 s$ |: k2 U
wait for 1 sec
8 E7 Y3 u: u9 K create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die): P1 _. l8 j( [. W; W4 h' ~6 w
end
2 l9 T- A* S) S2 a2 o+ K7 I Rend
+ B- H9 O; a/ {" Z! F* }/ q, }4 J$ n6 K: m5 n m
begin P_Creation3 arriving procedure1 L/ E8 @: [1 y5 \/ y% u, q
while 1=1 do2 V6 M& @, ?0 S& m% c
begin
8 H1 x4 s. Z0 K4 i5 @ wait for 1 sec
4 Q! i1 b5 D& l' F5 c create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die) t) z) ^" D: G% B
end
' C, `* ~- n2 Z8 s4 O- X3 \end - e( H( D# n; g1 [2 I/ d, c. `
! z. }2 n3 }- a+ T
begin P_Creation4 arriving procedure
9 C* H0 M! x! W0 B$ H! [" Lwhile 1=1 do6 {& w1 j$ A% K) }* u2 r
begin
5 c K9 o9 }4 h, v7 W | wait for 1 sec
/ _* h: b. S1 ` m create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)8 u& `% M) I w; ~
end
, |4 T6 ^, z9 j- qend- y! v5 O2 B' F6 f$ x) T& c( x; P
. u, t+ b2 h& ]5 ]/ _' |9 |$ |$ K9 }但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |