谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
. [' u x* P/ R- ^+ {begin model initialization function* \* B( M2 c' x
create 1 load of load type L_null to P_Creation2) N2 p3 O* z0 s# {
create 1 load of load type L_null to P_Creation3 X% b4 {6 A0 M( t6 F
create 1 load of load type L_null to P_Creation4
+ F) \$ N8 d. E% d return true : K" m+ K- c6 z; I( w" I
end5 a G, [! k' S. e2 R
; N/ ~: W) z# M, cbegin P_Creation2 arriving procedure8 d4 d4 i# y7 x1 q M& ~7 B/ z
while 1=1 do
. s/ o4 R# S" N1 M% J* T: c begin
, J. x3 |8 q: n wait for 1 sec
* m I% j) t: u3 R- O create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die); e* x) e3 a4 a
end
! R- Q* E. ^! \9 y5 G' M f1 Nend
/ ~* G* M% M3 ^, ]% z N, ?+ J, q7 u1 f. n
begin P_Creation3 arriving procedure
% M* w6 r% Q2 G" ? F+ `while 1=1 do
; R" A7 U' s o; q% S3 a( C4 K, T begin1 o4 _2 B% B+ e' m. m& `3 k5 q
wait for 1 sec
5 j( v* P. F$ H( V create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die), c% L& r q; N% e; p& ^' m
end' l# ]. z/ f' j @# s
end
1 B- \8 w" T [! z A- r7 I$ V: e6 m9 B) p$ A
begin P_Creation4 arriving procedure
3 \: Z* v6 ~& D5 |, L" t. A* a+ nwhile 1=1 do
2 p7 `1 q& y N/ m0 h5 ` begin
* l" E3 b; P5 r. c* O8 h wait for 1 sec5 L& ?5 W( L& {# x
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)5 Z3 W" y1 x+ v0 J- n& T
end
; l) w" G/ b3 v5 S7 T- Aend
: G9 ^ `% m: p: q. ~
9 y. M4 l4 p7 ~, e% P但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |