谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);2 Q" }' V. Z( }3 K% O
begin model initialization function- s. l2 H. X4 Z+ z
create 1 load of load type L_null to P_Creation2
( N. v, s7 T! K# x: { create 1 load of load type L_null to P_Creation30 z- Q) V7 {( y2 n
create 1 load of load type L_null to P_Creation4+ h- {7 u1 Q. k6 X/ v' K
return true 0 Q$ J3 o0 z+ x B
end6 y" `: e8 i: a ^6 G
5 i2 A: }" W+ q( l7 o
begin P_Creation2 arriving procedure/ [0 C* P1 p2 r" I+ S2 ~7 z
while 1=1 do
) E0 ~ H- A6 T# E6 u& S begin
N; B. T C- Q( U3 N1 u1 T wait for 1 sec; g- F2 _( e5 c- U N
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
5 @ i ^5 o/ f end$ g. W, {* K7 V. I" a9 b
end
9 z: X0 r( W* {: ~: y
9 K4 i3 l+ b4 [8 r+ b/ S5 pbegin P_Creation3 arriving procedure
1 C! D* X* G) s! A7 l+ cwhile 1=1 do
% m6 G$ t! C4 ~, R( Y) C begin3 c$ i. v0 y* C7 l4 Y- D
wait for 1 sec
1 K% E9 r/ {; p7 ~: M' d create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)3 O. Q! t4 k$ p% p6 @+ C
end
% G/ K# Z; _8 V9 Y+ m' r& Y5 Send 2 S0 m, P: \+ H7 `& {; M
: ?/ B$ I) w5 t
begin P_Creation4 arriving procedure) |, O+ Z) ^2 s4 c4 ]" _3 T
while 1=1 do
9 m, ~+ B! _! H7 `0 V begin
- F1 K. z9 \* B8 a wait for 1 sec9 g" Z& u6 k, H/ v x/ N
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die) b3 }; P' y3 O2 P0 K, h
end
, K" h! h A0 R& |, W: u% Oend$ ~7 K8 W5 U/ N ]
9 z7 _& ]' h: ~( l1 d
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |