谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
; `8 g' z |6 X# I& z' Ubegin model initialization function1 g/ h8 _: E1 [# E& S0 @( a) v
create 1 load of load type L_null to P_Creation2
3 W5 c$ ^6 C, S. M1 i" E2 d create 1 load of load type L_null to P_Creation3
1 e. E9 G( @$ P/ g create 1 load of load type L_null to P_Creation4& I" Q5 b+ b- ^& |% t! h% Y
return true
1 j+ y1 g" v1 q* Bend3 ~: J; u, o" s. d" l
5 o8 S" M1 P$ t2 Q- i
begin P_Creation2 arriving procedure3 |) g# ~ ?" S8 c
while 1=1 do
. }: C* [% J* V- }" N0 t* S' | begin& `: R- g! P: [6 k9 b9 l `
wait for 1 sec
, p2 d0 [ @8 H" [$ z create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
5 F" q2 U: R3 [$ I2 M3 c end( j# C5 p+ D( y1 V& E
end% D1 U& ?; r! K# `& A& V$ b$ |
+ f+ ~) e+ \" s6 S$ a/ ?: lbegin P_Creation3 arriving procedure
7 n Z b, o6 P6 |& e0 E! Z8 I. kwhile 1=1 do
% B& K& ]5 d1 n5 C, r6 D- w5 H begin {8 W4 \' s, k% z
wait for 1 sec- V9 M. ~* |% H4 R
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
9 X- g- i" ]1 g5 c& d. {3 u end
( A& d5 s/ w% l- |, }' T% ]end 3 |& @3 b. i3 J
+ [$ H+ L& i2 P z' Tbegin P_Creation4 arriving procedure
" C) h9 G q6 A/ F; mwhile 1=1 do
3 Z% R, c( L6 M/ B# o- | begin
" h$ j, @) [% d' @* u( C1 @ wait for 1 sec
6 P. i8 r. ~ R; ^4 L1 H$ F create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)( Z& U$ d- l* R( D2 f7 y
end% M" ?) f8 l% q% W2 D. |6 |! Q
end$ p/ ?% ?6 P6 F* A5 ^+ m
' z3 B0 T% L, a但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |