谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 w* w5 p- Q9 ]# k ?begin model initialization function
: ? s: b3 y1 F" |+ ? create 1 load of load type L_null to P_Creation2
8 x) F3 A( z' a4 Q create 1 load of load type L_null to P_Creation3# Q4 s6 I# H) W5 N
create 1 load of load type L_null to P_Creation4: F. A" {; A# T0 U$ k" x) [
return true $ D) }5 g3 h2 ^5 C! r
end
: f0 n7 F3 ]) M5 r+ P+ a* j1 A! V: R" b- H5 S, ^8 O3 N
begin P_Creation2 arriving procedure
4 a% \/ ?) ]( }$ e- Awhile 1=1 do
0 h) a4 m S8 s5 m t begin
( f e# b0 q/ V8 t1 Z3 } wait for 1 sec
# }! l3 X0 M4 m' d6 x/ j create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)4 }, [9 L3 Z% I: D3 ]% P0 c5 a
end- [ D' y- V5 L# s, C/ E7 y
end( O7 `' _( ]# U2 q: }* T0 A) z
0 P, x% G: V8 A3 m8 u6 {! b, Cbegin P_Creation3 arriving procedure
4 C. s) q8 Q: l* x" xwhile 1=1 do1 ?4 d0 W: ^; m& V3 s
begin, p+ [0 h8 A& i T2 @- Z* Y- p
wait for 1 sec
: G) K; X& ~/ n( I7 [- h O create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)" Q4 `" i8 h V6 N
end
8 [: a' p5 x4 n5 \+ g5 Q2 Mend
& S1 T* z( M2 u6 B' ]' L' u4 u' K& w+ K( t
begin P_Creation4 arriving procedure2 e1 [5 X: e0 O+ d* n: T8 ?
while 1=1 do3 }$ ^# u" K9 X8 q( x
begin3 W0 I T9 k6 Z8 ?" O
wait for 1 sec
3 S. H, p( W9 v3 f. b create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
3 P4 S* _9 a+ Y; m2 Y" U$ i end: W7 U( ], _0 r% s6 M( c }* v
end3 r3 O( Q4 o7 |% M
! Z6 N* V( Z5 i但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |