谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);. u6 U$ ?9 o4 }/ I& m* u3 O
begin model initialization function
; {2 c+ B6 _9 ~2 n- ? P create 1 load of load type L_null to P_Creation2* ~ p" D: v& R9 \0 }# ^
create 1 load of load type L_null to P_Creation32 ^5 T1 D M# T/ k( @1 B& t9 U! W
create 1 load of load type L_null to P_Creation4
8 t2 \0 {+ c0 {' E f. o return true $ F' k$ D( T6 y8 j: g0 ~, r* v h+ u
end1 _6 V' o$ d' Y" O$ z' f h- `
+ X4 {; ?+ I- T# q: G# l; B
begin P_Creation2 arriving procedure" L' a% y. j& A( t3 O0 t2 j
while 1=1 do
3 ]' D; l5 B! B% X/ G4 s' p begin
9 l, n- v0 N& B& l9 U# \. S3 U wait for 1 sec; W9 l( Z+ a& B( E& C8 Z
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)& `2 i. ?( n9 V! A
end3 ~5 F3 Z K( f+ _2 Q* L' `# v2 z7 ?
end
8 B( u8 F$ }# e+ A
3 {$ f; \ `1 y) l, cbegin P_Creation3 arriving procedure
' ?, e1 ~! a; |0 f |# o4 nwhile 1=1 do+ Y9 U9 d. \( ~. U, g- k" w4 x
begin
7 s; l/ g& A% h# l- U' o" K4 w$ o wait for 1 sec% s* a& Y8 w5 G1 O" i3 u3 x, i
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
+ D4 X; Z X! M0 [ end
/ S; `3 @3 I) M% Uend
4 N; { r& e) v/ w% N6 n2 H
( A ^5 Z( D, F( tbegin P_Creation4 arriving procedure8 s; m7 V( W8 U! T# m8 Q
while 1=1 do' G( j& W3 C0 X- d4 r
begin0 ]% V2 {6 g q0 k1 [* h/ e e
wait for 1 sec
9 t0 t: f8 x- V/ ~, H- o- { create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
. s$ d2 B5 j/ k j' b end
6 S4 T% A7 T0 L6 lend7 ?! {4 b. w% w, x1 J9 ]# |* m) M
( E* I: J4 R* h. M! m* a" w
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |