|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
" a, Z/ F6 W, l& J f" p* P3 y' Z. [3 s2 `0 U, Z+ M5 D" S
我的问题是,在每个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中的数值,不知道会不会有什么不妥。8 E9 x$ p! w; h9 q8 }) E" }1 v
, g: u) e: i: |4 X6 N* ~begin P_read arriving* z! I& I8 P R& e. m! A3 |
while 1=1 do begin9 c6 R1 ^) b" A! Z* M% R E
read A_tote from "data.txt" with delimiter "\n"
) {9 z: p9 ?! E7 t6 w read A_time from "data.txt" with delimiter "\n"# @: I( G( @; t3 R3 J X
read A_leave from "data.txt" with delimiter "\n"
. q: B3 V9 n+ Y& Y {; t read A_picks from "data.txt" with delimiter "\n"5 H5 Q' R8 X" x5 v5 n5 U
set load type to A_tote
' `# E5 y! ]! ] if A_tote="tote 1" then set A_induct to 1
7 u% y8 y# Q, }, g- j+ h# t% V else if A_tote="tote 2" then set A_induct to 26 G" v8 ^& }+ n; R
else set A_induct to 3
1 H* K6 G9 ?$ | set A_i to 0% S- j; \$ X- _& B
clone 1 load to P_induction! ~/ p$ \, N: c2 U4 t
wait for A_time sec
8 Z- X( ]# j7 m# ^8 {& h end" I" W! R# Q5 A8 O$ I$ a& `
end
- L9 j9 X$ c3 Y. U! F6 C$ I/ ?! B$ k \0 Q, \- N$ d- C/ _
begin P_induction arriving ~4 g' n5 ]6 |" k' w7 r! A. T
if A_induct=1 then clone 1 load to P_pick1$ _- Q1 E& \! A% X- E& H
else if A_induct=2 then clone 1 load to P_pick2
) A$ G; d/ F7 x# ]( A else clone 1 load to P_pick3: A; b6 i: s0 Y) [) E6 v
end
' ^; S) \+ ]( U2 O7 `- y+ ~9 c8 b0 n8 F3 y
begin P_pick1 arriving
+ J& y0 y2 N. m- P+ Q5 K- @+ [9 n8 m( L set A_i to 1
+ t7 C6 v0 r9 L/ y* q( M move into Q_induct1
3 Q4 i6 ~% }' l4 R, L move into pickaisle.induct1
# N% c2 ?: n; O# k) w& g while A_i<=30 do begin
/ @4 F7 X2 ^# j" c- [ travel to pickaisle.con(A_i)0 y2 x9 W8 t% |+ H( G: }
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec4 h2 M1 p( c$ n, a
else wait for 10 sec
5 ]; Z7 H# O! k1 G7 z if A_i=A_leave then send to die
2 m$ u' A& [, s5 n5 K- B! J( D else inc A_i by 16 e2 f3 P& R6 {8 D p: {
end
7 t9 }2 U! P) J7 N0 yend' w `) Z5 r6 t
" U' w: b# E7 abegin P_pick2 arriving# e0 u' J0 N1 A' I& t) y) I
set A_i to 11
' t) L( y. C& ]6 _ move into Q_induct2 S6 i. i1 _: h1 |4 X
move into pickaisle.induct2
- c' ?- t/ B2 m3 d/ x while A_i<=30 do begin/ ?3 F, k9 O" [& W X- ^6 ?4 x
travel to pickaisle.con(A_i)
$ k- ?/ I, z4 s if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
) u1 ~! m! r* E- M else wait for 10 sec
' s0 s" x1 F% X9 f+ N if A_i=A_leave then send to die
; y1 K* c) O9 {" m3 a else inc A_i by 1" `" S# }& K8 A- i1 d5 ~. Y1 L
end' \2 |+ l2 a7 ?% I* e: [
end0 X0 s, l% e! n& r+ s1 _1 f
9 H3 v( Z" o) I3 x* e* `
begin P_pick3 arriving% p2 e# b. m4 m- q I
set A_i to 21
' X# H8 m9 ?2 s7 N move into Q_induct3
1 m) a. p7 D( y) Y; J. p" b move into pickaisle.induct3
5 P! c. H8 N$ g; K4 H while A_i<=30 do begin
+ @1 j+ ]4 i" U travel to pickaisle.con(A_i)' s/ k4 F$ }5 R- E: J6 `
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 t# Y/ V) v4 D2 G/ }$ q' Y
else wait for 10 sec) \4 U6 x/ `/ O! M3 f; j
if A_i=A_leave then send to die+ M; Z( x/ M6 P
else inc A_i by 1
- |& A& v% e9 Q# V+ Q$ ?+ q- @ end2 q! `% X' C7 i" {2 J Y
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,其它按你的 ...
|