谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);4 u* \: I2 L C' `& |$ \6 O
begin model initialization function2 Z% V4 H$ j& S
create 1 load of load type L_null to P_Creation2
5 \5 A5 l# d+ [/ N create 1 load of load type L_null to P_Creation3
+ N5 X( X: U; q, F8 z create 1 load of load type L_null to P_Creation41 u4 O1 e- z: i- Z
return true
6 o* \. [& e0 L; @4 |, A1 @" D$ Y" |end$ p# N9 r! j. V; j( S4 [! Q* |
8 ^# ^4 I) D' obegin P_Creation2 arriving procedure |3 A; v9 h" L+ d% u1 A
while 1=1 do
; v6 u& [) D) q3 j% a% C: m2 Q begin
- r! v- C" o3 F wait for 1 sec- r2 Q; k2 y" t& N
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)& u& m- D3 A3 j$ c; D2 k9 c
end. |( n2 {5 I& k J/ |- c$ @
end
" L9 _+ f- Q, i, T4 Y3 r; A( F
. }" _" Z/ @3 J9 z) Wbegin P_Creation3 arriving procedure/ U7 J3 P% b' I0 v4 K& O
while 1=1 do
+ [! w# Y, w/ N1 a. y begin
6 h: Q; x% E2 L6 g% ~ wait for 1 sec, C, `7 ^; H: Y/ {' w! ~5 v
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
" z& u- L& R/ J) a4 [8 a end
m7 M2 y6 G2 h. I s% [end
+ Q ?1 \, H, o1 I' m8 U( z N, L( L' Z4 _8 y2 z. L
begin P_Creation4 arriving procedure6 b5 @7 b1 S" u% B" K
while 1=1 do0 x# }$ V2 R, F# `
begin( V) i/ _6 k- F3 `8 k5 h) n* s8 r
wait for 1 sec
t6 q5 K4 R6 R5 B' Q create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)7 f; N+ f& }1 p N4 S8 h
end
" V- | V0 i: Y# ^3 _end
& h1 a: k! e1 ^* a/ P
' s: @9 [" x+ i% Q: u M, p' @但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |