谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
3 }2 n+ [& D$ d$ _7 ]begin model initialization function
7 |% \- u$ C1 l: d create 1 load of load type L_null to P_Creation2
% u6 ^% Q0 W x/ U5 t create 1 load of load type L_null to P_Creation3; g- {" w4 a w5 T+ i: D; V8 W+ ?1 k
create 1 load of load type L_null to P_Creation43 H* }& M+ z- ]/ ~0 u
return true
8 U, Y' L; l+ r' S2 H- uend* V3 N1 y+ p4 a& D
( K7 o' _2 [! c9 O6 G; a& zbegin P_Creation2 arriving procedure
, u2 z% D9 t% bwhile 1=1 do/ r$ I; E: a2 P
begin( @+ n( i. h4 Z3 }. s9 Y: E7 s
wait for 1 sec# X( C+ A) \' U/ d, D+ \8 p
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
5 ?8 K1 x* W1 h7 J v9 u6 U- K end
+ p# T8 A+ L7 j1 o% U0 k1 Aend
$ L6 s" \2 W- d, x* P6 O* L$ J5 s; q' ~! e# `3 T5 W$ p
begin P_Creation3 arriving procedure
0 [ [ j6 l' Awhile 1=1 do, g2 N( _, M3 S6 m8 r# I! J1 x- ^$ ~
begin
3 e$ C n! T6 c& r( w1 v& `+ q wait for 1 sec* T3 F" P: Q g% s% y3 B
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
. N0 @6 I4 u/ i Z% ^" k end6 a$ f: t6 c$ O
end ( G0 C1 _( v& w, z* m3 ^
7 a: L& h- c) P+ F$ Jbegin P_Creation4 arriving procedure
2 S1 ?5 v. Z' T2 b/ ~while 1=1 do
( b! t. Q }' h$ ?, y3 o! q D- G2 h begin
1 ^1 H2 A# S$ I- ]9 k# [3 U& n: Z wait for 1 sec
" W' I* F+ e$ o! R create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
$ a/ } c7 u3 l1 I$ D end' A4 `- z& W( N$ x6 W
end
& ~; N7 n7 t2 E. f& n, \( x0 l8 O. Y0 C
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |