谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);0 x N9 {- V( p! }5 m! d( |+ t& P
begin model initialization function0 Z% r& a+ e5 {
create 1 load of load type L_null to P_Creation2
! T* |/ u+ q# D5 R. J$ d; s3 y create 1 load of load type L_null to P_Creation3# F& ~1 c+ c1 I6 x% {. X) J! W2 a
create 1 load of load type L_null to P_Creation4
: h# e$ i* Y. U return true ) r5 ?; y: F, x& W( h5 b
end2 H! S4 N- r9 i+ `# |
# X+ O( h8 m1 Z: Q% Pbegin P_Creation2 arriving procedure
" ~! ?+ y* t9 e' B8 A, `while 1=1 do6 z. t( r# N& Z2 _9 |' |
begin
- E4 Q% h9 `8 y1 B/ F* ` wait for 1 sec( Z/ U1 j$ A; v( s- B! J" M" W1 |4 ~
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
* L9 Q- ^2 l8 i$ W! M# x. V9 [ end
, O; p7 _4 ~1 l+ J3 wend- \4 w1 }& W0 q6 R$ |7 r
3 c: s n# ]; E) G. j& k mbegin P_Creation3 arriving procedure
6 E/ f/ r. a* N6 @while 1=1 do
0 F, M8 W* A, V: h" G begin
0 m1 s2 c! v6 V: A$ C wait for 1 sec
7 R# l; q" Y2 `" I5 f0 P+ v: I9 Y& F create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); o5 h) \& p2 [* w0 ~9 ?9 u
end
1 \* i5 _; U2 l4 {% A- U# Hend
* Y4 z9 i3 t: K% i
, p6 G9 v! J( G. m: Qbegin P_Creation4 arriving procedure
% U$ ~1 w+ t. x* H+ i7 ywhile 1=1 do
; i9 N/ z: F8 W* p# A$ x5 |; ?! W5 a begin
" \' B9 a: b1 C r wait for 1 sec% y+ t0 M) d7 F9 ~8 P+ U y/ i! `
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)1 w m! ]5 X6 i9 l) n
end
( p9 f- W% O( I, p$ }end
& Y$ L7 ]/ e' ^: H2 L$ ^2 b7 |6 y9 t- ^+ E* p* P. u8 j
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |