谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
0 ]) F1 W7 o: f, r, k6 U. {begin model initialization function+ L- E5 U: y; Y \, G; ^
create 1 load of load type L_null to P_Creation2
}. M/ H5 `1 O9 X create 1 load of load type L_null to P_Creation3
9 q; T# ^! a. Z7 a$ i create 1 load of load type L_null to P_Creation4! s+ ?" K/ L$ K0 u4 d% s
return true 9 C4 @3 ~; ]4 w. F
end
% k$ g' D2 l' J
7 D/ l1 @+ ^' e' c% B1 Cbegin P_Creation2 arriving procedure& C3 X1 i$ C5 U" |7 L
while 1=1 do
) W* o5 j; K8 h+ e begin
2 w+ {, N5 x f wait for 1 sec
$ C2 q, S% \, c* v5 A create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
. n, |& S5 h2 Q) I6 I end
3 e! A; o2 W" R3 k4 u, \2 U y, i7 @end
: T h* c1 }( z# s: {8 X' l. y
7 Z3 r/ p" |& Q+ i/ Mbegin P_Creation3 arriving procedure
% D) m- p$ Q% Ywhile 1=1 do2 s) T+ P( ?" L- H6 o
begin
2 L5 X( w, l. H' k; r6 Y7 C& T3 H6 g wait for 1 sec4 q, Q9 _* [- r! H) A
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)2 @8 u3 g7 [) y: A" s) y
end
& }) a) E( b& H4 eend
" i# o% ^6 K6 w; [8 P+ e. F6 m: r5 y+ x) \) |
begin P_Creation4 arriving procedure% U9 K$ ?& `1 l# n6 A: h# E5 j
while 1=1 do, u P# r5 c; H7 v/ M
begin. ~' q. A! Q. ?7 x1 }. z/ a
wait for 1 sec
2 w9 ^4 [5 {6 I. c, E+ T8 Q2 l$ H create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die); x8 O- Q. Z+ S! ^+ X
end' u+ u) c+ z6 w2 ]- ]; H+ t
end; }; N% U! v5 X% R% V; \, H6 A* y
6 |+ K; X$ R$ w: i9 a$ O3 U
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |