谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
* i2 f% _9 |9 A: X+ @1 D) Tbegin model initialization function
7 V- J, B# x8 G! I _( p, I. H create 1 load of load type L_null to P_Creation2
+ m$ d: J0 Z# N9 j" c create 1 load of load type L_null to P_Creation33 u0 ?% D7 X9 a/ K/ p
create 1 load of load type L_null to P_Creation4
, q! d: Q" c c# _ q4 j6 m return true
( e) g$ `' q( Q, D& F1 T9 Mend) D: s. Y" A0 V; b
8 s+ _6 D/ w! n; rbegin P_Creation2 arriving procedure& c0 F; a( e# q& u6 T# o7 x
while 1=1 do4 m# ]. W% o3 Y* D4 a/ s! C2 Y
begin
+ p& f9 N" b$ d' e! u% G wait for 1 sec2 w2 i" e$ d% Z. E2 |0 L3 W6 X. @& x
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)& @& Q' \) {7 t7 ~8 Q
end; v$ [2 J6 Y# q+ |
end" `2 |, N" J# Z! h7 J4 F
5 C1 Y9 B, @" v, {begin P_Creation3 arriving procedure5 V. I6 ?3 ^ b, C
while 1=1 do" K, l5 T$ Y1 B8 a0 N
begin
! K9 u, P2 N7 f- G5 m) |7 F wait for 1 sec& H% H; z& J. W! Z$ r% Y) [1 S
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)6 w* k" i# @- @+ D4 D
end5 o- ?1 r$ o- j3 ^3 H2 i6 N
end
: X; n0 K) k- x( ^8 E4 T- k2 I, r( G7 I8 G
begin P_Creation4 arriving procedure& e+ Y5 B4 C, n. m$ s# y
while 1=1 do
' x4 f m- o& ]" \ begin6 Z8 J, A v0 u P/ U
wait for 1 sec
# A5 g5 x% `: x* w/ W9 E5 \5 n& _ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 F% n V/ @1 n! S
end; B7 j0 T% b; I- h( N: C1 s+ @
end1 n* g' A( f6 q1 u4 t, r
# H9 x. v1 a4 d3 j. Q3 c( K. W但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |