|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢; F- C9 G5 |# m( k6 R6 b
" q3 Y$ c. F' G) I% k% 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中的数值,不知道会不会有什么不妥。. C: j& h r% |( Z$ U
4 k* {; d1 L5 J% m( {: |begin P_read arriving0 ~- X* F- w& G3 Q: g w( O) M2 G) ^
while 1=1 do begin
! g ], n9 m6 k A read A_tote from "data.txt" with delimiter "\n"1 T% O6 l& J5 Y. B
read A_time from "data.txt" with delimiter "\n"
3 E8 f; X \; j: z7 p2 D read A_leave from "data.txt" with delimiter "\n"
5 { c& b: L* z. y; D read A_picks from "data.txt" with delimiter "\n"
2 }' j2 r$ ], W- d set load type to A_tote
3 I \: S8 X& C: N if A_tote="tote 1" then set A_induct to 1
" f/ O8 q0 n1 o. T t else if A_tote="tote 2" then set A_induct to 26 X. B9 i2 l9 U0 q3 l: g
else set A_induct to 3 ) A! L* z4 t' [: z: w$ O
set A_i to 0
' e; o3 q! o8 Y& H clone 1 load to P_induction! j6 w" U6 j1 {: }5 y
wait for A_time sec
8 L% A M5 E; Q# Y% G" y. Q end
: { {, j& @( P: Hend
( p! f8 q {0 x9 ?6 U( K
) v; A$ |9 m' h s6 _. G; obegin P_induction arriving
G* _5 S: y! g8 D5 I if A_induct=1 then clone 1 load to P_pick13 @! s0 j7 [7 s- _7 L8 @) `. x* o
else if A_induct=2 then clone 1 load to P_pick2. E \* v! n }9 a
else clone 1 load to P_pick3 d0 e9 g- y ]1 Q& Z
end
) Z/ y( n. ~% l+ |4 b" L) O6 ~$ H
begin P_pick1 arriving; g' c& a; U2 ?
set A_i to 15 @8 O# p/ e$ _9 a' d
move into Q_induct1
9 \! W& N, B7 s$ f5 c move into pickaisle.induct18 C4 n9 ?( g4 W! v
while A_i<=30 do begin7 n0 e" |6 S" p7 N
travel to pickaisle.con(A_i)6 G: k* i$ u- N* x8 k/ \7 S) L7 Z7 T
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec. ]+ ~* f: w5 m/ N7 g1 I
else wait for 10 sec- \4 r% P- F7 o) Z7 J: E
if A_i=A_leave then send to die
9 W2 F# C) M+ o9 ] else inc A_i by 1& F' P2 b% M" I/ B+ \
end
4 K5 g& ~' D% R* x6 ?+ Tend, z4 s) s) W& _( {) w0 X
1 M" L5 S; X* H8 @
begin P_pick2 arriving, O8 D/ M1 n- c
set A_i to 11$ B& C" v. }( C+ _ g
move into Q_induct2) W3 D+ J. b+ M! l4 K2 Q t
move into pickaisle.induct2
2 u1 m7 ?/ R2 L$ Z% D while A_i<=30 do begin# x! s! b! n$ z+ d; I
travel to pickaisle.con(A_i)
+ O4 w: Z+ H P+ M8 u) } q if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec- u9 M! r8 W% z6 R9 o
else wait for 10 sec# z& g: J d3 z$ T8 u% f' O
if A_i=A_leave then send to die
- L/ m' t! }5 I$ J5 { C else inc A_i by 10 b; A+ I0 v+ E6 e6 ^# R6 |
end. U% U4 B5 t+ H$ u
end, ?, v o* o1 C5 C. I
2 d* Z3 I2 h& c( h) h; d& \
begin P_pick3 arriving
4 M+ h" q+ _( O% ~8 Q6 g set A_i to 21# n6 K; k2 s: ?! |2 A5 m2 S
move into Q_induct3& u b3 y- d3 U0 Z2 W6 k8 D( K* t3 F( C
move into pickaisle.induct3( c- O. j+ L9 ~* K
while A_i<=30 do begin. m) _/ e# n4 G/ W0 K- X) O: p# [
travel to pickaisle.con(A_i)) W& w# |, A, j) ?) Z7 ^
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
+ k; F5 L) [" i9 M else wait for 10 sec
, b! J+ A, d7 G$ a) N if A_i=A_leave then send to die
1 D5 ?' o$ { H6 J2 L else inc A_i by 1
# Y1 p; |0 y. X1 P end
B. Z% ^: `& s& r% {% y9 E* `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,其它按你的 ...
|