谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);2 x% \. T/ n5 F. ?0 [3 j
begin model initialization function
& P% M' Z- {3 y6 c create 1 load of load type L_null to P_Creation2$ `, T' K9 p+ b
create 1 load of load type L_null to P_Creation3
- ^3 a1 D0 |; P! ~ b create 1 load of load type L_null to P_Creation4: E3 @+ B7 u* ^8 }3 B0 J- ]
return true , r7 J% ~7 K5 J% M
end
& p' f9 X3 c4 o) z( M$ u; h' |( b& }1 c4 B1 R# y$ w( W
begin P_Creation2 arriving procedure
, U$ r2 g3 z0 e8 J4 Vwhile 1=1 do
0 r3 A, v3 C4 ?0 q4 y begin8 @/ z, o0 o2 S; A" B/ E. V
wait for 1 sec
8 c. y7 M+ ^0 Z. A3 ? h create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)& U' k3 `' X4 o8 S( C: \* Z
end
3 T6 U! @1 A" `7 e( j4 oend
1 M9 t: |+ A. J4 C( Z G J- ^$ e# z
begin P_Creation3 arriving procedure
3 U0 H* E: g& g) ]0 Nwhile 1=1 do
1 @0 b/ p/ m$ W% v) \2 ~4 @, s$ f begin3 j$ ^. o* f/ ~: i5 Q! y+ E/ }+ U4 I
wait for 1 sec
9 o# E2 x: T3 j- ]( ^$ A. o, A create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
j+ b6 ^! Z: H: X5 A end
4 H, G) ]1 n+ z" ?$ f* J, K$ Tend
: b& }# o# G0 T7 P* T* R p$ m+ H0 n0 d& {$ Q
begin P_Creation4 arriving procedure
( V) l; H5 r; A' q- V9 }while 1=1 do
* s9 R) C, N0 H1 o, b9 i( i/ j begin, ?& t+ j* _- \* {' x; ]& |" B+ H
wait for 1 sec
" T+ r! ]1 }+ ^4 G create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
6 a5 n W: A4 O% x( z end) n3 H; R- N( i' Y8 b6 h& q
end l/ I- y& t, d' }( a& G
1 h/ `5 I3 I5 [
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |