|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
3 a0 C5 s0 p* i+ F0 d/ }- _1 C7 l$ h2 x: |2 t {6 k" O& M' e: Y
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
2 ?$ r; o; H- J# z
, ^- E# o" x- v$ F2 x$ c3 {" `begin P_read arriving( s, I8 u+ G# C
while 1=1 do begin& }6 Y) s0 _) G6 J. d* O' w
read A_tote from "data.txt" with delimiter "\n"
A. @, }% R. A% G& g, M read A_time from "data.txt" with delimiter "\n"% u) ~4 J- b+ A4 x4 ~, b
read A_leave from "data.txt" with delimiter "\n"
' G4 r1 g; M# j5 F7 D" }/ R8 R4 r4 m read A_picks from "data.txt" with delimiter "\n"0 X c! w4 t* W- u" a' H$ Y! C
set load type to A_tote
# `8 }' F( F/ W1 E6 N* t2 N if A_tote="tote 1" then set A_induct to 1
* M" E% o3 ^6 | v+ f" z else if A_tote="tote 2" then set A_induct to 2! W- k6 b$ y. M9 o' {9 E: T
else set A_induct to 3 + s; d' k" q" _; U
set A_i to 0* } e; V; ~, I4 ?8 X0 C
clone 1 load to P_induction
?: z" V( l9 w5 A1 W wait for A_time sec
1 Y4 s! {* ]) N; [& t' ]/ U. w8 ` end# a8 X* G* R2 y# g- p3 _* h
end
# Z4 A6 r2 Y8 s, D2 N- G: f$ s: _5 g
* p0 X& {) D* b$ g( y& Ibegin P_induction arriving
0 h) u+ N8 I7 V3 A- C& @ if A_induct=1 then clone 1 load to P_pick1
* X, N+ n8 A" q# U3 Z0 ?" R5 {) j, v( a else if A_induct=2 then clone 1 load to P_pick2
0 g7 ~) f8 A( k' t else clone 1 load to P_pick35 ]' E6 B" b' t# R# O- x& P1 u
end' j8 |, |9 h, q/ x" {5 E. B/ h
* E1 P4 F- g: q8 Obegin P_pick1 arriving
: k; Y; G0 S" | set A_i to 1
' S4 |) k: ?4 e! D move into Q_induct1# N- B/ i* e/ w, ^" U! n
move into pickaisle.induct12 j0 T D/ Q$ B2 u7 R5 X
while A_i<=30 do begin& _: {; z$ E' u$ q
travel to pickaisle.con(A_i)
: J; y! r l5 h! V e- ] if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec% {; w z1 r" W# ?! L6 d
else wait for 10 sec
/ N" _/ g( N. Z) f7 b0 Q" r& Q# X6 ~ if A_i=A_leave then send to die
! `7 X0 N: ?1 Y& Q* E else inc A_i by 1+ L' W& n0 L: S
end9 X! g J0 j$ w7 V5 a
end
; ]. i3 o) e- C8 I9 E; R( }+ Z2 l# q- T: ^/ h8 T8 h. {5 g) K
begin P_pick2 arriving' c2 J5 y7 N a: x
set A_i to 11
; v; ` {' c9 R' h. O2 g0 {+ k1 F* y move into Q_induct2! d+ x f& u4 G4 H0 b+ F
move into pickaisle.induct2% ~5 g& A! D0 ?/ b9 Z& g
while A_i<=30 do begin% ~/ U' \* f, x3 A* G2 G
travel to pickaisle.con(A_i)
0 x% f& c- r/ c/ d" X if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
) V* T& P" ?: u( q8 S else wait for 10 sec. ~/ G0 [6 {% t# ?
if A_i=A_leave then send to die( Q! ]8 Z) e1 T. Z" X" f
else inc A_i by 1
0 ]( W" h" H) ` end( r8 B! J& v) u: @- G) f6 \
end( N( g- ^& |3 e! E
4 r) \: O: i8 Z1 p# U
begin P_pick3 arriving' o' y% C9 Y" G3 t. R* u1 w
set A_i to 21+ h% [* s% z' w7 u7 c1 J
move into Q_induct35 C# ?1 S9 H0 x$ y; W7 N0 i
move into pickaisle.induct32 K$ D+ M* z6 i& ?7 h; H
while A_i<=30 do begin
/ W6 X7 {# N# i+ N, j# z% f travel to pickaisle.con(A_i)( B g& X5 [2 X+ t
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec6 v; p7 `2 G+ ?; ^! x$ t6 b
else wait for 10 sec
4 n, ~6 s8 C5 E0 L" r0 V if A_i=A_leave then send to die
, ~7 Q, j9 |+ H else inc A_i by 18 K' W$ d6 H$ Z1 F
end5 F1 M# ^7 G% k
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,其它按你的 ...
|