谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
* V* b$ E3 X/ Q# nbegin model initialization function' l* X* t2 g+ t G
create 1 load of load type L_null to P_Creation28 a1 F1 o) }) D, X$ g& [9 C4 p
create 1 load of load type L_null to P_Creation3
8 f; L8 `- M' X& p% f create 1 load of load type L_null to P_Creation4
1 j @ ~1 L/ t- N% R) y. R: U% \ return true . J& O0 `- ^' p* e, F- E/ K3 x# k$ a
end; S3 u- K2 K8 Z4 B7 Z6 _& ~
6 Q0 H" E3 q7 s2 I; D: p
begin P_Creation2 arriving procedure" b, W' [$ l, M
while 1=1 do
* I) M6 N1 M, j6 Y! z2 l begin
3 L+ @' d) j& Q wait for 1 sec
6 \4 ]+ U9 J! `$ R9 `% [ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
+ v% T0 W5 m9 ~3 r3 c end
! ?) A6 ]7 k( f) E6 V v4 }end# n: ^2 e* o- U
b( Q7 L5 x# \$ V4 ?# u
begin P_Creation3 arriving procedure
0 F; L4 |6 R, l* @5 jwhile 1=1 do
- [$ l* ]. F" }2 s( W/ [: _/ u begin
- d+ |; ^4 _3 r3 |" x; h wait for 1 sec
# \8 s! c! N% A. h, S create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)# W" ]2 p; B2 N5 X: e: U
end# s' g' M. L# Q9 g z3 Y1 M/ G6 q
end # r# c8 @1 L U- u8 @- P( K# G
7 g0 s9 J% Q# ibegin P_Creation4 arriving procedure' ]1 u6 T w; l
while 1=1 do1 W8 X7 S3 q- F, e$ g/ {. q
begin
% W. G- t3 Y, ?8 U0 }5 T1 D wait for 1 sec
3 R. t- a$ i5 C; Z create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)" J5 a1 |6 l. Q% _
end
4 F5 j4 Q2 L- B/ z6 c1 Vend% y# r4 a* t3 {0 d' T7 z/ U1 ?0 ^7 S
6 j ]* E, n' G& P/ r! Z但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |