谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
3 J/ m" @. o# w8 v7 cbegin model initialization function/ V$ _' A9 D& f
create 1 load of load type L_null to P_Creation2% Y) m" s! A8 f7 u2 r- A: v5 C* w" U5 b
create 1 load of load type L_null to P_Creation3
, K9 C% i+ F1 _7 w$ W" K# B3 d0 d create 1 load of load type L_null to P_Creation44 y6 q) W" z: N
return true 0 Q2 k3 S' ^6 [6 |' K; N* y
end8 E2 X4 ]! I7 N, b0 I
5 o, _/ v, H/ Fbegin P_Creation2 arriving procedure
. b0 I& i, s, c$ M% hwhile 1=1 do" b5 r8 u9 H) H- [1 L$ i2 a1 ^$ k
begin, g- C' m; \* L. `" W8 ?% t7 d4 e5 F
wait for 1 sec8 J; X- j% U& v
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)/ `. k, ^0 |1 e8 Y: c Z
end
; }$ {* ^# C" _& t M/ p4 K* Cend
/ v/ j" W, M( K- E
: D7 M! ]( N: _begin P_Creation3 arriving procedure
8 J/ j- V. L# N. N8 @" xwhile 1=1 do
9 K+ {1 E" h+ l- X begin
7 @) S- h1 r. W1 t8 ] wait for 1 sec
+ I g8 |& _$ V& J5 c create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
5 Q0 @/ w$ c {# n0 ^; G end
; U0 S0 Z7 g5 S' O7 _, X8 M7 G) bend
* S# v/ L- C- I( S
, V3 s: V3 B) d) u0 n4 V) e& ?begin P_Creation4 arriving procedure
; M+ k; Q; c/ rwhile 1=1 do
6 J0 n6 \$ ?: @6 ? begin; ]* e/ ?& p V1 p' x
wait for 1 sec0 _" Q. ]: a7 t, d4 S6 E% H! X
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
7 C4 g4 t+ W0 }# y5 S# t6 i: ^ end
! t/ W) s. s) Q0 P, send
+ r, c6 V' |# A6 i1 m1 Y0 r# e: n- ?8 F( {
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |