谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);. Z* `, q. n% M! e: l7 ^. p: C
begin model initialization function$ }- ]1 \: E% K y, B
create 1 load of load type L_null to P_Creation2
- I' D* f: U' g4 h, V% r, R# | create 1 load of load type L_null to P_Creation34 F, S8 w; W& R' {( D
create 1 load of load type L_null to P_Creation4
! c% M D/ B! C& a9 B; Y* m return true : j. s Z% v% N
end
1 V0 d5 D+ h# F" `# U
; q4 N4 W( T+ f( m9 G& b8 xbegin P_Creation2 arriving procedure
+ p$ h% Y& D2 b8 Ywhile 1=1 do8 S7 I2 Y( M6 K
begin1 S' L9 p& f: f. L; r2 [% p
wait for 1 sec
$ I1 U; i* g2 c( `3 r$ ? create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)4 I, [( I9 M9 _" w! v7 E
end, o3 ~, a$ p) e' o2 V
end
1 @% t- X# D" k/ d. h8 f) F: h. z3 r( D( w$ }8 g
begin P_Creation3 arriving procedure
" n' k' m+ F0 T4 O; Awhile 1=1 do t0 h0 L) M3 @
begin
+ s- B7 k8 S$ b% b- @ wait for 1 sec p8 ~. |, v8 P4 c2 A0 l. O
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
& u0 f) S/ G, D% r end4 Z2 B {! V; j4 y
end 0 M/ Q) H- x* `
' v: s n/ ~ u; e/ Abegin P_Creation4 arriving procedure2 t2 r; v. N+ I$ S, c6 B) t
while 1=1 do3 O' p9 r- F' o s
begin
7 I" D1 G C" t& ?9 e wait for 1 sec& o! F. U- z) [7 X5 J( F H
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)7 _3 g$ p( M w/ O) R3 z% L3 y) D
end; S. d( U; w X; h7 N7 ^
end
# \6 D& }6 Q8 C& n
1 n. o1 y G7 p& b) _但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |