谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
! e0 g) f. p" D" J# B7 X qbegin model initialization function
4 \4 n% t \4 Z, e s create 1 load of load type L_null to P_Creation2- ]' o" x _4 _: X
create 1 load of load type L_null to P_Creation3 w& p! v9 g$ X9 O- ^0 n' T' v
create 1 load of load type L_null to P_Creation4
7 P1 y; [! N- C4 n3 i: f( F9 J3 x return true
; O% ~# T) H/ b, @end
/ f- h# ^* X7 m2 R5 u
) g4 A" N* v* tbegin P_Creation2 arriving procedure
0 I8 [. g5 R I: g* nwhile 1=1 do
* i1 c* \5 B- z begin
, p8 h, U6 [ n+ M$ ^ wait for 1 sec/ |+ }4 {8 ~( a
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)7 @0 P$ I. d8 S5 L$ p1 i
end
7 r' L# n- g# w Uend, Y. k. R; S O+ q2 t9 C k0 B* r
, |3 z0 r+ |: b9 {3 Vbegin P_Creation3 arriving procedure
* k F6 K) m0 U" b# o* Ywhile 1=1 do
8 [5 M f! L) d. J: `' r* L; D begin: L" E& X. p( ~8 Y- I
wait for 1 sec4 e* U' |* _% C7 }# y
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
* h; l+ D$ }0 X. y0 O end
7 r* a6 f/ U0 F3 i, iend 4 w$ ^8 Z4 U1 h
2 {4 \( v! B' e- s) mbegin P_Creation4 arriving procedure
* {& G' `" B1 J( J0 Z9 L) Gwhile 1=1 do+ X) j7 N2 `% _
begin8 ^$ _5 ]; {' Y9 C! a
wait for 1 sec: d& J0 Q" B7 m5 N8 m4 u
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
* m3 A4 ]9 r# H* ` end
\5 A, v' H, oend9 @/ Z, H5 X- J* n6 ~4 I% {8 e
- U3 ^4 u( y% P; j, k; D+ J但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |