谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
0 T% b1 R+ A- j9 E- [. n0 ubegin model initialization function
! x2 S6 ^7 I# L! M create 1 load of load type L_null to P_Creation2
- M* F# r5 [# Q create 1 load of load type L_null to P_Creation3: W0 c6 b" g- w& ^2 \, s5 Q& H; [
create 1 load of load type L_null to P_Creation4! P) Q, E/ {% K" e5 n G
return true ; M. A4 Z2 C' ^3 L0 r
end6 P6 ^0 H c) j% Y3 p
( ^4 E. E' v+ N, T' T3 S; i4 W
begin P_Creation2 arriving procedure
2 q$ v& D. G* a8 I3 L, O; F' e2 Bwhile 1=1 do. L& C- v, T! j$ g" B; D
begin
3 c. {8 ~& x, k; t' O1 d wait for 1 sec4 e# O/ o1 G/ I
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
7 q4 `( Y. N w o! L, P end
! P, ?' ~1 C5 |7 n, Fend
8 \$ b& r" ~ M1 D0 I9 N* D
) ^' A" p3 J3 S fbegin P_Creation3 arriving procedure5 Y% ?# M; ~. v3 c% {4 |, b. i. Y
while 1=1 do
* z' @( x' Y) n9 [- f: ~+ l begin; }' T& ?( H- U
wait for 1 sec: ~4 H& ]0 |! b7 \% W
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)! C2 K8 O0 u; [; v
end
$ E4 U+ q' S P _& `4 I, ^end , z% o9 o; t2 u
! m9 n, @' G8 Z9 L; O
begin P_Creation4 arriving procedure) |9 R* Z# W% J a; s- K/ P' D8 A
while 1=1 do: I4 `: H! i8 Z& ^& j5 J& t4 ^, a
begin
& I/ W. a3 l- N3 l wait for 1 sec
- L6 Z5 G7 D# |6 s. Z$ T ~ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)0 u f3 k# Y6 F+ P5 @# n* \
end
3 @' L% W$ b$ O* X9 o( g3 a! O ?' H5 yend; o1 h& T4 H5 q2 U. f7 ]. q# S1 `
& ?0 @, D" z5 {6 Y# P6 \ |" i但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |