谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
* g( M- c g6 D# p$ Gbegin model initialization function( b6 |& Y: t; ]% P( \* q
create 1 load of load type L_null to P_Creation2- W, y ~% C6 W0 i: e, |- \) V. y
create 1 load of load type L_null to P_Creation37 q5 \1 d$ p$ o/ B
create 1 load of load type L_null to P_Creation4
7 d! @1 E8 Q( H3 S. Q return true 0 t9 r5 ~$ F7 ~- x* J" d, J6 b1 K
end6 T1 r8 L1 @5 V& f# ]+ }5 K6 i
# O) _9 ]; A! ]/ Q8 M# w3 F+ C
begin P_Creation2 arriving procedure
% B. F* t6 S4 V' I5 @4 o2 Jwhile 1=1 do
% L, J$ B8 u6 [: | begin2 s3 }7 H$ C- b/ p' u# T Z
wait for 1 sec$ B# e V& I# C# c2 G
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
D& \/ q2 X* a# {- C* N end1 Y7 f ~; U: J) K
end% _/ L% C5 C$ p9 B. e
/ `% j9 s! k( Y3 |5 K( ]begin P_Creation3 arriving procedure
3 E' @0 V0 w- e( F9 F! ?/ Cwhile 1=1 do4 p" k3 i: i" j1 `3 ]6 g
begin
) F+ g) j- k5 t& P2 _$ I wait for 1 sec5 s- Y& S* k$ s7 T/ ]3 e+ X3 L& [
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)/ h( z7 g$ F2 t# z. ~; b7 I0 A( O
end7 E- c) x9 ` H. z8 c% e2 A9 W- O1 N3 k
end p& S8 l$ e& E; n
7 p& d% n! T w) Lbegin P_Creation4 arriving procedure
- w$ ]5 y: D( R9 w; Y, A1 Kwhile 1=1 do3 M1 Z M' ?4 l- D, B# Y! V
begin
' O9 ^7 v: c4 n5 n( i6 A2 R wait for 1 sec8 i, v2 ~+ E8 x" t8 N
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)! ?' p P( z8 t, E
end! b: X6 O/ f- D0 t) l3 [% u
end0 w6 E8 c: N ]3 L5 t: D( h
6 J T G3 c( n% N. x9 q
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |