谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
9 ^, i$ j3 h8 ]$ D& R7 ^0 Nbegin model initialization function ]1 j5 [, T# R" i
create 1 load of load type L_null to P_Creation2
G$ ]0 Y5 S+ w S create 1 load of load type L_null to P_Creation3
/ O" w1 k& {9 M v, g create 1 load of load type L_null to P_Creation4 U/ T5 ^1 m1 I' W R8 X3 ]! J
return true $ y8 {8 J6 Z+ s
end
1 d9 x3 c6 D* S
6 g0 L8 g) m6 Vbegin P_Creation2 arriving procedure. S! G3 l( I7 ^- H4 P }; y' i
while 1=1 do
& F5 w# N( [0 @: m' m* ] begin
( V9 }; V+ [$ g5 P, U% n wait for 1 sec
: }* {3 E& |8 @ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die). r1 O, B5 F- _: _( F8 ~, J
end
0 N# Y+ a7 A3 S7 k" rend
; L; U1 d9 p x9 M& f1 V
. k( j4 B- N* s' Nbegin P_Creation3 arriving procedure' \$ W; O' t( b* X* f Q) \
while 1=1 do, D' I) \% O1 a) ]1 j
begin
. E$ t5 @: M) p1 D8 K* w wait for 1 sec; z- b/ s+ h9 T* |2 T
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
& O6 u% s7 e, Z& x end
' D/ u. g& y, a2 F% \# ~: eend
3 T3 t5 Y# t7 v+ z0 ]) ~2 O' O$ W1 p" m4 J7 o, \
begin P_Creation4 arriving procedure4 i. C6 Z! k/ B, @9 \6 E
while 1=1 do4 f% c# G, Y4 l
begin
4 G/ Z# `8 p6 L: m# M$ d$ Y wait for 1 sec
2 J2 U& ~2 |! ~# y, O create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
5 L& y& ?& i1 L& \1 T1 ]7 o end6 p+ l: K2 t7 E
end5 x9 ]9 g/ m% R1 U- {0 s# f% k1 | J8 G
+ h2 F9 x' Q5 g/ }4 Q& h# ~但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |