谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);- Q# _, @3 {0 ^/ o
begin model initialization function
1 s2 F2 j4 J/ G7 C9 }! K* F create 1 load of load type L_null to P_Creation23 @# u( E3 ~: s3 W) N
create 1 load of load type L_null to P_Creation3; w" d$ ]1 U0 u+ d- U
create 1 load of load type L_null to P_Creation4
/ _) u9 E! x; ^: Q# J" _) w return true
$ _, p1 U5 W8 r& t% Xend
$ W+ x7 ~) e% d/ q: s. _" x& J. G5 p) d! q) Z( D
begin P_Creation2 arriving procedure" R+ g/ z& L) ?! S, M
while 1=1 do& D0 S3 O: C- u, ]0 ?+ ?2 F
begin! }: w, W) q- e3 a3 G
wait for 1 sec2 d5 X( X* K/ B$ f1 L, h
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
& g/ [- K4 t3 s0 a, |4 h end2 v# H6 E. W& ]# y6 g: ?3 e
end+ f" V. Z0 O) O g) u- s
* p8 w a3 `1 p7 J
begin P_Creation3 arriving procedure
, u% \: y+ b' t) k6 X/ N, @- |while 1=1 do% {6 y7 W/ E' f
begin$ o: @1 O, W$ B2 W# K
wait for 1 sec Q- |0 q: [# Q
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die). A" d; R* h, y- M/ D- j
end' W4 a8 D+ Z" |
end
( f/ d* w' H/ R9 Z% _
4 S& q \* I# A% lbegin P_Creation4 arriving procedure/ H( h* I0 @% r. b: m1 E
while 1=1 do
6 q( u6 M7 W5 |) A Z& t1 y4 ` begin) f3 a6 ^ J& f& o
wait for 1 sec1 v' K1 i+ C) X8 |' r
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
3 ^) C( k, r# A* i$ r end, c) j0 R( o9 M+ p9 @2 b. T2 [: X
end
! e" l6 }0 ^! S* Y3 F* w) z: \ ^% ]
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |