谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
4 b7 w& P9 U" `$ {, ^3 F* [begin model initialization function
9 S5 g2 E& C s- _$ w5 | G create 1 load of load type L_null to P_Creation2. C7 j/ B# v: g; e F
create 1 load of load type L_null to P_Creation3
- m: v* e: m9 c5 X create 1 load of load type L_null to P_Creation4
# A( E6 @* _/ |. P return true
1 m4 G* o: j+ b- xend
" d" H% A4 B2 b( v3 J$ e G
! o8 a/ e) W$ a7 u) r, H( l8 E1 b/ tbegin P_Creation2 arriving procedure( N b, V7 f0 |: x! V
while 1=1 do
8 I4 ]8 @& b) S& e2 i/ n/ X begin
9 b& p# e2 P* A% s; d- ] wait for 1 sec
e& A" e' ?1 d8 b/ F create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)) g+ s! E, K+ S' k" T2 ?
end" }* r( E" r) x& @* N" Z
end6 S* R6 [; y* [4 b d6 c% g
% e' ^ s4 i9 H% s) N
begin P_Creation3 arriving procedure6 ]' p& N3 ?1 L! j
while 1=1 do
; b& _3 p& d4 b- f1 s% @ begin
! r3 W8 U9 I6 ^. X0 I wait for 1 sec, n+ ~% Q2 a2 O) g' q9 r' W( V
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
/ N2 ^- J) Q) m3 \' U end; r* x+ ` b+ k( k# ~) C( X
end
5 \- z/ E6 |; U0 V8 B! L' O0 _7 _0 y% o, k/ z" J X6 b3 B* v# O0 I
begin P_Creation4 arriving procedure
0 j9 v6 Y7 A3 O4 u, `5 Bwhile 1=1 do
: F, \- c6 f1 U$ f D) o begin
! I6 b% r% N ?7 K$ {+ ^$ i+ X wait for 1 sec
" X1 o* p" @) ?. W$ C2 y) z create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
* J) F4 q5 ~ ~& D3 f: l end; `& U. X# c! ~& ^8 T
end* K1 H) U8 `* n& ^! V) U" e
( T$ B2 b+ g' }; ?但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |