谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null); I/ B4 u: @. u8 X- W1 A! D
begin model initialization function
! p* R% g+ d2 ^! \ create 1 load of load type L_null to P_Creation2; o2 N$ U) M6 O& y8 H* h6 E% n
create 1 load of load type L_null to P_Creation3( t# y& m* t/ f* Y- m; M; _
create 1 load of load type L_null to P_Creation4& s" ~( b& A7 a/ u
return true
/ \- w2 r, \% X/ f( xend8 k& Y6 G* D' M3 W; |2 f& }6 h
* g4 p7 m7 G# P) i6 I
begin P_Creation2 arriving procedure r" B2 s/ x$ b* _% f( g
while 1=1 do+ M9 g% L& o0 A7 F. f0 H
begin
( C; K/ K2 [6 a. H' H. O0 K! H wait for 1 sec
, T# o4 c# \! Y8 f! K create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
3 }* Y6 h$ `" C1 ]7 @: Z, C end) c# A9 m+ M# E2 m7 { c- t" D
end
6 y3 Z; i: z- t8 M9 R; @2 s7 ? i& I; c) s( Y
begin P_Creation3 arriving procedure% f, ]0 j( J! X
while 1=1 do8 a' }2 O+ f, | ^* E0 o
begin, d. J: e6 v0 m% J O: |3 q
wait for 1 sec
- n0 ?# r$ S# T create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die) W8 s, \, b9 @0 T- y/ w3 v9 q
end) V# {/ N; v, B6 {1 A. i
end & q6 }4 `: r' l8 ^
6 @$ I- B# N- U. u3 Z& t) N( w$ |' `
begin P_Creation4 arriving procedure
' q1 P/ x. z I. V7 g$ uwhile 1=1 do" D, ^7 t2 c5 t' s! d( y7 @. [
begin
% V2 l% C7 r0 d! _: m* b1 u wait for 1 sec
! R7 p/ w3 T r* B0 }; v: C create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)/ h! z7 j0 p, s3 C- d7 R0 Z
end9 x+ k; B& \, g
end
! H U1 x; ^1 g, h! p( X! z# g7 D) n7 {3 N6 E# A
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |