谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);2 v5 K4 i7 y. X( z" e
begin model initialization function1 F; d( i# i+ Z+ O. J
create 1 load of load type L_null to P_Creation2 i! P* S C" F
create 1 load of load type L_null to P_Creation3
* W' W3 r+ z. [4 _ create 1 load of load type L_null to P_Creation4" q. n. m, o: X
return true $ u% l+ K, n; r3 D6 R \, Y
end3 |- t& Y' d- `/ Q, Q* y3 ^- j2 z
& ^* E% A1 L- U4 o6 ?8 r8 Y1 [8 h1 Zbegin P_Creation2 arriving procedure
; m8 K7 S- l3 U( l$ H* Wwhile 1=1 do2 }9 U9 n7 a" y& R& w
begin5 y1 b5 `* ~( W1 \4 |* V
wait for 1 sec# ^- V5 Q$ U8 _: T
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)/ n; u& M4 x! A* ~; E/ [
end" s% j8 A$ O6 @1 X$ U: u$ P
end
$ e& Z5 h" O/ j/ j* ^1 M7 K2 S( Y m" N
begin P_Creation3 arriving procedure
& T; H0 [2 l# n% nwhile 1=1 do) `4 E7 @) Z2 P1 b9 Z) ^8 W
begin
1 r! X' ~8 g( F7 r4 `3 Q: a wait for 1 sec
/ D, O# W. ?" z3 W create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); F6 B% [! H, `9 x _
end
8 k/ _# S' m7 A5 |' }" W% Wend & B+ g( {0 H$ z) I% j
1 J# X1 l6 o! u3 j2 A; |2 Pbegin P_Creation4 arriving procedure
G6 f o6 a& D/ D0 O7 swhile 1=1 do
( M4 E( T. O9 r$ E begin
" f/ C: x( ~% [, ]$ Q6 F wait for 1 sec# S; }6 k9 I6 j8 l9 Y7 a, f B3 i% E
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die); q2 ~, `4 u0 p6 @; Y
end
0 i6 c* ?. u0 z# l: y+ ]end
4 ]' E! x9 ?9 A2 ]! H5 X/ |$ c
/ l9 |5 o+ t& ~ W# c但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |