|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢1 J2 g/ _! f0 Z
" K$ B( G0 X2 [8 P7 m* [4 ~
我的问题是,在每个P_pick的process中的while循环内,总显示错误Expecting QueuePtr or Location, but found PathPtr. 在我定义所有的attribute的时候,从来没有定义过任何QueuePtr or location or PathPtr,为什么会出现这种错误呢。 我这里面A_picks是一个30x1的array的load attribute,我想用A_i这个load attribute来读取这个array中的数值,不知道会不会有什么不妥。( C0 i4 \$ q% z2 Y3 Q7 ^8 K
' L0 O2 S: [+ @0 P0 Y0 H* |
begin P_read arriving @5 @6 P% V9 j& @3 m. Y
while 1=1 do begin
t8 V. W; x e8 N) j read A_tote from "data.txt" with delimiter "\n"
+ [, o* ^3 p7 r; X( _ z read A_time from "data.txt" with delimiter "\n"0 T0 |3 N8 q$ S" v; l. E
read A_leave from "data.txt" with delimiter "\n"
9 Z; N9 C( x" o8 M( a& B read A_picks from "data.txt" with delimiter "\n"& `$ m1 P7 ?/ V7 F# X
set load type to A_tote
8 w2 e7 O3 D% V" E6 a: L if A_tote="tote 1" then set A_induct to 1
5 r f4 ~' i# e+ `) @ ^- n( | else if A_tote="tote 2" then set A_induct to 24 @2 F" z1 } J `6 @& N- N* Z
else set A_induct to 3
* ]. A" I6 \ L4 n# w# u set A_i to 0( A3 G% k5 Q; O3 p" [6 U6 Z* ?9 L
clone 1 load to P_induction% }+ g; d4 N& S* }% i
wait for A_time sec
$ ~' M5 O, K6 V4 c9 _4 S6 @7 ~: K6 S end
# j- I1 B+ x& j* S4 b3 Send
4 g0 [- [! }- q2 n/ o" A! W3 G) g% E s1 J7 p2 q# d2 H. S
begin P_induction arriving0 G5 H: S* d! A' r3 B2 W+ k
if A_induct=1 then clone 1 load to P_pick13 G g% E+ p9 z4 n
else if A_induct=2 then clone 1 load to P_pick2+ [ _0 L0 m: V5 b. K
else clone 1 load to P_pick3
8 K: {$ W* }$ a& ]4 N$ Kend g" O- n; f$ ^, T) q/ ~, G
6 G/ P) n( K5 W7 G- `8 `. k
begin P_pick1 arriving" ?$ g2 c6 c) t
set A_i to 1
e* x3 }8 g! Y! q, o4 O" M move into Q_induct18 B8 T. G" R+ F8 E* `7 C
move into pickaisle.induct1
+ J, P: c5 ?8 ~+ ^5 F# {; Q while A_i<=30 do begin
) v" O& X* S$ @- t3 |4 W3 j travel to pickaisle.con(A_i)* C P' Q# A0 \; } Z
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 }% e! o1 {% R( z. t( a else wait for 10 sec4 A# f# P4 ^% ^! N" x& D
if A_i=A_leave then send to die$ F5 i0 F; ]2 [9 L
else inc A_i by 1# T' E& S, w! i; V
end( v$ T n {6 H9 q! ?+ Y1 p# A
end
' p% U4 U2 X: F5 v) U- H+ a1 z- |
0 \: G' p2 X" A* q6 K, \begin P_pick2 arriving
5 [" \9 z, h0 r" v; \3 ] set A_i to 116 o' x, k2 @% X# d: a6 a
move into Q_induct2! B; S. Y2 ?* p# P) N& u) U" l
move into pickaisle.induct2
5 l _2 o; N" M! d* B9 _ while A_i<=30 do begin
! C, c z9 E0 d O1 N) V travel to pickaisle.con(A_i)
6 o {7 G& Q& A* B) p$ A+ C' w if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
5 H3 u6 a* P+ c: f7 B4 b& B& i else wait for 10 sec
: \% F" E6 U" P+ X2 J3 Q3 w/ L% ? if A_i=A_leave then send to die/ p/ c- D3 l* z
else inc A_i by 1
. B5 Z" ^# }5 T" @! B; `6 ` end2 y& u2 X2 I1 I1 `
end7 E5 E/ A0 r$ e
! E) x, Z* V5 m" S- g7 u
begin P_pick3 arriving' v. e% d3 m* j( h
set A_i to 21
0 m- a, M9 U/ Q! t, Z$ ~8 i move into Q_induct3' K/ {, e5 j. V, d4 w: X
move into pickaisle.induct3
6 E& M$ L0 Z/ U% _: R ] while A_i<=30 do begin4 ~% W* j0 @$ |% J) k
travel to pickaisle.con(A_i): ` v N, u# m" d; `
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
6 q( s9 R/ ^' Z* m' l. [( z else wait for 10 sec" Z. C# [2 y( d: V6 s
if A_i=A_leave then send to die$ U$ L; W' L" H- N' C; Y8 [5 Z
else inc A_i by 18 }( T3 e1 a; r
end+ V) }. h# @5 i2 n/ N
end |
最佳答案
查看完整内容
pickaisle.induct1/2/3是个什么东东?
move into后面,应该是一个station或control point,或者Queue/Container/Vehicle/Segment之类的东西。看你的报错信息,这个induct是个path么?
AutoMod Editor的语法报错信息,有时候会指在下一行,必要的时候要把上下几行都看一下。
另外,你的几个P_pick是完全重复的,建议以如下方式修改,可以减少代码编写量:
1. 创建一个Process:名称为P_pick,number of Processes为3,其它按你的 ...
|