谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
3 e4 q+ Q+ F' d7 _; [8 P' |5 nbegin model initialization function
' d3 y3 F+ g2 K0 _# k, [ U create 1 load of load type L_null to P_Creation2
* N( d! x; T& }0 s& P3 Y) s create 1 load of load type L_null to P_Creation3
! ?! C( A; Z2 q& j( Y create 1 load of load type L_null to P_Creation4+ g, X5 Q+ g# X4 z
return true 2 m# X4 M( S" I; C n, {
end& A( `7 T, f* Z9 C( L
# x4 b7 `) G' n8 I; fbegin P_Creation2 arriving procedure# J4 ]0 `( f! q# }8 U6 a
while 1=1 do
, w* }; l# ?* r: a5 _ begin
" w$ [. Y) x" d5 j! F wait for 1 sec
6 ~6 Q( p7 Q$ K# z9 R# y" f9 x create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
& H7 m2 t5 u& N& m! O8 a: B end: b c( H3 V+ A9 B+ k
end
' j1 `, U4 A$ P8 }+ p1 o( a3 q, ^3 `; D# ^9 ]. R
begin P_Creation3 arriving procedure
4 w2 |1 ^7 L8 q3 I n7 _3 Twhile 1=1 do
* C; o( }0 g& \0 U# f9 p2 \" L begin/ j# j8 ?( G: G, F, B2 I' j! D- T8 _
wait for 1 sec
8 ?; m) w* o7 {. { create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)# z# X6 Z/ [1 M& u4 h. ^* w; P
end3 F) z9 S7 \9 k0 g- F) p
end
" t q) f* a1 `; ?6 v0 ]6 C
! \9 \* _- v# R/ k! ebegin P_Creation4 arriving procedure) u) \: S; ^# }2 [% W
while 1=1 do
O2 J) g, ~, I9 w4 c begin
3 |' Z( i. Y; r7 T) W0 X. z& ]" C wait for 1 sec: h8 A- a: H, y, f2 H# l4 f6 m3 F
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)+ W. j! s' K# V# {' p
end
; b: S$ L( S# y7 L3 y- oend
$ Z* x/ P4 s( w: X6 [1 Q$ q/ e1 ~9 g s7 R+ ]$ |; a, R
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |