|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢1 A+ L8 N; _6 d( g, w% A
% @1 I$ |) G3 z8 Z/ q
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
' K( a/ c( h4 n7 ^
1 K5 I& y& @3 r9 j, T+ e' l6 Sbegin P_read arriving
: Q9 a6 \- R% U. d while 1=1 do begin
0 y K* T/ E* s/ f6 p' D# n0 P read A_tote from "data.txt" with delimiter "\n"# p( l1 i* |% t) I* j8 x% F2 f
read A_time from "data.txt" with delimiter "\n"
- q: M3 Y6 L, Q2 y7 t6 }. b read A_leave from "data.txt" with delimiter "\n") U3 X3 x+ o1 r' I2 `7 ]0 Z8 D
read A_picks from "data.txt" with delimiter "\n"! e V( I2 `' Q) W; T; C& }
set load type to A_tote
4 F9 X s7 v7 X1 u; j4 O, E, O if A_tote="tote 1" then set A_induct to 1, X+ C# ]4 H* J8 D3 H* c
else if A_tote="tote 2" then set A_induct to 2
! a; x; J5 ?3 L' M$ i' O3 a2 y else set A_induct to 3 3 n8 f% h( ^. S3 N. |; B. @
set A_i to 07 m( j& p* k! J
clone 1 load to P_induction# u" V. k2 B" a6 M
wait for A_time sec8 g4 p* F$ R% F
end. [. Z* o% J3 Y3 L
end
! w, U/ ?& L9 k l1 m3 ?
I L2 Z( \* }) t0 Fbegin P_induction arriving
; }" V4 [- T0 K1 J if A_induct=1 then clone 1 load to P_pick1
9 `- n# k$ G, |: @1 _* y7 r1 K3 K, Z else if A_induct=2 then clone 1 load to P_pick2
2 L5 b" n3 @8 w* v1 x else clone 1 load to P_pick3$ D9 i I3 A$ e w. C
end
_8 |+ s* T0 r) B7 Z+ T$ _6 S' A$ n% y& U6 t% s, k
begin P_pick1 arriving6 u' i: T, O% h' t
set A_i to 1
7 A. I" B/ y; z' o5 v* | move into Q_induct1, A, S7 F* A) f: b- ^; S' ~4 q
move into pickaisle.induct1
, `" t- V& U Z1 |- B2 _2 B while A_i<=30 do begin
0 y3 F/ U \& o( V- k$ W; f travel to pickaisle.con(A_i)7 H: y/ \) H1 N
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec* }# y3 j7 p' q0 p, r% h
else wait for 10 sec
4 @$ e8 t/ C. A+ w if A_i=A_leave then send to die
! g. X* t/ ?+ A# Y else inc A_i by 1
4 N# v& d/ d1 x! h end
# K' b9 D, {8 H U% X4 Y, z* P- ?/ Oend
3 W/ _1 s% F# E4 G
4 g9 r* h" @- Ebegin P_pick2 arriving2 Z- N* g S! c8 ?! ~: a6 o* W6 a
set A_i to 119 R* I* A) T) }2 `4 k; W9 H
move into Q_induct2
" i! h8 h" W& b) R& O. ] move into pickaisle.induct2
9 G" F2 U8 o' U2 m: o8 M) Z while A_i<=30 do begin$ E. C5 x9 z$ z' i
travel to pickaisle.con(A_i), p, a7 g: P% |9 r' d
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
, ?" u. D3 W0 z7 ^8 R4 q6 B( k0 X else wait for 10 sec( t+ N) D6 F/ n) l
if A_i=A_leave then send to die
* l' H4 L9 G% ^! E else inc A_i by 1
, [2 Z, t; i/ I0 h( x, T end
8 I6 }# I6 `5 W9 ?9 z4 tend6 Q: p3 b& h" m z4 a
) }6 h9 J& n1 c) C$ D
begin P_pick3 arriving+ |- i& ]5 } V9 y8 X8 y& E
set A_i to 21
% ?2 a# e: N2 f- r( S move into Q_induct36 g7 V4 U9 }7 V% y+ U q
move into pickaisle.induct3. i: ^# Q( @: B0 {6 l
while A_i<=30 do begin
. c. f3 T3 E$ H travel to pickaisle.con(A_i)
! C Y8 ^1 n" G9 A; |5 ? if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec5 W6 P9 U) ]5 A' z. h* H
else wait for 10 sec
$ y( q0 H% |# { if A_i=A_leave then send to die
/ `" A! ^* F' W3 Y3 E$ D! P1 [3 D else inc A_i by 14 n- B0 f+ h$ k! z
end/ ~+ { C9 H" @: W* V
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,其它按你的 ...
|