谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);' J n2 C4 x0 O# V
begin model initialization function
+ a! f# J* L" q$ R! N# [& G create 1 load of load type L_null to P_Creation2
% E4 u) @- D3 l7 n- q9 Q/ z create 1 load of load type L_null to P_Creation3- y; `& s/ @" [
create 1 load of load type L_null to P_Creation4
* R4 `+ n: Y8 b7 |6 q return true ; R. u7 k2 n; i8 _2 N. G4 m2 P
end) a! ]6 @5 M) Y( b8 T, Y: v ^1 \
' k8 U+ P1 R! I2 D2 jbegin P_Creation2 arriving procedure
. c9 ]' Y+ j2 C2 ~while 1=1 do. E h3 f7 {5 ^ O0 j
begin
. T1 m7 z; D. R" z# R wait for 1 sec
4 s% F! B2 X, _. H- T/ F create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 O* G6 M& F. q2 u0 U end( m+ B# w+ B& v+ d
end3 z- p4 T( Q$ U/ O9 o! z( Q6 ]
) d. f6 f- X$ K6 I5 @; Kbegin P_Creation3 arriving procedure( n0 V o- T6 |$ Y7 }
while 1=1 do
, Z& Q" f+ z/ L( `- } begin
6 {! x* ~1 s: I' `: i% ~ u. M wait for 1 sec5 g9 o( ~( A( R5 u( i
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# O3 Y2 ~9 D2 ^, b: F( K. U end
, e' o& u0 i8 e: r/ R! rend
! A, B1 d. t; f: |8 {+ g" R! \% N5 a7 H& G- Y6 f& v3 \; J
begin P_Creation4 arriving procedure
3 x" d9 s# J7 cwhile 1=1 do+ b7 I( a1 X4 T5 @6 W! g
begin
4 }/ }$ L: A, O- r$ }/ \( K2 \8 [ wait for 1 sec) r. t) I" N$ U
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 B' s" A8 N+ {1 e. G4 \
end+ p* H# h# c+ F& I+ ]
end
- q) r: } W( t5 u d& G7 k, t9 P% b& F) h( f
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |