谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);, c% a; K% d" b9 T* W/ S, c" }
begin model initialization function
% d8 h6 A8 _' `' o- d create 1 load of load type L_null to P_Creation2
# r5 S1 x. k! F/ \7 ?: W1 J create 1 load of load type L_null to P_Creation3
3 N9 O9 O6 h3 r- l, U/ {+ p create 1 load of load type L_null to P_Creation4& Y* n$ A) K' M: y4 @
return true
* c+ e) T! _) Uend
j) r" L4 f7 c
+ K* [! P. U$ r4 f! Sbegin P_Creation2 arriving procedure
, S4 g8 u' h5 U5 x! U0 ~while 1=1 do: E! ^3 ]: b8 O" h( O/ K
begin
^. j! o9 a* o; |( D2 i3 R5 F wait for 1 sec
1 a2 h* G9 A" i create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* N, m8 V( ?# Z9 i% N. V' X
end2 t9 { x0 W0 F# ~) U: E
end8 R7 C, }1 U2 I9 K7 i& p
0 j& W( n: P( I; hbegin P_Creation3 arriving procedure8 }$ L3 |/ Y8 r9 A5 B' q3 `* p* G
while 1=1 do) V1 y3 o6 e& q4 X1 A
begin
" L6 n( \# C" y' ^! V- c5 D wait for 1 sec, A$ h7 [8 ]* s% I; Y& m) L
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
: S# _3 ~4 Z) z5 ~( a# E end
) b, X( m$ _+ N2 ]end 0 v' }% U/ q# Z
9 t$ K. v; p1 D `+ ~8 ~& sbegin P_Creation4 arriving procedure
. {! N; D: B# d& N; D( ? B! N$ Gwhile 1=1 do. _7 R8 N8 m. ^$ _$ G
begin. K7 f6 x1 P5 G0 ]/ m/ V8 n
wait for 1 sec! k' o3 D+ I9 F
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
+ F* l0 }. ^1 r& d+ e6 u end) f5 Q( v: l2 x1 w. o
end7 f) m$ x4 X2 N$ M1 O( E% X
7 r1 e7 }# o6 |5 ^
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |