谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);; G, ?* N4 W. t& x4 S
begin model initialization function
: q4 W$ b/ }: V: m$ G create 1 load of load type L_null to P_Creation2
V# {" x+ _: G) ], s$ Z# i$ S# J create 1 load of load type L_null to P_Creation35 q G% ] q9 ~/ w; S( r1 E
create 1 load of load type L_null to P_Creation4
% u8 \) j2 [+ p k5 J1 Q return true % U( b9 f, O3 g0 v
end
0 K; | X! i' U$ e+ M0 h6 M
4 p k. O- }: E2 H, c1 {begin P_Creation2 arriving procedure
2 @/ I; i0 P. K; L# B! o& cwhile 1=1 do
5 b5 b" a& v$ y1 o1 S) g, d3 [; V begin
# w/ P* K4 s* k4 M wait for 1 sec
' i- R/ J# O# L$ ?( y0 D create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
' W; r X& a( Y; I" u/ k% \ end
6 g! x0 z7 V* r: P/ Lend
6 _! ~1 c0 e5 r' U, }3 t: R' n. j
begin P_Creation3 arriving procedure3 y9 f; j. M# E, c/ a5 A( V: Y
while 1=1 do* [# S2 k0 ~6 ^& O1 P0 ~. l
begin1 O( c' g2 P0 h( ?
wait for 1 sec
3 w& ]8 B7 F* |+ s# E create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die); R4 B' g& F* n S, l! v+ g
end
8 A* c! w" i- I3 h; j& ^end 3 N4 z6 p' r7 p
4 |# I) \4 G6 Lbegin P_Creation4 arriving procedure
& o; N: { L7 r4 T' N( bwhile 1=1 do3 X6 ^3 x, v; @
begin9 F& }" Q+ B; S
wait for 1 sec) j" Z, M, a( A* R( T$ k% s$ l) J! O
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)$ ]. I8 o8 y: T! B* `2 L* r
end1 J7 p7 X( ] y9 B6 ]
end' j" _6 O( @# n+ H: g
* J) v" A$ n! a6 G# }# Z但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |