谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);: P8 j6 E, t. d! i4 |4 Y8 s+ z4 z7 v
begin model initialization function2 u$ b! n' K* r% D0 D/ C) G1 r
create 1 load of load type L_null to P_Creation2
1 F/ e" Y, V5 F; O! y create 1 load of load type L_null to P_Creation3; O% r( F( q+ @5 Z3 M" x
create 1 load of load type L_null to P_Creation4
8 B1 d& j1 q* K+ ^" U, A) Y, p& i0 p4 Y return true
3 f, x5 j4 [8 G) o* B- L- U! U1 hend
" O2 `" K; g* _+ i9 B6 ^9 s* H7 h6 }! K. `& @/ u, M, j
begin P_Creation2 arriving procedure( ]4 ]9 d* s6 p: b7 q& R* ]- T
while 1=1 do) l/ e% D3 ]: G7 H2 T) K' s
begin
5 n- J3 H T3 i% ~; l wait for 1 sec! b0 d, k: ^2 A* h, e7 K' g1 D2 Q
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)$ n3 _$ n$ K. F* Q! P
end
. M' Q8 D, T6 B6 i3 [end
5 K/ v6 v- m! j K; N0 w! ]7 S( Z0 @8 w& `
begin P_Creation3 arriving procedure( P. a4 \, o% Q( y8 `) n
while 1=1 do
) ?3 D# `0 K2 t/ g; n begin2 I% d b$ f( j
wait for 1 sec
% M: G5 U9 r1 g: M* F3 | create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# X! c( b5 y2 ?: x, Q end/ }' h6 p5 |" y) o; h$ m: A
end
7 p' z- n; X, Y( L; p1 E/ D; [' v& `6 I3 B7 B- y7 x
begin P_Creation4 arriving procedure0 u* V( n5 p j# E, x3 F
while 1=1 do K# g S5 q* u! n
begin. T/ Z" K; ^ r9 ?+ H
wait for 1 sec' t- Z. Q) B3 `# Z. g# p
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
; d4 B. V1 O% {3 j% {9 W. r end
/ l4 }* J% [3 Y& Q$ _9 t# t) _end3 J% U" ~$ d$ G5 C! L2 e; [
. F( c! u0 k6 V. x; Y但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |