谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
# v. W" G/ E4 \" o! cbegin model initialization function
7 Y- v5 B. @ M% ]* p( n create 1 load of load type L_null to P_Creation2
: ]& i2 N, F/ A {5 i+ C create 1 load of load type L_null to P_Creation3
9 ~! \1 k- ]- N: t9 \" Q5 o) M create 1 load of load type L_null to P_Creation4
. D6 b! g$ b- J5 h+ S1 B return true
; ^' r# j2 P! @7 N: h$ Z. \end7 z& l# D( b; G! l8 U' v# C
- R4 l' U, i( i: V
begin P_Creation2 arriving procedure
6 q+ S T S4 D' c9 ^# N" n( Dwhile 1=1 do
9 @+ k' H$ ?2 w M: r0 z begin9 b1 |' i, F$ B w, T! J
wait for 1 sec
( S" L8 o# E- D$ ?& U8 c6 O( E9 J create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)6 q g' V8 D% \0 W, h# x4 D$ L6 X
end
# k7 s- l/ w6 O8 c7 x* r8 dend$ x) Y1 q+ n; d7 h2 G
+ v) {5 e; V# W6 Wbegin P_Creation3 arriving procedure) I; Z9 L h, F( Y3 {
while 1=1 do4 [( }: W/ s0 @9 Y/ Z, @
begin+ f: C1 ~3 F& @! u$ `( G' q
wait for 1 sec- Y2 X( D3 `+ `& ]3 x: y3 O% x0 V8 M
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)1 g+ i, q! S0 H& B+ Y% G% a
end
6 V6 v7 M# e" Wend
" j+ F( K! O7 P( F
, _# l3 |3 y" W2 d$ nbegin P_Creation4 arriving procedure
6 o/ u+ d( U/ `- F7 a) y% nwhile 1=1 do
4 o h: _1 o9 }6 ^1 ^ begin
1 W# X/ o; ]6 [6 x3 g) U wait for 1 sec* T- ?3 ~; N: q% r
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)$ G' n+ `3 b( k/ r$ K- {
end
/ v' a0 G6 Q; O! a9 Send
* D. Y( ?, o. @) [5 l1 V3 L# w! P4 M! f( o& y) |0 i7 j
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |