谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);6 t) j; W' h* T3 e, M* { P
begin model initialization function/ P& E. w" q6 h0 X% c. a* I
create 1 load of load type L_null to P_Creation2
1 V7 Y; S( X: Q% `$ ]0 j1 @ create 1 load of load type L_null to P_Creation3
4 ^. N! p3 i1 b, C6 d5 P create 1 load of load type L_null to P_Creation4
U9 O) p! a+ l' X1 t6 P: x! D return true
h+ {* G7 I8 ~) Iend" Y# K9 k: d" ?0 u% [. \
. ?( G' X5 _! D6 a# { p$ J
begin P_Creation2 arriving procedure
2 m" {. [& \" `* |7 Y1 U+ Kwhile 1=1 do
' d" H$ M# E1 h2 ~% p, W; B* M0 l begin/ z1 c9 q5 @, j
wait for 1 sec3 P$ }+ Q5 e3 m" d& o6 p7 k+ S( e
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)$ O, H# h4 M. ~# i( U' h/ T
end0 J5 {7 y) k" @# l! X M. M
end( r6 w6 m" k3 m% ?5 Y6 X
& E* D6 v/ _6 ]- L
begin P_Creation3 arriving procedure
7 @9 d0 y, q: A0 P5 }- swhile 1=1 do
; k6 n3 M z9 z7 M+ n& h, b. U begin' Y x5 n% X1 C0 i7 @
wait for 1 sec7 W! J4 N6 p6 l- J, X. K
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); B3 Z! N; e& S/ t
end& b( K) Z9 m% D& H
end 9 v! y* V i0 T8 ~* M/ x
0 X* r& s8 b) i! x# _; O3 o! i
begin P_Creation4 arriving procedure0 a) E: W2 B3 f
while 1=1 do2 g( ^- F& I2 _+ y( B
begin
, u8 i8 J* q( o% g4 ~ wait for 1 sec
: y7 E X. V3 x- ]. U create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)" Y& d0 b0 M+ ]7 L* M: E
end) G" q( ?' u, M+ B1 B+ ^
end' U6 T$ a* Y0 G! D8 G* [
! n) n0 j6 }# ?但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |