谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 e9 t- \& r$ t S% Jbegin model initialization function, B; r5 M2 Q3 k& P. s6 ?
create 1 load of load type L_null to P_Creation2
- t* O6 e4 w$ R) a% {# a create 1 load of load type L_null to P_Creation3' O" W( L7 c! k3 V0 u/ z
create 1 load of load type L_null to P_Creation4
7 x0 R' Q- ^+ J( z3 { return true
' L/ J8 v9 m1 I, X* l: fend
9 y5 N* N2 J9 i# H, l6 D/ Z0 [+ Y3 x, o- g
begin P_Creation2 arriving procedure
9 P' h- r: }9 e- f2 Owhile 1=1 do
& w6 Z( a- N) S' W1 \6 S begin
/ e0 K2 z7 y2 G wait for 1 sec
8 ?( h& w0 z" x0 d1 J! @7 I- `, Q create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
- O/ b! {; m) ^3 R end; o2 Z1 y% N+ l" t. Q, W3 _
end( Y6 ?2 p9 w9 R/ }/ @, ]3 r1 ]4 u
- p6 @* E4 A& ~9 w P! h7 s
begin P_Creation3 arriving procedure: ?* k8 R' P# E
while 1=1 do
7 X, L& K5 |/ y+ T" A5 I) X6 m2 { begin
, E7 _$ _4 Z6 j wait for 1 sec& B& R, q" ^2 C# f; `
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)0 q6 ~/ q! j% [: W) t/ Z
end
4 N& L$ n7 f, h+ rend
7 q9 B! l" z+ K) A, {
+ q& _) @! R; x) Qbegin P_Creation4 arriving procedure
% @8 D" R+ S, H4 t" k' \ d* Gwhile 1=1 do
% I/ ^' |7 b3 ^, l) W begin0 e1 G5 p, V. }! ?" T
wait for 1 sec9 l. ^7 k$ Z' \; R
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)7 M& Y7 l: c+ ^' j, U- T
end/ R* }' l; A( U0 ^, g- ~- X/ \
end
% F! Y% k* ]' u5 l0 q( h: D9 \# h* t2 i. ^ d/ P" X" R: P4 I
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |