谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
; d: B( { v q6 Rbegin model initialization function) d( X+ w( Y- y( @* W+ R
create 1 load of load type L_null to P_Creation2
p/ M f2 Y! Z5 H! o/ A7 K create 1 load of load type L_null to P_Creation3
% K$ [: B F# B/ a( z" b. T create 1 load of load type L_null to P_Creation4
/ [ b# Q" x3 A8 Z" x7 C* ]3 d return true $ ~4 a# X+ x. V( W" k7 T
end
* T+ ^% @/ O5 K" h- p8 q, @
* l. x2 F0 ?6 Fbegin P_Creation2 arriving procedure
7 J1 [* v! D; Z/ Iwhile 1=1 do+ Q' g! o& s8 q. J" W
begin3 a6 e+ B. h1 ^% Q) s
wait for 1 sec# y1 G, T; S% |& Y
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)' k( j, c- _3 T$ o" Q3 V% y
end+ @/ Z$ R. O- ` q* j+ x& R! |
end
5 V2 I0 u, i7 r' I; V% [5 V+ v$ N( ^, J3 m' l
begin P_Creation3 arriving procedure
. c' L, k: f# r/ J4 |4 nwhile 1=1 do6 l# `( ?0 l: X- H
begin, l+ r, m) r0 \5 N1 h4 H: s3 b
wait for 1 sec
9 e: T k9 Y h& _. P$ ~ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
! f6 v' k. |, L0 f9 T% @; I! ~ end
c! b u, B: r5 r4 t0 yend
2 G# x* C( ^ _% l; ~$ Y) e! ?; K( J6 x
begin P_Creation4 arriving procedure1 X# K r" S8 k
while 1=1 do. F+ F% q3 j2 a2 S% w
begin- B* U" m) }% E8 p- S7 A
wait for 1 sec
- O% l8 v) `4 n6 c create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)3 B5 C8 r, w, }) F
end
4 V- N3 \ F L& u( yend
6 v* u/ H/ J4 T/ d3 _! r. _% c/ H. s, e" \! n
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |