谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
' j3 I& t4 j8 r! mbegin model initialization function
O% w, \- V5 c$ |1 |% B create 1 load of load type L_null to P_Creation2
3 t" g7 B% Y6 p ~5 w create 1 load of load type L_null to P_Creation3
6 s7 c4 \. l/ [ P# c& {* v( K create 1 load of load type L_null to P_Creation40 o* I2 d n! W) n
return true
4 c% D6 e# [- O# \end
. C, H4 [8 h# U0 S
! d* q& C; n( ebegin P_Creation2 arriving procedure2 i1 T+ q* p* a& @0 u
while 1=1 do" V4 }% \9 l* u+ y/ d' P* M
begin
! q& a) y% R' o- n, F# M wait for 1 sec. d/ |# x8 m2 B) ]" Q9 F' x
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)! s' u) D) H9 o( D4 m9 |( x3 p- v; f
end b( q* x8 H* m2 l3 E* g4 c" g
end N8 P. H" n. m) r9 h: n# T
* o' `- n$ F8 Q4 l. G
begin P_Creation3 arriving procedure8 G. ~+ q; M, @2 G# X! C) f" B
while 1=1 do* }) m0 T" r' R/ O) _5 Z% O0 i7 q" ?
begin
& O$ _; A# d( d# {; P. u wait for 1 sec
4 |! B- r5 P0 x0 M3 L- B create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
x" ^1 c# S1 V, Y1 H& z4 L end
" i* u, ?$ r! h' B6 |% X* ^end
) g; i% R* n" O3 K3 b2 D5 ^4 j; i7 R
7 Z& {" J2 @* mbegin P_Creation4 arriving procedure
2 c& @4 E7 I4 e- owhile 1=1 do( X- {# z2 F4 M1 ^9 d1 ]' A/ p8 X. t
begin
2 f$ I6 A' ?) U- i! `4 x wait for 1 sec( B1 z( p$ p) D
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
) Z/ Q( _# e( ^$ h) `* {. N end
$ w E7 M4 g3 G4 c+ ?0 Vend( x X- a4 A2 h, W+ p2 o
& C) {: X. ]; D: ]4 ?) G( ~但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |