谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);" B5 r* T3 d" G; @9 _$ u+ \5 L
begin model initialization function3 L/ I0 k# @+ O- r6 Q! k3 ^: J8 d
create 1 load of load type L_null to P_Creation2
3 U5 N$ H* s7 R! [9 X* Q create 1 load of load type L_null to P_Creation3. Y7 n& w# q; r4 |- N, V. N
create 1 load of load type L_null to P_Creation4
! _& w* @+ Y7 z# W+ G) t: q return true . O* x4 Y' `( B. U
end
, m% y) P8 r) o. z4 T! V7 n( X1 m: o
begin P_Creation2 arriving procedure
2 d! \; N0 \, g7 G- K6 c+ J, v: hwhile 1=1 do
$ f* l$ [* x* O S. G5 @0 o5 D begin
) N1 p! v: Y5 R wait for 1 sec, |' Y* l, B' ~ D2 ]2 c9 ?
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 n& k$ N% D: i `0 z4 Q1 ^ end
5 c( R2 _# C3 I M* a8 Send7 i1 |) S1 C7 i c& p
* M# j% [5 _1 E( Dbegin P_Creation3 arriving procedure, _5 i' F& g- u& v1 U& T, l
while 1=1 do" e! h3 O" w5 L# e7 C
begin
3 A/ ^2 w# ^+ e5 t( U wait for 1 sec5 r$ M2 M7 h8 Q( Q! Q5 ^* M
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die) _5 l6 h. |% ^4 |' r
end
# u5 [% Y, B, y$ oend 5 N5 g. }7 `' ]. I* ]5 z/ g
2 p( u( S! j1 n
begin P_Creation4 arriving procedure3 J$ I5 d# @6 E% r
while 1=1 do
/ y0 H# t0 l9 ^& W begin
~3 B8 l1 `8 U5 M+ N8 a wait for 1 sec
2 z9 |* F2 \3 U create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)6 q# Q+ B8 w: \
end8 m& g6 a+ I* N+ w" \. I
end8 U! t; \: O& p0 s, p3 Z
+ q+ j o/ J( {+ s) p8 Y$ t但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |