谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
; u) s7 v+ U* x5 _# g4 e3 Abegin model initialization function/ P5 H( J5 C$ o
create 1 load of load type L_null to P_Creation2' `0 o, \: G) r
create 1 load of load type L_null to P_Creation3
6 G& i" {" A, b% T+ B$ n create 1 load of load type L_null to P_Creation4. {- F" u. ?! b" q% w/ |
return true 2 {$ ~- |6 {2 a( y, c1 G5 m, b
end
+ w3 h: T x2 p# D6 m5 W$ ^
# p G1 s8 ^% a" ybegin P_Creation2 arriving procedure, p8 T q; l6 [0 N. e9 |( e) a5 Z# k
while 1=1 do
& ]. S6 S/ o# J begin
, T0 e) p. B4 H* q& X wait for 1 sec5 a3 s8 J( K9 }/ Y4 O
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)$ m# j$ u" I+ S# y
end3 w; w, u; U$ F) V1 x6 n) P3 t: U" z
end! j5 k. f) ^& u% [0 X3 t+ A
: H1 {2 D4 Q: k. s5 G2 S: Nbegin P_Creation3 arriving procedure8 T$ z) R L$ x3 U0 j
while 1=1 do
6 w! j& A3 j- U7 a. }6 l$ l( |$ m: s! [ begin
" d5 r' J) J$ ~7 A, a2 |, J d wait for 1 sec
3 ?& y9 R. h% T, Y c9 p create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)4 j2 h9 g/ F% i3 j, }
end
4 k, E* u7 t, N1 m8 U$ mend
( G' W; @% g- D- o* s: p$ c& ~1 K8 Q7 k& k% y. E6 ~1 s
begin P_Creation4 arriving procedure
1 G$ j3 k) P+ W$ Y: v3 ewhile 1=1 do+ P( a. k1 B) t8 Q3 W" O# f
begin
8 ~1 i3 b& k5 z: Z# K& |5 [ wait for 1 sec; y- ^! n& d" f" b; Y! n5 p
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
( c8 d, Z6 F& D' E' I3 w8 N end S0 M1 Y$ b, b Y6 A
end
0 \5 }4 O, g- Z4 q: D8 G, B' ^3 E- X2 y3 v2 Y
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |