谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
4 N8 S7 m" `; a: l% x- Gbegin model initialization function
( P/ F' u8 Z( q0 f, m# s0 ~8 x" g create 1 load of load type L_null to P_Creation2
# Z- J6 A+ C% | create 1 load of load type L_null to P_Creation3
% R' j9 T8 i, E: k create 1 load of load type L_null to P_Creation4
! u( _/ U) c6 [; L9 B1 t return true
$ F; K% r R: _+ ]end* _; ^+ k2 G- }: [* d2 {
' ]" B, [0 {' M C8 x
begin P_Creation2 arriving procedure9 W0 w/ R% r" d
while 1=1 do
: R5 ?- m# p$ c# S# @7 u begin0 S$ O5 n+ w5 O: u
wait for 1 sec
$ _* \ ?, L, [0 }1 @; D5 b+ ^ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
3 D8 e& G4 n0 B x4 X1 S$ R end
, n( d, M% ^+ nend/ p! D, U6 Y# y3 M1 H
5 @7 Y" J. W- E0 Bbegin P_Creation3 arriving procedure
3 Q# U2 E8 b7 j( `3 o9 k/ Swhile 1=1 do
8 t. i7 j& F8 \5 v* g begin# ]0 a! R" _7 Z4 d3 X
wait for 1 sec5 l& w) L8 t7 o: s
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
! E- Z$ J2 Y" J- @$ s end
4 j; g! B' t& nend
* c( S) Z4 i2 g, {2 u: J* v9 F! \6 X7 ^ {) D( K( ~
begin P_Creation4 arriving procedure& n& E4 P; b: U: u; u' K
while 1=1 do& a1 A2 S9 Y2 k1 U
begin
9 h9 G( ]6 e% G- q! z1 j wait for 1 sec
6 q0 C/ L4 U( _' w5 w0 n create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)+ f$ v* F1 x3 v/ d' f5 z; Y
end/ d. }; K9 f- @
end
) F1 D2 g" n0 I1 f; {5 |# a @2 A. m/ g) b) _
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |