谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);* c. c0 Q0 J7 N7 W0 J- K0 j
begin model initialization function
0 z0 L {! O3 z create 1 load of load type L_null to P_Creation2' {9 Y3 _, e& e1 @7 d* Y6 s* I9 v
create 1 load of load type L_null to P_Creation3$ c& ^. [' _. E
create 1 load of load type L_null to P_Creation48 B v/ s9 V' W5 j8 Z; }- `1 a3 Y6 U" e
return true
; R4 H3 F5 c7 aend
+ s. z" a, ]! k9 K# |4 K5 a$ W5 L; U
3 N2 E: Z" `+ pbegin P_Creation2 arriving procedure
# W/ k1 S& b* D, mwhile 1=1 do
% `3 E6 j; c5 `( I begin
" f9 |0 ~( D; t' m: P3 n wait for 1 sec
0 m4 o8 c- x( k create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)5 j+ N3 m/ P& @, d+ m# y
end
0 c6 P1 o$ j5 B8 c0 W! lend
- W% B ?! M; x0 N0 B* j& v' n) t( Z$ t1 y, v* A+ f
begin P_Creation3 arriving procedure
3 v2 n8 |# K& Z5 e9 Xwhile 1=1 do& N) d4 o+ C2 D' T, O
begin
4 a0 F5 p8 l- G3 X# I3 I ~/ D wait for 1 sec
8 R% j% p) t: S/ V% o, W" Y create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
7 o7 X. W" s8 O7 ^1 B end* J5 }: j* C, L; w, T% e
end
* u, i; D6 }- U0 G6 V: f$ t' o9 v2 C' `- u: Q
begin P_Creation4 arriving procedure
9 J6 h5 @( Q9 ?; ^while 1=1 do" Y) D+ n" Q8 u9 G) W8 C L
begin. o8 U, ^: P; Q9 E
wait for 1 sec- a% x6 Z$ D& ^5 O! _
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)4 S( `3 c% }6 I% P: v/ ~! g
end- n+ l- ]) S, U/ i( L- C5 d8 _( d
end
7 |0 m2 n8 C0 Q. S8 H9 P6 t, [, s" R+ P
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |