谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
+ i+ h; [9 r) f9 S# ibegin model initialization function
4 E/ V) t7 z. t" x1 @ create 1 load of load type L_null to P_Creation20 ^" ~2 F& p& a. Y
create 1 load of load type L_null to P_Creation3$ U* _ C# f& L: A
create 1 load of load type L_null to P_Creation4
" K G# R; N; s z4 | return true * C4 C1 L* }' a+ p9 X A& f
end
0 [. L5 @; x6 i" ^. @" [% z P' x+ L
begin P_Creation2 arriving procedure8 W7 J( g9 }, u9 n0 E X
while 1=1 do' u! d) N9 z" u8 A9 e9 V* \) e
begin1 q- C& g# F5 y* e, [. \
wait for 1 sec
4 N$ V/ m- ^7 r7 M& z+ o create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)/ p- g" ~1 b. r2 F0 E2 j
end8 Q% |, c2 |7 T, i
end
, f$ _$ C- C2 ?6 a& P) Y$ _; a/ j2 n
* P6 W! f- R9 f0 X5 q; b1 s6 jbegin P_Creation3 arriving procedure
4 A7 n( K8 I+ Pwhile 1=1 do3 z0 Y' c) V. `7 m& O7 [
begin
" }" G d# c. t wait for 1 sec5 I6 j" {4 ^( T4 e
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
+ j& H0 {! Z" r; C end
9 a: E. p" a0 L9 \% K+ ^; Kend ) E* Q- M1 k% N
6 `, k, ~1 \( W) g
begin P_Creation4 arriving procedure6 t, m5 t9 W! ?3 L$ i& M3 H
while 1=1 do( ~' w/ }- n' E. r
begin7 q$ X3 @* W; b3 L0 d1 }
wait for 1 sec4 R S& a1 }' {9 r0 C
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). a7 v, ~" ^" ^5 p( h4 z0 Z9 j' Z7 S
end/ }; { Q& \, D* S
end5 C$ H, T5 ]4 S4 W
+ l, S8 D! \7 Z0 A8 e" Y
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |