谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);& l/ w3 ]0 u5 `5 X' z* d1 q5 b
begin model initialization function9 v4 Z* w+ m H$ I" ? O+ m) d; N
create 1 load of load type L_null to P_Creation2
, q: a7 A8 A2 ?( ?( g create 1 load of load type L_null to P_Creation3
& E4 z: L( Q" Y create 1 load of load type L_null to P_Creation4
) ]) ~$ q& N9 y) \/ q$ E return true
8 l# @) Y M0 [6 A. _2 b7 K/ _end7 f% @& S5 D: F2 Y1 H2 ~* m
9 A J P3 e. G
begin P_Creation2 arriving procedure, x: K t$ L, b3 Y
while 1=1 do* Q/ d. `7 R: t. M. J3 b! d, D; ?6 I
begin( ~; @ s: r% ^* ^, h5 g
wait for 1 sec5 Q* p' \5 X7 B5 R
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
8 C+ X/ H' u* X6 ?% T end& R* W3 \3 t! u% h0 }
end
! t; W: l( R1 `6 h: l7 `" g+ S, L! @8 c
begin P_Creation3 arriving procedure
8 k4 _6 a/ l/ x7 T R) O7 v( k% P2 Ewhile 1=1 do+ N; K. ~) `% T& C! y/ p/ A; R7 {
begin* H1 s& c! X* I! v5 E0 Y
wait for 1 sec$ j( o+ a: P; k( Q' P
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)! g4 N, l. T0 @( w
end
, j2 y2 M4 l. |+ D3 A8 ~' Qend
8 l/ [& H1 ?5 C0 b7 O7 V! {% l; c, p7 w/ e& ^
begin P_Creation4 arriving procedure+ A0 _8 K0 A3 z$ s: B4 V7 I
while 1=1 do* P2 e( I0 A( J% t1 l
begin
; N/ _/ _8 S* ?/ q6 I% y wait for 1 sec+ u7 ~1 c; |- u& p/ d3 n
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( o H/ v* o+ A6 e3 V2 Q end
3 J. \1 s, l- x3 b& \end7 u9 M B' p3 _% Q; G
% y* F* C$ s# r" a& ]0 X
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |