|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢& A6 D+ {; F$ N/ B; N9 r6 x
' \5 v! j7 @- c7 c# L
我的问题是,在每个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中的数值,不知道会不会有什么不妥。' U$ z4 I) p* V7 G% d1 i. m
6 C3 \. V' T& |: g: s" Y* k) [# Ebegin P_read arriving6 x7 `; ^+ ^! H" V4 {1 s% |* K
while 1=1 do begin
0 f' t3 h% {) k$ @ read A_tote from "data.txt" with delimiter "\n"
$ V: w3 O& X1 |6 U, C read A_time from "data.txt" with delimiter "\n"# y \2 u. I" Q; @- X6 I
read A_leave from "data.txt" with delimiter "\n"
. e" M5 c0 V% Z/ \5 a read A_picks from "data.txt" with delimiter "\n"
$ n6 ~# F& A' s5 s! L: }9 l set load type to A_tote6 H! Z0 f( F9 q D! ]% F% v0 |
if A_tote="tote 1" then set A_induct to 1
* ]/ g* S' X; V+ x else if A_tote="tote 2" then set A_induct to 2+ l( @# U* C5 ~( L) Y+ C7 a
else set A_induct to 3
9 E1 P; g6 b% p7 Y set A_i to 0! ~# z8 v) t# e t& m0 B0 [+ V0 ]
clone 1 load to P_induction
- ~. S* U8 ]& @- d; S7 ? wait for A_time sec+ T" I' m, _$ N2 k. w. r
end
: H8 u' }) o8 O, iend
6 M) q, Y8 n6 D0 Y& w/ ^0 L
# N: n8 \* a4 T; m+ ?begin P_induction arriving5 P/ O4 O8 b0 l, r
if A_induct=1 then clone 1 load to P_pick1
2 t& t5 M4 n+ C9 ~ else if A_induct=2 then clone 1 load to P_pick2- }) [& x {! {) |/ t+ B
else clone 1 load to P_pick3# ^% }* Z4 @+ s6 f
end
) E2 _3 d* s) [* \( h$ v/ G- v. a& M7 L: E }
begin P_pick1 arriving/ c# Y7 H; z ^% w2 E. N* X9 o% ?
set A_i to 1: O. }7 H- z# K; e# S9 l
move into Q_induct1. q k. Y+ ]$ ]' i% Z# @
move into pickaisle.induct15 I6 c8 u. m+ T; \% G
while A_i<=30 do begin
9 ~: y7 }; ?) n travel to pickaisle.con(A_i)
8 q1 t8 ]2 Y2 L' K2 R; K if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec; T$ l$ _5 ^3 W
else wait for 10 sec/ _" A# C! r5 r( c( N, b) R2 n
if A_i=A_leave then send to die
" @ x: C4 K# L- N" } else inc A_i by 10 M: Q4 |# D( B" b8 T1 x
end; i. v9 ?7 b1 O! `, H: M0 n7 _
end/ l) j$ k: P* c' u# _! ~
. @0 n( j2 A9 _3 @
begin P_pick2 arriving t- _, I" ]2 D
set A_i to 11: Q: g) b) H% ^0 y0 @4 }4 z9 Z
move into Q_induct2
4 J9 e8 B1 m3 r& r, `' A move into pickaisle.induct2* M+ |% O! r! U
while A_i<=30 do begin
6 W' W' g5 ?! O0 V travel to pickaisle.con(A_i)
( i, N+ ~$ Y+ }! r0 ~( D5 ]4 } if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec; e* u5 I2 p! W) i0 ~
else wait for 10 sec7 p) C+ n* H; K F+ ]
if A_i=A_leave then send to die6 `$ e* B8 [3 N. ^/ R' w- [# i
else inc A_i by 1" A$ k% V- R2 P, J- y
end
$ c4 g$ z' _, l# N: T1 C4 Xend
& S4 ?5 w P5 ]+ m/ G& ^0 O5 T$ R: _
begin P_pick3 arriving, `6 ~2 S8 x! q3 @ V9 u8 q& x" a, U/ f
set A_i to 21" Q! S4 H" i* L$ O- K j
move into Q_induct3* C2 L1 B9 V$ T
move into pickaisle.induct39 G! ]2 Q( p" a. s* s
while A_i<=30 do begin4 K. H$ E) ?$ b: v
travel to pickaisle.con(A_i)
# `$ }" C/ @9 d4 Z3 W if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
' N5 y5 w% Z9 ]' r: V! f% l. T6 _2 r else wait for 10 sec
i0 D. B: @- A, |7 h# h if A_i=A_leave then send to die
+ @! T/ k6 X4 P else inc A_i by 1! K ^& k* R! h) S; R' m5 s
end
% K c: a4 b# P v# Yend |
最佳答案
查看完整内容
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,其它按你的 ...
|