|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢! W E: {! F1 o, I7 ?
( X$ h) V6 L) T, k! a- L4 \' `
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
: ?0 h% u4 r5 }' [6 y0 q- u8 P9 c3 p* G2 ]+ `
begin P_read arriving( S; O7 \. i4 I4 R# E$ b
while 1=1 do begin
$ D/ p) P3 r K, L5 G/ u5 u! R0 X read A_tote from "data.txt" with delimiter "\n"/ _9 `. t" f. {- }# f
read A_time from "data.txt" with delimiter "\n"
7 J9 c( B5 n! N8 @ read A_leave from "data.txt" with delimiter "\n"
4 i, F" W* _5 F* B9 w C; ^8 j read A_picks from "data.txt" with delimiter "\n"6 `. L3 \( |+ U! W0 g
set load type to A_tote8 c" b3 L$ n* ~9 G3 l
if A_tote="tote 1" then set A_induct to 1
+ T- Z: ]5 y( f* h& | h' g. H) q else if A_tote="tote 2" then set A_induct to 2' o+ A9 q" C% F* x
else set A_induct to 3 " K' H+ D' B$ E
set A_i to 0* g, U8 C0 O/ ]% L4 s. }6 S4 K) g
clone 1 load to P_induction
, B* e# }. s" r6 a; o9 d wait for A_time sec
/ m0 x% d" N' e3 ]( l7 v5 J; x end; ]9 E, z$ q; d$ }" j
end
+ J% _' d8 u5 `9 `5 b0 p
M0 k/ Q% e* u$ {- k8 S& e7 U; O& ~begin P_induction arriving
2 |3 E* o# Y& C% V; {$ ^ if A_induct=1 then clone 1 load to P_pick12 G" \; w# S, s" g
else if A_induct=2 then clone 1 load to P_pick2
$ e( T: N& s9 Z# n- F else clone 1 load to P_pick3
; H& A4 G- K* L' Fend9 v' ~5 m+ ^+ P) l; W" p
5 {2 z e: T- K+ O' ]5 Sbegin P_pick1 arriving5 `7 _7 i# Y* i: V
set A_i to 1( I5 ]1 `7 x* ?8 ~) Y [% |
move into Q_induct1" K1 r: N* A+ j
move into pickaisle.induct15 s9 S+ T( M% U! B' {
while A_i<=30 do begin
9 D9 C l5 c' K& j travel to pickaisle.con(A_i)
6 z" w4 c6 Q- H* Y4 @ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec* f; a! j5 d4 m! x( b u
else wait for 10 sec1 }% c: c$ R( }, ]) _: [
if A_i=A_leave then send to die
5 ?+ k2 S5 \# s7 J5 l' h else inc A_i by 1
6 _! q$ _3 G: u+ K4 Z5 M: e3 f end
0 d8 U; v/ D# h- x+ ^( ?end
( U% W, \1 d/ i- w ~* _: G, Y. T5 ?8 N/ H+ _' T1 }
begin P_pick2 arriving9 w- X0 M5 H% ?& W$ c" z* b
set A_i to 11
" k* ^8 C5 Q8 ]" F% X move into Q_induct2
7 R/ g( \, b/ ]6 Y9 ~ move into pickaisle.induct2
0 Q# f, S% e; [$ W) M while A_i<=30 do begin% H/ `* K$ \) F: [$ p6 B
travel to pickaisle.con(A_i) t* J0 K! _2 W! O( m' K, ?' u
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ @. k" Y2 g% W" h5 V5 }$ i) X else wait for 10 sec2 C p3 t. v+ g _8 Z' B
if A_i=A_leave then send to die
- c( V9 D5 S6 Z6 z' R/ V6 c) { else inc A_i by 11 T' W, f1 `8 L K: {* k
end7 j4 k$ W" j" w" ^- m2 G& c
end
& k% ?# m/ q: l% m! D$ W! L
8 }& T5 o+ C; r" @- Zbegin P_pick3 arriving
. f, N0 n9 j0 o ^: @ set A_i to 21
. u% \, S0 l6 S6 a. _ move into Q_induct3; D. b4 K$ F! V
move into pickaisle.induct3
; E+ r0 Y/ P S* c# k) [& B while A_i<=30 do begin8 D( o' Y7 t9 q" p
travel to pickaisle.con(A_i)
9 ?; M5 k/ f0 r e! r if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec* o) m+ q+ r0 w% L' c
else wait for 10 sec* x; E- y5 m$ i: E
if A_i=A_leave then send to die3 J$ {6 X* B; }+ o9 s6 @ m
else inc A_i by 1
3 ?% A- C0 R" v$ N, \( |: R! C end4 I5 y! F0 H4 W8 G6 h- q! n. F# ?: D
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,其它按你的 ...
|