谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);9 ]# V, o+ k* Y- w5 v& r
begin model initialization function4 l9 Z" `' r8 A( y! ?7 y( d: V
create 1 load of load type L_null to P_Creation2
4 ?, {2 x4 y) y% s! T create 1 load of load type L_null to P_Creation3- z. {8 R2 o% h q
create 1 load of load type L_null to P_Creation4/ m5 k/ ~; T* Z, b0 S. V
return true
% G% v! F3 a2 H3 Jend, o$ k3 @7 X" u4 y
j+ o! Q3 s! d/ ^' @
begin P_Creation2 arriving procedure$ j+ l& E1 p7 K7 h
while 1=1 do
, D( Z. E7 f, i7 p begin
4 U: u& k/ v* }4 x wait for 1 sec' L$ F9 m; r1 s' u/ U5 X
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
. z. U% L. B2 K: |, ?6 B3 @% ? end
* X4 R$ G7 u( L5 @& p# A4 Jend
. R, I& J# ] r1 ]& X, y3 h0 g2 t$ e$ t, V
begin P_Creation3 arriving procedure
! i" B$ z' Q h1 cwhile 1=1 do
* `, T. I+ A# Q0 t( j8 m6 f2 s begin1 J7 Z$ O. Z. v4 l( V5 `9 r
wait for 1 sec
6 ~% H) T5 S* ^& x create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
- [ J) K& Y/ ?' p* ~ end
. V. _$ K! w7 d O$ n! v7 cend
7 k* @7 M- k% q( J1 m- f3 \/ L+ ]$ r* a* ]
begin P_Creation4 arriving procedure
+ D5 Q; l* u; wwhile 1=1 do
; e K3 @4 p; k( q7 ? begin
5 M, e1 d1 w* I wait for 1 sec
' F+ K' i6 u, @8 k6 s0 i create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 E+ c Y" C n& f, S8 T
end
$ A" D+ x, P3 u* d' _4 j4 T4 @end: ]1 ?( E% B9 ~+ M; R- c8 T* b4 C
7 f. O6 U3 W& Q6 ~/ I+ ^
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |