谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);8 s8 W, H7 d" Y4 M
begin model initialization function
7 \" h) |. o5 l$ T$ t6 `5 p create 1 load of load type L_null to P_Creation2
0 o/ K1 ?* s' {3 m& o, K create 1 load of load type L_null to P_Creation33 F# P. E5 ^2 Y' ]6 ~; X0 B$ S, }
create 1 load of load type L_null to P_Creation4. g; z, R; M r# G( L
return true ) W+ y$ U% a4 t( n, N
end/ A; l- x! i* b" v% F; j1 l) Z
( x6 Q6 ^5 ?# D4 P0 _begin P_Creation2 arriving procedure$ G2 x& z: \, a6 I. _: v
while 1=1 do$ X6 M$ I% c1 i7 r0 { G
begin3 R# a) e2 y$ C2 h6 v' V! e7 M
wait for 1 sec" g4 V6 Q0 d& X+ l' _5 M/ y
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
& B _$ o5 _& o end
6 J4 x9 A. n4 vend: @" p- x3 Z8 X# K- o
$ s; s3 S( I9 o7 t( Rbegin P_Creation3 arriving procedure/ i2 U9 E( l, x/ W
while 1=1 do
- \+ n) H) X, d/ H8 k- v1 Q) D begin
* G$ z2 g* M4 y& A wait for 1 sec% ]5 G, s4 r* S; K c2 g
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)$ k( M8 _1 }) M4 o% y! E/ q3 \; \
end
, I/ @9 c3 w4 ~# q6 Oend
) V) b/ v9 h9 v5 K" p: h* f/ D: g& N
begin P_Creation4 arriving procedure
$ b: E2 u u- v1 I" S$ zwhile 1=1 do- Z) V- g; U7 E6 s) e$ \
begin( a, u0 e$ J4 N. J# k# s
wait for 1 sec3 Z. l* k, W( v/ I/ V
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
! N; D' ?* L# z end
$ s! |8 ~9 E7 ^/ Uend# {; S* z8 i3 Z1 |
) n; e* o- B" X& @9 g
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |