谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 s( j. C' j' H: `. wbegin model initialization function
0 U6 P' P5 ~& ?/ W7 T' o$ K create 1 load of load type L_null to P_Creation2
/ r, p, k2 S# J create 1 load of load type L_null to P_Creation3# {( \# n. b. K6 k S
create 1 load of load type L_null to P_Creation42 }) W" C4 e0 _% N
return true
O6 s7 E( @7 K+ N* ~) Gend# p% p% u. d; D, i$ ]9 h2 s; |
& K. W% n! A! \9 N8 E: j
begin P_Creation2 arriving procedure7 G+ \4 {* L/ v X9 j* }
while 1=1 do) F6 m/ _, d' K8 _' a0 j: B/ s8 i6 w
begin
8 `5 o! e2 t8 L6 s& s; { wait for 1 sec
: p1 M ]: p- U2 ? create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die); _2 V1 k9 q* n0 U
end, g8 h8 x5 B" \5 b) d9 j
end
; R, n. j8 Z/ h) N+ I4 n8 [- S- }- r: l3 I. P, U0 T% Z# p
begin P_Creation3 arriving procedure9 r4 Y2 _7 `% }- l% i
while 1=1 do
( g8 N! h) n# R9 j) M$ z' \2 H begin
4 d) `3 s# V1 R) _) q/ Q) Z wait for 1 sec* t8 n, x$ D6 D* B' t
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)( [$ e. _! o4 H& r2 q
end
- `4 {% |! U. h& J! l2 ], I( E* lend
/ r: @/ t1 @8 N% G) s
, I( z6 ?& M* A0 ^begin P_Creation4 arriving procedure" w+ T4 t- A6 L
while 1=1 do" k$ m$ h+ d. h( t3 v/ y
begin
* W+ k* j2 s9 s2 i% ]1 T* G wait for 1 sec
& {7 s( `" Q, I; I% x create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)# b% C: N' B2 I* F ~3 x0 F+ n
end* }* q4 t5 A6 G) ]/ c( _5 V" U4 f
end
4 b0 }" |! a) s# j
: E( M* O; j% k2 P# s/ H" ^但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |