谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 L) Y/ M0 ]8 u$ L, l) [+ d$ sbegin model initialization function. } Z' O! x- |
create 1 load of load type L_null to P_Creation2
$ b! [* d1 Y" D create 1 load of load type L_null to P_Creation3& D$ A: s* w, i* L6 l8 y
create 1 load of load type L_null to P_Creation4, ?$ P* n" a# C9 Y: e& u% ]
return true * i- q4 z' U, O: L
end
1 f3 P4 u) ]# G% F( g. U1 a( @0 @( Z- t" G
( E8 ?. F" `7 vbegin P_Creation2 arriving procedure# Q+ _2 f+ q- T0 X
while 1=1 do1 x$ K+ Z3 ~, O& a9 z* ?
begin
# a+ q3 Z2 L- R wait for 1 sec* }1 i; y3 f ~4 X+ ?. z% V, M: I
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)% W% r8 r& o( U4 s; j2 l) B5 c- K
end: B O* K& Y$ R0 g; t
end
; i0 g6 [$ L; O4 P5 l6 ~% b; M" f( n. n8 }: _1 X5 A1 J7 k. r: t
begin P_Creation3 arriving procedure
) l% ^' P3 n: j: Rwhile 1=1 do% Z2 G4 L0 \0 i4 F
begin
8 U" Q; M/ T |3 b0 Z. w, e wait for 1 sec0 d: i$ U; T" ?3 f
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
1 |& z& ~ b8 Q) r; L end/ T' p! T5 g& K3 I I- D
end
7 W+ u. X1 Y/ |- }7 k2 V3 V& f \
|% Y i) y; l* Ubegin P_Creation4 arriving procedure3 E3 I [/ T) `" {
while 1=1 do2 @) p* B% U& F6 g7 U" X& v2 W% u
begin
# g7 k$ y" V! r& E' z wait for 1 sec: o6 A2 `8 |% c; {8 H, J6 m2 `
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
6 L; _1 @/ F# m8 \" Q end
8 d: U" j* X3 g, r: Pend2 m. E' ]" b5 S+ k3 X+ _6 g
, i9 d% n4 g# I. r9 Q3 m( i2 U但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |