谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);3 w6 {1 e2 @4 O9 u
begin model initialization function
" V4 b4 c6 Z5 M create 1 load of load type L_null to P_Creation2
* r8 r9 [& K2 M1 J1 A' x) y3 f create 1 load of load type L_null to P_Creation3" |+ z& D" w) s# T* K
create 1 load of load type L_null to P_Creation4+ V6 g0 |8 [% H
return true
: a% s' J- F C: E: i! jend
; \+ L4 |) O. d+ \; }- }- L) N8 ^' u4 D# K- C" ^2 X
begin P_Creation2 arriving procedure% ?+ c" ~& h: O6 i4 ?, Z/ M9 a% y
while 1=1 do
1 Y+ {4 Z4 j4 Q* Q3 [$ F8 d begin
# J7 v. X& }7 v5 j' | wait for 1 sec. W% b5 m3 a6 B* b. L
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 `/ }" H9 }$ \1 D! W/ ` end$ j3 d6 a7 v$ ]+ n2 p8 s
end
4 n8 R' R! T" s
4 g8 ^6 N# M, xbegin P_Creation3 arriving procedure
& g9 e6 z+ F5 R% U' ^7 E9 R ?& Mwhile 1=1 do( `" g& n) o, E
begin
" ?4 Z* o8 o0 S wait for 1 sec7 P. p, A0 o4 X" t7 @- R F% j6 J
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
, N, {9 K0 k0 T6 l; t. |$ g end
3 d! Q4 {3 {0 B5 J. o& fend
8 \3 f9 H7 _' ~/ N7 M, x" K0 Z+ \: J
begin P_Creation4 arriving procedure
* n/ n; n# r( b3 g9 I7 Xwhile 1=1 do
( x' W j R8 F% b$ j$ S begin
0 Y9 I4 w+ p! {+ I; ~ wait for 1 sec4 f8 K; n- ~8 V. o
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
" n: _7 w- F1 J5 F4 `/ M end
! M+ r }* q {end
) T& V! M, `% @9 ?' y9 t- S3 {8 r. ?5 i* x" T# I
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |