谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
# X* _& W# L: F0 `; }8 rbegin model initialization function
& P$ E& U( i2 I create 1 load of load type L_null to P_Creation25 }* B/ R6 f! }6 x5 P3 @ G, a- ^5 o
create 1 load of load type L_null to P_Creation3
% V/ {- j7 ^2 @ create 1 load of load type L_null to P_Creation4
# R( |) J0 f6 g1 T return true 3 R+ e" B9 }5 }% D0 Q
end
6 c6 E7 i7 {$ \) }/ Y0 Q T( o1 h l+ y( E' G
begin P_Creation2 arriving procedure
# B$ e; z+ T) I0 p! ~2 m9 j' C+ Iwhile 1=1 do l8 K- V6 o. Y2 T- D2 X" k: A, s
begin* _1 q* P& f/ K0 ~
wait for 1 sec6 B3 Y! N+ p) [
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
) K# d6 f& B4 g2 X% J end1 d" v7 F o7 S- O& X' |; r9 q
end
/ Z1 T7 } d, I) G& J% c6 m
2 }) T( n- P+ |; w, pbegin P_Creation3 arriving procedure6 Q, f* W5 B$ W0 m" K/ n8 @, J
while 1=1 do8 l+ v6 K3 t8 c2 O0 M
begin7 m7 I, s& n5 g6 i9 P, Z$ I6 q
wait for 1 sec
" U2 P: u/ S3 l% A: g" l+ t6 m create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
% ~! S2 N; |+ H4 R' [3 ~ end- O( A2 I. I5 D& _
end 6 o2 Z. p# u9 Y. q+ e* x
. W9 q. O! Y; Y h
begin P_Creation4 arriving procedure2 E; e7 w7 l5 P; l
while 1=1 do
8 T8 b: s' _" j& I3 q+ l# }. N begin, }( ]" a; t4 W' z+ m7 l
wait for 1 sec& Q! C" n; L \
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
: d0 l* E9 _) w$ a! n end
, R2 j. a8 d+ _: Iend$ O- |! C* q* ^# `3 b
3 f- T! o2 L1 l但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |