谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
8 Z# D. C* V S5 K8 ^ v2 Ubegin model initialization function
8 s1 g' u3 P3 I/ x1 Y create 1 load of load type L_null to P_Creation2
0 d3 a' b. b, {9 e create 1 load of load type L_null to P_Creation3
: }( J6 `0 W$ {( b! H' ~. u create 1 load of load type L_null to P_Creation4! b+ U$ }( X; Z! V# g9 _" ]
return true
! R N0 b4 }* K0 ?. V4 z! Aend L: K! ?: t* z6 ^3 U. a0 I2 g4 B
3 C( v5 D% ~7 [) d6 bbegin P_Creation2 arriving procedure
+ b6 f% q$ G: Y- p" R" T, ^& u7 xwhile 1=1 do
5 A! H! q% e5 o$ r- n, p- M begin4 y8 b( A' G, _( U% p- s
wait for 1 sec
4 c! F* d& k6 H+ N4 u' d& W7 B) d create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
* Z6 \5 z- I: S5 T0 P+ X end; X. t N+ i' T8 _: v
end3 r: U/ A. W' E7 R& g1 j# f: x
2 C8 X8 i! F* U! U$ A+ `begin P_Creation3 arriving procedure
8 u8 V2 V, s5 \- x1 A1 e* `- g3 L1 Iwhile 1=1 do* n' t8 @4 R5 _" a9 i
begin2 Q* C& Y+ U9 M& o, E
wait for 1 sec6 B2 j8 V( E1 b0 T% ~; d( [( W
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); s3 |% Q i" X( O) ?
end
! M' E& W% l% H1 }4 `: Zend ) W& f. e% s `: P A; d0 B4 V
A( V ]' d! k& D) u- w% Ebegin P_Creation4 arriving procedure
9 I8 E& P; H# o0 V# n% rwhile 1=1 do$ e) v/ N( M* a, h' P
begin
5 j: U$ W3 ^! n0 [5 x+ M wait for 1 sec
% U. C2 F7 y7 V8 `3 a( S. a create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
: A m4 J7 ~0 ? end& d1 K+ n, h9 a
end5 d9 l! A* x( A( l2 x
8 _& k/ Z9 f0 R- Q4 E3 l# b; O$ l0 {但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |