谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);. F7 x x0 l! L5 Y6 H4 c
begin model initialization function v- J8 q- C; m# k. D
create 1 load of load type L_null to P_Creation2
: O# ], O A, [7 D' T# N2 ?! i create 1 load of load type L_null to P_Creation3
! J% A, Q% e. u o$ g create 1 load of load type L_null to P_Creation4
& r6 ^/ d$ o* b# S return true
4 x/ D0 b6 E4 n! |3 K5 n- Eend' L; R) e$ L( l2 d9 E
- I7 x" J- L- {8 `4 ^begin P_Creation2 arriving procedure& r! d; }# ]9 u: ^& W0 {: `- _% B) }' L
while 1=1 do1 A0 j4 o) ?0 C% n3 C m* t
begin
9 G5 h% d. p% t* G wait for 1 sec W3 q) g9 G& U, g
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* c" P) _, x# @
end! f& c. O: F' f
end1 @. ^ E$ l' q0 d! {: K7 O- ^: d
. h% C4 ] ~7 |) g; n6 e
begin P_Creation3 arriving procedure# ~. D2 P% o" U y: C" W
while 1=1 do$ y: C' a% e3 U* l: G
begin
5 U5 d+ n$ F* g wait for 1 sec+ u- b6 T! }5 }. I' [
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# L- u- t, T0 A end
6 G" S; {! P6 M, J' i2 r0 r( k4 z* qend
6 `+ ^5 P# p" p' O7 z7 J
' j) A9 k# M1 v( b( lbegin P_Creation4 arriving procedure# a' o) I$ {; }( S& ?& v; S B
while 1=1 do% G* Y6 U3 N3 a6 @) G1 t
begin5 o O3 o8 k! S; H% I: T
wait for 1 sec P! C5 H! S7 e# Y4 Z
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)# q7 E: q' l" R
end
" G3 k6 R7 Q5 u! A A$ k; nend) |' h, B |3 ~* m( y
7 s1 F& s& v; Z
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |