谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);, k/ n% J; K$ X9 C" t* R i
begin model initialization function4 i/ \" P* W; w5 ^9 W+ Z
create 1 load of load type L_null to P_Creation2! B& O. W8 f( E- K
create 1 load of load type L_null to P_Creation30 l. H- x6 m; z: S5 {
create 1 load of load type L_null to P_Creation4
% L4 I3 p& h' c/ ] return true
, w" D3 o6 M$ L4 U- S6 Mend
/ f$ {" T2 G! o( D: k7 \2 q/ `4 {0 ]4 ?3 \# q/ g
begin P_Creation2 arriving procedure
& \7 d8 v2 a* fwhile 1=1 do
O9 U4 T& t5 h8 }' h- E begin
; D- ]% o9 b% i5 v6 h8 b wait for 1 sec# h+ ^- S7 \/ w: ]1 l+ _5 d
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
) M R) k7 d. H) W0 U end
9 q0 `( N& H- ^. u% I4 ?. K- ^$ bend6 R8 l+ x+ y; Y r
+ _8 }, T, C6 l' g4 ^# G
begin P_Creation3 arriving procedure/ m$ L/ t* { _ j. B9 l- p/ Y
while 1=1 do
, S+ a) ]9 \9 x0 u T* R' L% ] begin" y1 R+ X( ]: ^& _# _' Z
wait for 1 sec
$ Z) e1 l+ r! Z& E; B' m0 h create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)' v9 k, }% w- u2 l
end
{$ {2 \0 o- I; t7 S1 Pend
- j1 m% F0 _ ^5 v/ ]4 V& I, w7 |, _
begin P_Creation4 arriving procedure7 a h3 L' T' M" ^
while 1=1 do
: {5 J$ x' G k% K$ E- b0 o& q8 f begin
. d7 ^: n; o6 m5 K wait for 1 sec
7 D( Y, P, J# k4 p) S/ x8 L9 M create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
: q3 U. [& }2 z0 I' { end$ ?8 {4 m1 O! J% e9 w9 x; N/ ^! Z
end1 l8 c" \+ h0 V# B* |$ S1 O
$ N! ]! U' m' J% `- g但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |