|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
: H1 j) K) { O! {6 y* u2 ]0 O& {- [8 A+ |! {4 a
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
+ L2 c* ?, x. E( `. F1 G2 M- W- e: U1 m% ?4 a2 d8 z" A+ M
begin P_read arriving! d, {; a* a& J9 `0 ?
while 1=1 do begin
6 l3 h/ T; l) w5 T6 K m& i! g read A_tote from "data.txt" with delimiter "\n"
+ @; b+ S# z) d5 S/ m l0 y read A_time from "data.txt" with delimiter "\n"% M' S/ B# o* b+ C$ U
read A_leave from "data.txt" with delimiter "\n"
7 z& a) S; ^8 k read A_picks from "data.txt" with delimiter "\n"+ h. m0 y5 Q9 H n" q1 m5 P$ v
set load type to A_tote
' \ }) T8 H- }5 f if A_tote="tote 1" then set A_induct to 1( y5 E& g6 A4 C4 o- L6 J
else if A_tote="tote 2" then set A_induct to 27 b& S# z! [1 q4 I4 v2 r4 I
else set A_induct to 3
: p" ^, U* [$ l2 ^ set A_i to 06 J- F. U. n$ f% G' X# N) D) ?
clone 1 load to P_induction
1 T. a* G9 d$ w- N" P wait for A_time sec
8 o7 O2 L" X- q! h# x/ b end
7 @& L- _3 [: Y9 \& Xend
) d$ D# b s" V7 e0 r. @( q
- ` z" u" U5 x0 F9 sbegin P_induction arriving) q4 J0 M* I) V5 d
if A_induct=1 then clone 1 load to P_pick1
1 n# H7 i& F* O8 g# K3 I else if A_induct=2 then clone 1 load to P_pick2
; w- s" J9 _% l8 @* e1 [ else clone 1 load to P_pick3
0 T+ n7 p" v. e7 r2 j7 w8 ~& T! mend
2 c+ H/ l/ H+ ?" |1 _7 j
4 C5 \& E5 r9 P3 p( D5 p% Obegin P_pick1 arriving/ A) G0 J2 Z0 B
set A_i to 1
* b, z$ N* ]7 ]1 I6 f7 q( g) M. k move into Q_induct11 L8 J* w+ f: m" R6 M2 @2 @0 n' e
move into pickaisle.induct11 S, d8 `8 ~: U' y
while A_i<=30 do begin$ q# a8 y! f ~+ ^
travel to pickaisle.con(A_i)! }$ _, n# |3 z G8 T" _1 l
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
! K* x6 C# Y$ ]2 R: v6 w3 \ else wait for 10 sec
5 S/ B# L/ y: r) y* @: ~ if A_i=A_leave then send to die/ G& ?* ~% P. P. B
else inc A_i by 1
3 d- ^$ k% I- U( d5 W2 J end+ e& P) q+ J! ]8 T6 }
end! \$ F. I- ~. `3 A: C7 _2 `, F0 r
! K+ X# ~$ y I3 |1 O8 q, Q8 @begin P_pick2 arriving
8 _+ {5 y8 C* Y1 f! R; ] set A_i to 11" e" I9 @. [& A. {; Y0 D+ x! R% o
move into Q_induct2' o' q. `8 |, \* n. @) e% p
move into pickaisle.induct2" o' w( Y" V8 E9 L: e4 O/ y
while A_i<=30 do begin
/ E a6 L; b5 l ? travel to pickaisle.con(A_i)
; t$ `* M; H2 L$ ]/ o/ ~- S' V if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec' \2 a& v0 W- h+ i' A% w
else wait for 10 sec. o# D3 ?8 c! A }, L
if A_i=A_leave then send to die6 N9 G* |2 I; g5 A& c8 {
else inc A_i by 13 E# E/ Z6 i3 Q$ C
end
3 t; ]) n. D0 b. send+ n/ S7 S; I* l9 o e. U, X( h% K9 Q
1 z* f6 ~# S: j% @
begin P_pick3 arriving" t0 ]$ W) P6 c D* f# U9 J& \
set A_i to 218 [7 L6 ~7 ~3 O6 [* q5 j
move into Q_induct35 S! I5 B8 j& R5 U' ?% b
move into pickaisle.induct3
# n' c& w% |. o; A while A_i<=30 do begin- p$ I0 @/ T" |: l4 E. o
travel to pickaisle.con(A_i)
; z7 W" ~, n3 u8 k6 o if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
/ [! a+ F0 K- l$ r6 v' x) w else wait for 10 sec. s/ b8 V& X) [$ g
if A_i=A_leave then send to die6 d1 R! Y w9 O# E6 C3 M5 {
else inc A_i by 13 _: k4 G; j0 |! }3 P8 e
end
( h0 M& _9 x/ nend |
最佳答案
查看完整内容
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,其它按你的 ...
|