谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);. `. s4 C/ w) z: t$ r; l" e0 x
begin model initialization function
' d6 \9 l4 Y5 _ create 1 load of load type L_null to P_Creation2" X1 T `" O/ ]4 q2 ]- R
create 1 load of load type L_null to P_Creation3, j+ V* f$ ~! r. t1 a+ {1 q
create 1 load of load type L_null to P_Creation4
9 a1 I6 ]" a9 m5 _ return true
- a/ z) O* U* u4 b$ |. R* lend3 m: r& F& t0 u! y) V. f
) N7 j5 J p7 ~6 {begin P_Creation2 arriving procedure
, l; j: s# B2 }$ N# T" g1 Owhile 1=1 do
2 z6 I1 T* a8 _& g& a begin
& { I$ l+ f& { wait for 1 sec
2 J4 @1 u, J3 S4 W create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
5 w+ s5 [4 y/ M3 q& X/ K5 b6 } end
4 n6 I2 g# }+ }0 m9 n7 x8 jend. j% Z& K+ h- p' |
6 m$ b# m+ }0 @' sbegin P_Creation3 arriving procedure6 O% z9 X& l, ^
while 1=1 do
7 H$ z2 M/ J4 ~! t4 H$ c begin# K) ]) `- e6 d; S9 D L* Y8 E% _
wait for 1 sec
) t Z" f0 _& k, G i create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
3 C8 n! d( l; p( V end" _! h: D. x& W7 T6 e
end
: z3 Q- K/ J4 T( c
% J8 D8 o. ~; h) Tbegin P_Creation4 arriving procedure
% e! g3 x5 v. e2 ~0 w" \while 1=1 do* v" c" N9 _( D* Y$ C- T0 y
begin# ~! Y) A1 G x! a9 p
wait for 1 sec
9 q \ g, i8 ^1 u4 d, F w create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 ]. N# [0 A; W S& W end% q, C: b, K9 s' Q; J
end
. M3 s4 z' G9 `: ~( m3 K% e( r
6 J( s, ?* R6 y% W$ }/ V& U9 m) e但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |