谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);: ^4 i7 G; s) D! f# a. {
begin model initialization function
- [7 E. o+ \0 r+ D create 1 load of load type L_null to P_Creation26 P8 Z' ^, B3 U5 l: z
create 1 load of load type L_null to P_Creation3
+ ?8 P( g( o$ F, r: Y2 C create 1 load of load type L_null to P_Creation47 c2 @) j0 A; J. P/ H
return true 7 C5 o9 o* Z) z- \
end
6 }; }! d2 e3 {/ G" i7 p+ i' w) o7 P9 i
begin P_Creation2 arriving procedure* l" H* P% J4 f' X8 h! R
while 1=1 do
# V4 K$ H# e, e. T; Q6 g begin' Z# C% i+ C7 T) {; k* u- a3 W
wait for 1 sec i8 K3 G! G( i# ]8 |6 X j
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
" }9 l) L6 h+ l1 w& I* G/ ?- v" ?& U end
4 j' q2 A U/ c$ Z6 \; P) J8 qend
: b1 O- W! C6 d0 e4 d
7 ~; \8 v! }; m7 V+ ?) qbegin P_Creation3 arriving procedure
# X- j7 ]6 w* |( p( f/ Owhile 1=1 do. b, a- i) J) U) i& [* q
begin0 @7 e3 _; c- U: x2 K) W. t
wait for 1 sec
# p& X* i( V+ I7 P0 ] create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
8 c0 E- D$ N- S; ~) C end
" V4 [7 z! R" P2 c i9 ^. a# D% ^end $ L, e, b4 f. ~, |& x; Q/ S
, |0 n' h$ n& E5 y5 t; Z3 v( dbegin P_Creation4 arriving procedure: u& H$ ?, `' G! ]1 F
while 1=1 do1 P. G: d& U3 \. U0 j; x
begin9 v3 O) H: }/ z
wait for 1 sec
- R; t8 ?0 T! Y! q3 O create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 K9 N. y7 r1 }! a end
7 H2 O, |! q9 F9 {/ o5 jend9 |4 w# Q+ R3 C7 r# Y8 x2 F7 h
, a7 S5 w" D6 e; W
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |