|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢2 [" e: c' H: o- b1 f
/ }- I/ M+ \# X
我的问题是,在每个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中的数值,不知道会不会有什么不妥。) |5 S. E& y$ X! \8 V
8 X3 e# G% }$ C5 h7 {8 v. fbegin P_read arriving1 j% d4 h7 e" i8 U8 U
while 1=1 do begin# h% [3 V7 _( P: U2 }% f
read A_tote from "data.txt" with delimiter "\n"# D# k" @& l- X4 |' ~
read A_time from "data.txt" with delimiter "\n"3 d; E. R) C6 S; x9 M! h
read A_leave from "data.txt" with delimiter "\n"
. ?9 A" w) N2 U3 H5 M! G read A_picks from "data.txt" with delimiter "\n"8 A9 B, S5 X! l3 c
set load type to A_tote
% A4 x" l; |& j- ?; h3 [ if A_tote="tote 1" then set A_induct to 1% M9 Q9 @1 V% U( U9 O! p
else if A_tote="tote 2" then set A_induct to 2
( t: Y. E8 `1 K( C" t k' W else set A_induct to 3
+ O3 X; t, m8 d; G0 \ set A_i to 0& U8 y6 R7 ~7 t; p( h- F
clone 1 load to P_induction
1 J5 T( R$ z4 r6 |, M+ [4 E wait for A_time sec& a2 `' Y$ k# |4 B# G' A1 Q
end
* M2 a2 K4 {; uend. N4 U6 w$ B5 K
1 }, F8 _' } r! q1 z( ubegin P_induction arriving/ ` ~' k% l# l. i+ \. E/ b
if A_induct=1 then clone 1 load to P_pick1
$ a" m& \: N9 x! r4 G1 j else if A_induct=2 then clone 1 load to P_pick2/ C" _1 X* j1 b+ U9 o3 M! l
else clone 1 load to P_pick35 [% q( w) i+ m8 @: c8 [! R# W
end
3 N8 L, V& U5 j! o2 R/ e
( a4 |# n, t; ^ j7 obegin P_pick1 arriving
! p- d- g1 P# t Z4 w, i/ Y! k' Y7 ] set A_i to 1
8 x" q {: D& B& i9 z move into Q_induct1* T; T' x# q; M# [
move into pickaisle.induct1( W+ J* i% F/ g: G
while A_i<=30 do begin
) l, n* d3 ]" s! b7 [* N! j travel to pickaisle.con(A_i)
4 X$ r8 c2 r8 x: T if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec$ D" L7 g& \3 d6 _2 T- ]
else wait for 10 sec
& s( M6 H2 S/ q" t1 J7 o2 Y if A_i=A_leave then send to die
% s6 _8 x9 C: L$ E" Q else inc A_i by 1
6 q" S. R1 [* n; `& w: b) O! L end3 |- ]) q0 o0 d! D
end- w5 H1 P& }+ l4 o3 H
! d- l* ~$ _ x7 n& Q7 vbegin P_pick2 arriving) B# w. x2 j c
set A_i to 11$ l' R) p8 Z' m) X& l F) Z5 X' O+ l
move into Q_induct2
* r: v: P( x1 b% K9 o& `: H move into pickaisle.induct25 w+ Z4 a; t/ u; F. T! |/ t
while A_i<=30 do begin
' d" o. C, E/ b8 F travel to pickaisle.con(A_i). e+ V7 T3 h* n/ @ a% r4 x
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec1 t9 [& p8 `1 R+ o9 g: \
else wait for 10 sec
6 K8 |/ T, G; F5 t- R$ e if A_i=A_leave then send to die
8 G* A" c% A! a; w ^ else inc A_i by 1
# R5 g# Y0 t3 U- N9 S end% v" E# I3 a# ?! R# R: w
end. L/ Z7 i5 U" s- S' X3 |. N
5 z, S5 B+ Y0 u
begin P_pick3 arriving3 i! {, S8 ^! B8 A# [0 E
set A_i to 21' B; A+ ]/ Q; P# X) v
move into Q_induct37 H7 z/ d& [8 M8 f6 a8 c
move into pickaisle.induct39 U# q( l3 |1 {5 a7 T8 b' v( Z6 O" L
while A_i<=30 do begin
( K7 M; H3 \ K* P3 O travel to pickaisle.con(A_i)
% y- l8 T# i) Y4 P4 E% h/ O if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec+ {6 o K$ `* l* v% S
else wait for 10 sec7 c/ u1 p% U% g+ _7 J
if A_i=A_leave then send to die$ I6 }- t. Y/ @' E" b
else inc A_i by 18 y" _. _& a5 M$ k+ C
end7 x( }3 X7 ?* \! @+ L! ` W
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,其它按你的 ...
|