谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
5 `, U* w. x9 Ibegin model initialization function2 B' T' L: E2 W; I! b; S- c7 h9 j7 C
create 1 load of load type L_null to P_Creation2) b1 E T7 N. n4 ?- r; g
create 1 load of load type L_null to P_Creation3
( ~* g! d, I0 l, P; c create 1 load of load type L_null to P_Creation4+ h) O' w7 c& W% l7 r( @5 z
return true
+ r! J# }! u2 ?) n' Yend
9 H' L8 A9 u( e; c7 L! a5 ~3 C- q7 G" |- [: A' r; Y. n
begin P_Creation2 arriving procedure
$ a( y3 v" S1 `3 ~ { Zwhile 1=1 do
5 C7 |4 [8 C# M3 F- J begin( v# k( A+ K! Z$ R7 C/ m
wait for 1 sec9 {) ~& }- F2 s5 d
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
- K" u4 O" L4 P4 s8 o end
# \0 e: w! a5 h6 {2 @$ ~end- m3 h1 a d) o% X |- s
8 n. L; l. M% l wbegin P_Creation3 arriving procedure
1 o& N0 U( |3 {1 [while 1=1 do( |, }8 g) A" k1 J
begin, {4 I& u4 n2 V4 ] o( H7 w: K
wait for 1 sec# d+ u0 ^6 U5 p1 h
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
+ W# j: W* ~+ S% V, R# Q end
4 q7 B" P+ X `- A- E: Z% s6 eend 1 L6 B3 \8 o" S% G# J
. D" {0 x/ \# e9 F% x
begin P_Creation4 arriving procedure
! e5 n6 R g2 r% Y. |. C, Hwhile 1=1 do
, d1 l- |0 C$ O2 W begin9 A. m, R2 R% w
wait for 1 sec0 l' T. l- l6 ~7 N
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)- g2 m, g* W6 O
end
3 d1 j" C5 r$ O# u+ o+ V& e$ yend
) l0 S8 g; G& T% D0 M
, n, ^! i0 x) D& q2 V* m7 G但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |