谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
0 h$ e' o8 l( z" M% d* h( D+ T9 Vbegin model initialization function! I! ^8 h6 k: I2 p- C+ }6 H6 O! ~, b
create 1 load of load type L_null to P_Creation2. j* j v5 L6 a2 o
create 1 load of load type L_null to P_Creation37 D- A$ b! P1 o( ^7 f6 N% f
create 1 load of load type L_null to P_Creation4
3 Z6 e/ C5 }4 a( y3 t' f4 T return true
. O$ Q t2 h/ ]! aend
: L5 p& e( a' b: G0 V7 L* g6 ~3 M+ \' \! Y. [0 X8 w
begin P_Creation2 arriving procedure2 @4 d! T! ~8 x, U& N
while 1=1 do
4 `, ]: h D8 N begin
2 [3 i# i7 `: [: y7 d0 Q wait for 1 sec
d' n; i+ w% y; J create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)% {/ j, P5 s% ~2 F, Y4 b( v. M3 p. o
end) C! H! B" l2 h2 U9 @
end
2 T2 m/ L: M7 i2 z; k1 [
1 @% s& c5 \' x/ Jbegin P_Creation3 arriving procedure+ e( H, z. w# e# U1 Q4 u8 E% T
while 1=1 do. ?7 A: o1 `! y4 X( y5 ?+ z+ s
begin
% W# | S5 S2 [' C5 ^4 |. } wait for 1 sec( H( Q" [- w4 I
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)$ ]" [) b9 s6 r2 U! y* |% P. f
end$ g) j! b* _+ Z; F7 @5 o0 t
end
" K t- h4 j5 E4 \* @+ J6 ?5 N* r" r7 {/ y0 K3 X# ]
begin P_Creation4 arriving procedure
) a1 g/ {4 ~" o2 I7 Pwhile 1=1 do
9 B8 _) @0 \- h) O9 x% p8 X$ `! l begin1 w" g" F7 A: W0 G5 Z; _9 `
wait for 1 sec* E5 K9 ?3 K& V4 J2 a2 f4 b" ^7 Y! a
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)* L- N6 d+ w/ ?) R
end$ g; d( u, D5 S% r ~. U. |
end3 c3 n# x* _, q7 z; D
5 s2 |. R$ g" }/ y! j' }但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |