谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);7 Z3 w) L8 |. ?8 G- p, l% }4 D
begin model initialization function. B& U; Q9 s2 r# I p$ X' N
create 1 load of load type L_null to P_Creation2
' g2 J3 a! @, r V. P* s create 1 load of load type L_null to P_Creation39 t3 @4 M( {. U: Z! q
create 1 load of load type L_null to P_Creation42 u0 Y" G* ], m. ~5 `
return true * d' w+ |+ t* G( z
end
+ N9 f# N$ x. I# {
# D' v6 [, A( M+ _) N1 Vbegin P_Creation2 arriving procedure
' M5 e1 J1 z) c5 n+ N2 iwhile 1=1 do7 u# I9 D) Z4 D9 E8 G8 }# l
begin
7 z( L1 q( l1 h3 r" e wait for 1 sec
& T2 d+ e2 X. t/ ?: d( _ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
2 H: n* h- N, t' w& o/ } end$ l1 x: m) F% m7 M8 ^% v
end
3 Q4 H- y. Z8 j* l6 [0 Y
8 k$ F( d7 h5 U* m, [) ]begin P_Creation3 arriving procedure
, n. X7 S2 |# t% Zwhile 1=1 do
, M- j* D0 ^! `$ P1 a8 S begin* W8 T& O+ ^& i0 w
wait for 1 sec
' I( E8 }5 i2 N8 ? create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# o# i6 t1 ` `9 x$ x' a end
% E3 ~, \) g5 p9 vend
7 B) o1 U, |! V7 L7 @0 p8 [+ P- I
5 ?7 b* Y X% s+ T% wbegin P_Creation4 arriving procedure
9 L. b0 S9 ~+ K) X+ |/ \while 1=1 do7 [. b! t% F, l- ^3 s$ l! ]
begin
# G5 S& Y' K |+ O, F wait for 1 sec2 y- d0 u' k' |) `
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
4 N. Z. X$ d# b4 _, k* B end
+ ? H) c; Y3 ` l7 [$ h* W/ cend% `+ s: L; @& A0 \/ a
6 |) }) J, n: q3 J, d
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |