谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);( V$ |9 D. \3 [* V4 c
begin model initialization function
* C+ O# t" s8 z+ ~ create 1 load of load type L_null to P_Creation23 F* O1 _0 e* f$ [9 F
create 1 load of load type L_null to P_Creation3
$ x; Y, _2 ?& A- D d3 `9 ?' e7 q) q create 1 load of load type L_null to P_Creation4% I& @$ K5 c! o9 P$ m
return true
4 `; G1 y4 L$ g* F8 {# ^4 l# @end7 C2 s1 ]* b3 W+ k4 X. u, o
2 {* D3 y! O4 b; r7 t( L: @6 @begin P_Creation2 arriving procedure
, B7 d5 f- i, U2 v8 [while 1=1 do
1 f, v+ @3 ]$ O# I3 w1 s# Y begin2 t* K- c1 T2 W1 Q8 o" b% N
wait for 1 sec V: L: R" h6 {/ i' U
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
3 Z9 S9 a& I y: @& D) ? end& Z7 n4 G7 Q2 E& f/ x% k6 p
end
$ ~9 L. \* h6 X2 r2 s9 w {, i7 r* d. F' j T7 r! _% n
begin P_Creation3 arriving procedure
- F( q) x/ c. }7 |3 r3 c$ bwhile 1=1 do; L' ^7 {8 l& s6 N
begin
5 X2 k6 K2 M5 ^3 N6 R2 s wait for 1 sec9 H0 ~5 Z/ P* B) p
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)' M5 I( c) i, y4 e2 z& h+ f
end6 B3 i2 ?0 a [2 m. A" F" S
end % d, b5 {2 L+ }% F. w7 A5 C$ _
( [& ]4 [1 \* L( c/ T9 w
begin P_Creation4 arriving procedure2 S) i0 U; M$ J" q0 R/ I2 r
while 1=1 do
1 V9 l, @& d# F& m, z; r begin
5 r4 D9 {; s* | wait for 1 sec
2 l# R/ \ d3 U/ [ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)& E' ^7 H' q7 m2 j4 E
end# V3 X& f& x1 k& p" V# c2 R& @
end* D* X9 H0 @% f$ b% c
$ ?# W7 ~* U6 N
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |