谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);" g& R: E9 u/ E/ E/ {! m/ ]
begin model initialization function" }7 i/ g5 z# D3 x
create 1 load of load type L_null to P_Creation2$ W0 c( @; b( e% p8 z3 I
create 1 load of load type L_null to P_Creation33 r4 d9 a5 l& q/ o4 t
create 1 load of load type L_null to P_Creation41 Y0 i8 S4 a7 g- u1 v g, x& e* U7 d
return true % R( V4 z/ U9 L- ]) v3 n" v" L
end! s; ?2 a- R( q5 R6 Z! W! V% l
, J5 k& ]/ h# B9 Y- T% t! \3 _begin P_Creation2 arriving procedure
6 Q6 s l. [7 Gwhile 1=1 do: u5 P: y I. h4 o3 Y
begin4 i. G! U) e! Z4 _
wait for 1 sec
2 w7 T$ D( S+ `% E8 S4 F create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 M, }* u J9 n+ a end7 \) V1 L1 [! d) @5 X) P
end7 f7 h4 f7 ^! |$ g5 S4 J# M
" g3 K2 t( J( }, m" f
begin P_Creation3 arriving procedure
9 y; S) w- H9 ^while 1=1 do
3 A6 `6 p: ], r7 S) \, V. p Z begin* `( M- c4 }% M/ e
wait for 1 sec% z) p/ H/ x" W! O+ g, g
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)& F: `. p: z- f. Y
end
: a' a, `1 s. c4 c! B6 C6 I* pend % K; Y. L! u5 }* I+ p; Y
w+ N# l9 s" |3 Bbegin P_Creation4 arriving procedure
: \2 |- B+ y- ~+ r: p! J' j0 twhile 1=1 do
! I. P, c7 e- V! e begin0 D, n9 {# ^- l b
wait for 1 sec$ f' o* V+ ]' I8 @6 C0 _8 W/ I
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
7 _2 \ l7 H3 J3 ]; z3 i2 M& d2 Z3 ] end8 T _; X2 j# {7 v& q
end
' ^6 I/ Z+ |/ t8 B" l
! E ^- H: N; Z, f2 S- |7 u5 l但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |