谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);. x8 j) s2 h& e8 W9 Q9 ^$ f5 I
begin model initialization function
0 v7 U/ `/ k% e# d1 W create 1 load of load type L_null to P_Creation2
/ {# v& O3 j* S" h5 V+ L create 1 load of load type L_null to P_Creation30 r6 ]) J& W* @: o F+ R) v& `
create 1 load of load type L_null to P_Creation46 D0 o$ j, Z/ [4 b
return true
- X4 ?* v' E9 `0 c/ t0 mend; q! F' |4 C1 R3 v" l& L6 T4 G7 e
" E& g- P2 Q5 \+ e; i
begin P_Creation2 arriving procedure
. Y: Y% X0 M" T. x" swhile 1=1 do
/ \. o! I% U3 U. {, N: ^4 A0 O begin
$ ~8 P; V7 I& u4 j" M: S wait for 1 sec
/ [% a. \1 y" P/ c2 U4 [ create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)# d3 n4 |2 E$ T# e1 f! \! J" b
end
8 T& b& i; `0 F! y I' uend
. f' K/ S6 d# z2 T& q9 q* \0 w T1 B% `/ r3 a: f
begin P_Creation3 arriving procedure
4 ~$ P, I3 v$ twhile 1=1 do, f1 I" W5 M* ?5 W- d7 e) W( {
begin, X; C7 n1 \5 F* I' r7 E1 n2 U
wait for 1 sec7 Q" L3 v: ?, U3 @# A O, ]
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)8 d6 n" C# ~# i% |
end
, [& b' s4 \" L7 jend : p3 c/ e& e9 W8 D( H; f
$ u! V# F/ c% _ ]3 u0 [begin P_Creation4 arriving procedure0 [) Q, x) P" v! Z( _
while 1=1 do/ |3 a& f k* g5 ]
begin# F; V4 w5 t; Q: i( ?4 o
wait for 1 sec4 s9 Q ]" N* S" g0 m6 `
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)" z3 T) a7 m" _4 B/ u
end( l, \$ e% W( l A: x4 r0 ?2 ^" P
end
& R q* \# i% d& q H5 @( x B0 ^% M/ w/ J) v# D- g* y. ?
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |