谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);" `% m. l& |4 G
begin model initialization function
, O- K/ m" b+ O: |3 g; n- J create 1 load of load type L_null to P_Creation2, h% J; s' A0 m
create 1 load of load type L_null to P_Creation35 {6 }& Q' w( a: [+ P, E
create 1 load of load type L_null to P_Creation4
' s" v7 _2 @3 y/ S) V/ D" I return true
2 ~: }* F- _6 F. hend
N! Y1 O# K t2 i
; V7 ?+ y1 ~, H- Z( I3 ubegin P_Creation2 arriving procedure. m. J$ p2 g. o# u3 {2 j4 F
while 1=1 do% M! J+ K* t& C7 a1 s. O6 `
begin
) R: Q5 B% u" k7 a1 ^ wait for 1 sec
; W: z+ \! A( x2 K create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
3 x- U! T. B# e6 u/ i end
4 B/ g( c% O" \6 k% l$ S8 Y5 `end" U' M3 s5 m. L% T$ S0 m- Q7 g
9 Y9 r% z L, r1 U4 n0 W
begin P_Creation3 arriving procedure$ K3 |; p1 X) E! I
while 1=1 do& n" @ [/ c& C; F9 ^
begin
. I, G4 [3 [- h; Z b; ?$ m wait for 1 sec
; w0 K0 D. U, w create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
0 b$ @% @1 K* J$ J- A. A2 ] end
& M5 R+ v2 J! W" i8 b; {6 I/ P& hend
! r, h# J1 K: {! f
- r- e! c) u3 O6 l( C$ ~$ P0 Tbegin P_Creation4 arriving procedure
" [6 G* `. J8 a. }9 ]while 1=1 do
/ Q2 }+ ?$ q$ p! J begin4 x% P' n$ _: K5 @
wait for 1 sec
2 B" y6 J g( d1 o; v% x5 C; n create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)* @0 G% @/ Y( P7 ?. K1 b' O5 G
end
/ S n* J2 ^( z; d. D' {end
: @$ u5 W1 T) G0 k% s' m* k: P, M
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |