谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
7 C: j# S* C5 C1 obegin model initialization function. a0 Q& L$ a/ s8 l. O6 e' D
create 1 load of load type L_null to P_Creation2
9 m1 M5 l, H/ V) w5 |2 L9 Y create 1 load of load type L_null to P_Creation31 Y, M' w: ]0 }6 z$ Y" h3 t
create 1 load of load type L_null to P_Creation4) ^2 f- `3 A, F7 y/ g% k
return true % x. Y9 S+ V$ r4 g* `8 c, Q
end4 z% s) G* w% j/ P2 Q) q
" S: [# `1 V6 Sbegin P_Creation2 arriving procedure
$ I- p0 p4 ~* q, e& fwhile 1=1 do+ F4 q( h$ B/ V/ k: }% H! h9 M( Y
begin5 i" W1 T/ M& V' b# y6 Y
wait for 1 sec
: n- B* q9 N9 d7 j3 O create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
/ P9 ^! `5 m5 o% x end7 ]0 D# d+ _5 x' ]- B
end5 s3 _) |2 U( ]1 g2 e
+ @8 S) o7 B; r: ^. y& cbegin P_Creation3 arriving procedure1 b/ i' Y: S: K2 [ p
while 1=1 do
/ v4 ~+ ~* ^4 i( X5 g7 s begin
1 f/ d* k. \ Y wait for 1 sec, f6 {- P& Z6 L
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
& D4 Q7 Y7 R/ P1 U4 e. E+ c5 J+ ~+ I end
9 q. v1 Q+ [0 T* J9 o& ^0 {end ! `" A" i. g, z- i C
( t' L6 x. B/ z& ]
begin P_Creation4 arriving procedure0 V& |) ~' V' p) K* Z. b
while 1=1 do
; z" t& U9 {/ l, t4 n# G: F, k begin; f5 c, \; e0 v
wait for 1 sec" C) }! w: ?$ _$ z J Y5 }2 i
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)1 h' k, l& J" l- w
end
3 ]% s1 q4 i9 o; @& s" i1 x8 f& s2 Dend
7 ~" h# _6 r9 c9 h& f' s
3 z6 V* E" E3 p5 A4 S但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |