|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢3 Z' T# {/ ~% Y1 F( c
* ~; g8 I) B! H
我的问题是,在每个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中的数值,不知道会不会有什么不妥。 N( s r6 X. W+ ?9 E
& h8 K) a7 D0 |5 o( vbegin P_read arriving
9 X4 s6 N. W) c4 b5 X3 Q while 1=1 do begin& i" @/ E; m( H
read A_tote from "data.txt" with delimiter "\n"$ E2 t8 H7 U: N7 P
read A_time from "data.txt" with delimiter "\n"
1 C/ [: \+ L2 I n+ ]9 @/ Y" z/ e read A_leave from "data.txt" with delimiter "\n"
$ z! ?7 ^ c' f5 l1 @# T read A_picks from "data.txt" with delimiter "\n"
, h- m+ H/ \3 }4 T7 G1 [ set load type to A_tote
5 {; o( i4 ~5 b' e1 l% H/ S if A_tote="tote 1" then set A_induct to 13 ^; F" c' W' k) s
else if A_tote="tote 2" then set A_induct to 2 L% f) f+ t' h: n
else set A_induct to 3
, k" s) r% e" { set A_i to 07 Z3 Q. y6 c5 A" M. w% w
clone 1 load to P_induction
' Z% V/ @9 K8 F- R wait for A_time sec$ x/ `, F/ ?, o$ F; c6 d3 R
end9 k$ \. J+ S* u! {: h' e
end- l# E$ _7 r/ r" B
) Q( ^& k' Z, J( e9 W; R. e6 I% g: ]
begin P_induction arriving! Z0 P$ _' Z" q1 J
if A_induct=1 then clone 1 load to P_pick16 x4 S5 K7 F8 {* _
else if A_induct=2 then clone 1 load to P_pick2- n8 F) r' l$ e0 q+ }
else clone 1 load to P_pick3
( O4 ]/ h7 [( |/ Y8 [3 ?end
5 C) ^3 w2 V) i: S
2 \: o& [) P, g! O2 Pbegin P_pick1 arriving
$ j& n% P8 r4 O+ l! g- W. H1 l set A_i to 1
* b# Z( c' U9 h' F3 _ move into Q_induct1: I: Q% c3 ?: U# X9 y
move into pickaisle.induct1
5 Z7 n6 X+ y; h9 ~! F$ X: j, ^( t while A_i<=30 do begin+ v @: K4 @& m; R- j
travel to pickaisle.con(A_i)% Q. z8 P: v: M& ]8 z" D, [( L) o
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec$ d" Y. N$ P! Z8 ]
else wait for 10 sec) j2 g8 w) P# ~5 P9 H4 @4 g5 Z
if A_i=A_leave then send to die. I- u* |# y g, u+ n. ?. z( p
else inc A_i by 1
' h4 n/ K* n6 t+ N! f. i end
' ~$ z; j& F( V7 D4 send8 l: J! c3 {3 d1 C# R
0 }1 h" H8 ]6 m5 |% Cbegin P_pick2 arriving+ p( \9 e5 c! T+ t' g
set A_i to 11
. v: z+ F: j. ^$ H9 \ move into Q_induct2
, H+ y! d8 o+ t1 F2 W+ g% P& g$ n move into pickaisle.induct2
# _5 s+ r1 u9 \' h3 }4 E while A_i<=30 do begin
f2 C( i8 e7 F! i% s: k0 `0 _ travel to pickaisle.con(A_i)
" n5 h+ I# V9 Y* q Z5 E! N! g if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
4 o3 R9 Z/ A+ }3 [" Y: |8 \ else wait for 10 sec: L. P9 _$ l9 B. c% y6 z
if A_i=A_leave then send to die
3 `6 ?& _8 E( Q7 S# }& k else inc A_i by 1& @" o7 j0 `' j
end
, r7 F" H' H1 o+ `. T Kend
7 E. ]/ K8 W6 q+ W$ L; t* Q- B
5 G7 X# ? ]1 s( s8 P. qbegin P_pick3 arriving; E# U5 P. f9 n2 N& J% p7 f
set A_i to 21! Z% H6 X: l4 t8 S* o
move into Q_induct3# N" b, x1 D# h3 t5 N) Y S" ~* O& Q
move into pickaisle.induct38 Q$ \9 [2 u" X/ g' e
while A_i<=30 do begin# |5 v3 H1 b# {6 G2 p) j \2 G
travel to pickaisle.con(A_i)
3 y! o. K/ t% O \3 T" { if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec0 S% l" F. y# ^. w! b5 |
else wait for 10 sec
* K; u* `7 g0 @! t( i: O8 d if A_i=A_leave then send to die3 r- m7 C) z7 ^$ t9 `$ w5 N
else inc A_i by 1
/ a \3 r2 ~/ K8 e: s& `. b end2 w5 D$ a, C' R0 Q ^ @- ` x
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,其它按你的 ...
|