谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
" R* p9 i& i% W, g& } @1 w2 Rbegin model initialization function- P9 B9 a+ r( [
create 1 load of load type L_null to P_Creation2- D) G! ?0 j7 b
create 1 load of load type L_null to P_Creation3$ i3 Q4 S/ A5 D* O. k; @% s5 K3 p' M/ S
create 1 load of load type L_null to P_Creation4
6 T+ d- _7 r8 B# {& T, F, B return true
. }2 U7 u4 H3 l% t2 Z* Fend" x ~6 T; n7 ]$ \) L/ @
& B6 B8 _) C, V4 ]7 [) j, q6 J
begin P_Creation2 arriving procedure f: |1 L; W1 |
while 1=1 do
: M/ O. t5 |3 j- E3 v( X begin
2 S/ M; }; Q3 p4 o9 m. A wait for 1 sec
1 q4 ~' g+ i# P# Y/ c create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
# `8 Y V: m ^6 {' @ end
: Q* ]* L: Q+ {end
' `7 j% [/ r2 u& [ s2 _( J( w ^$ P" T- V% P0 |
begin P_Creation3 arriving procedure$ b d% X" L: X1 ~8 b- X
while 1=1 do
# {6 p( b7 K; H" {/ m7 ` begin4 j. \) W6 d, Z8 C# u/ v; L6 H- t
wait for 1 sec7 A7 C, a2 l! C+ C# z( b6 ^
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
8 v) h& z* e) z2 G; C end3 ~& l4 W7 s& Z3 {
end
& H' }2 Q: w7 A9 I S" R8 b( Q% e, f9 t
begin P_Creation4 arriving procedure5 C" [# o- F A+ l* i& y& @
while 1=1 do
, p: n: g" U; o) |6 f0 } begin
4 ` P' s& E4 J5 L7 L B wait for 1 sec1 U3 ^5 h* n9 _; }
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
4 w8 m- j+ A" N/ B end
8 i* @; Q* p4 E1 d: vend
( n+ L+ h1 W6 v+ ~7 N! p+ g' m: N7 U- N) ?
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |