谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);( v( s( H% M! n! P2 a3 Q
begin model initialization function" _- v( G) V+ L1 W0 D& E. [: W- i
create 1 load of load type L_null to P_Creation2- J8 i' S0 n8 v. j, j8 {8 M& |
create 1 load of load type L_null to P_Creation3
; U! a7 r# m- h) D# \ create 1 load of load type L_null to P_Creation4
9 O+ Q8 G/ Y$ _8 H$ B return true 6 W) }0 a g0 w% p% M$ E- ]- a) }
end1 o5 _$ z e5 n7 }% }8 q ], ]8 {0 S
( P( k! C! l* |& B" F7 N) k; ]
begin P_Creation2 arriving procedure
; h |1 g1 y6 ewhile 1=1 do. v% P, {( c1 _8 T: G* N
begin; F+ J" z; H% X; t
wait for 1 sec
9 U7 d$ w# ]' w: @- _; g6 ~7 W create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)' ]% S; {; T% }. O
end
: C+ i2 {% ~! ?' V# v- ]end
2 _: P. e" ^. @& Q
7 y) A2 }8 e, ?begin P_Creation3 arriving procedure
$ _1 U" V4 _, b7 n) A6 _2 T' ^& Q# l$ swhile 1=1 do
2 Y" S1 \9 X% a z; j: G+ c begin
, _9 Y k4 g! A8 ~/ x+ F wait for 1 sec
5 P: K' Q" \; c' P$ L" q( {0 }$ [ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
: z7 a8 j3 G- E' E, } end
; W6 w: e( e& D7 B- Hend
) }7 D( e1 r" w* O4 F5 X/ f9 D8 V/ }; h0 A; Q
begin P_Creation4 arriving procedure; f# _, p8 W. j( a
while 1=1 do+ b0 u8 X! K' e& l( b
begin" F$ h. f; k* A
wait for 1 sec
H/ n F# m! {- D! f' V/ t! g create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)8 A( Q. e; [' E* z& Y) M
end7 @4 f1 v4 z+ I. n% u5 |3 Z1 c
end
- d2 o V/ w4 _- j" `- R. ~: \/ ]9 `1 B+ t& N$ G
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |