谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
! j% |1 i* s! @8 Cbegin model initialization function
! U- i6 _5 ~1 X* X$ c) ]! m create 1 load of load type L_null to P_Creation24 r7 e+ s; \9 _
create 1 load of load type L_null to P_Creation3
- X2 A- m* t/ k# X0 }6 p create 1 load of load type L_null to P_Creation4( |0 R% w8 X4 j! x+ y% M3 c
return true
! h, S# l$ O- q6 Cend& o+ Z; d# G o3 v- r! i
* F0 d m# }. \/ H; {0 ~/ l
begin P_Creation2 arriving procedure
3 V: |; [/ T6 O% s5 |" L) ?, hwhile 1=1 do5 D$ O7 O2 p [/ Y/ a2 h
begin
: ~) v/ n. m& ^5 y$ W% Z wait for 1 sec3 f x4 n% t" u3 G- _; f4 e4 r
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* w! w( i8 t& S# z, X
end. B' B! i! z7 W. D8 N) z! ~/ Y
end
* E0 I* Z( ^5 x
( z3 b0 ^. a6 |$ E& k: s& abegin P_Creation3 arriving procedure
. w1 M8 ^9 b0 \4 M/ Lwhile 1=1 do
1 F$ ~, X$ _+ V8 ]" w2 Z begin
& a6 f/ C" _+ F- [; g wait for 1 sec
# l7 z- p; w; b6 ?1 P% }: I: b create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
& B+ K% P$ ~' h2 Z' j1 Z end
& X9 p7 ~% ?1 y+ [2 S7 C& C+ Cend
$ e. X! r! z- l3 S E7 r* y5 L' t
begin P_Creation4 arriving procedure
% ]) {; _- b% x* O$ s( H5 u, pwhile 1=1 do
/ @6 u* a( _% U) h begin- M3 y7 S3 f4 R: A" N. U
wait for 1 sec) D, w) h9 f& T% E" x; @
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( R+ F! u# M# N: Y) m W, R n end
: x |3 N" l+ [8 C6 A1 l+ Q" fend: o( G" s, q, Q
& Z4 ]# c8 E1 \( f% h但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |