谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);, N3 P! v; C, u; _9 e7 {
begin model initialization function
3 q# C D4 Q6 {) h) \ create 1 load of load type L_null to P_Creation25 g) b: |/ g. t5 w) Y+ |; \
create 1 load of load type L_null to P_Creation3* s( r- ]1 h+ U
create 1 load of load type L_null to P_Creation4
, J7 o; f7 p# G% P- { return true - z" I) ]* N) H4 L3 O
end
% h* z" E) v% Z7 k# u1 A& j6 V- y2 @* Z; t9 Z# S1 l
begin P_Creation2 arriving procedure% y. K4 R$ G7 O* x) }4 P
while 1=1 do
& u1 L& F8 B; E# J+ ~ h5 Q begin
' r- L- s' G. `- w" s8 m% ]. D1 x wait for 1 sec. ]: y5 n' s; F. v2 d( S% i
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)0 _8 y" t5 E: M5 E% c1 S
end+ N. |% q1 M4 w
end
) S6 L5 l, z2 R8 _" M/ v# P" L4 u) [7 G
begin P_Creation3 arriving procedure$ L: n) ?( U9 _0 C6 ~+ ?
while 1=1 do/ w& O+ N0 B/ A. E; ~/ e: V
begin& D4 F. E. H& x3 a/ f% g6 F
wait for 1 sec; O; \9 G6 ^# r' {1 B+ d: a6 `
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)7 D7 P% z% S% j$ K0 v* z( b' I
end
2 l/ ]9 `! o. W P$ G$ H/ q& oend * |% i! ~( i9 ]2 M
8 e; b! d) R" n! M& c/ T
begin P_Creation4 arriving procedure; h* \! S9 B( Z% ?3 m9 Z; A
while 1=1 do
" X- o6 i# s/ ?0 }1 W9 n begin4 q4 v% d& D8 S1 T7 i
wait for 1 sec7 Q( a$ w( _. B$ M! ~8 a; X
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)$ A* [) V, Q% ^( q* h9 K' i( O2 I0 a
end8 N' j7 a# |& u
end2 f0 ~' ]# l+ ^9 M, H
" p" M, e, s3 g) z$ K* y4 J但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |