谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
' j* v4 w l0 v R4 T; obegin model initialization function
6 L3 G1 H8 ~! w9 U+ E create 1 load of load type L_null to P_Creation2
9 e1 T5 K: B* t3 y create 1 load of load type L_null to P_Creation3- R/ K0 E% @, o' P8 [+ A4 a
create 1 load of load type L_null to P_Creation4
) t' j/ ?7 ]- C% [1 c' a: f% x return true
" h+ t! Q/ T2 z6 z- C. G m- Vend
) e% z: P. P l7 l' S6 K* F& x* z6 I. p, T
begin P_Creation2 arriving procedure8 K& w+ {. f7 p- L- ~4 I, T
while 1=1 do! W5 f' w) S) K j
begin# |) A0 m r9 {) H: _* H2 r- f
wait for 1 sec$ Y7 W5 g4 S9 c& X) O. z
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
) q) H% A. j k3 I5 }, g! ]- S end+ a% X2 U7 @+ W9 q( J% c
end& O, |' L* h$ `# l5 B K7 P$ U
' y1 c2 A! z. X0 o' rbegin P_Creation3 arriving procedure
0 ^/ j% F: \$ q- N0 |7 K9 u/ D. nwhile 1=1 do
8 }0 s6 s$ V: o$ w begin
8 P3 Z1 Y- w/ E: S0 p4 b wait for 1 sec3 j5 c; l- K8 K4 Z
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
/ @3 \! b2 ~! s5 x end) v5 I; Q: E* r. T' _( w7 \3 g
end
# X1 |6 A+ {; b) @5 u1 f
0 q. r8 J; \. B/ X, Y+ t8 vbegin P_Creation4 arriving procedure
( L, b4 f! ?1 _! \9 p d- C3 z, E9 zwhile 1=1 do
: F! g M% R! {, X5 J R6 p begin
3 \$ e+ W9 n+ t9 M$ ?9 C wait for 1 sec5 b3 L! b; K3 @* W, [' y( {8 m/ R
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)$ k M3 [6 q0 v d! b: P
end! f1 J. _4 }( c! b
end
+ f; w \9 @ y1 k5 O) L, o& i$ f
6 G% Z. k: J; o4 e% l但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |