|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
, |2 ^! Q; S5 o9 w/ e% U; O6 w& n4 v6 c t
我的问题是,在每个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中的数值,不知道会不会有什么不妥。( D1 J: q3 v* {) o+ [
5 _: P* @+ t/ T1 j; Ibegin P_read arriving5 G' y& J4 I& Z; }5 }# f' y5 P/ l& I9 m: q
while 1=1 do begin0 m) P, }2 L& U/ l7 D( ?# g& U/ S2 N
read A_tote from "data.txt" with delimiter "\n"1 m7 f/ r4 T) X% N# Q* j) F8 j, [
read A_time from "data.txt" with delimiter "\n"0 L8 W# \5 }( z0 Y1 ]
read A_leave from "data.txt" with delimiter "\n"( o0 m2 q, R& U8 D c. v: Z
read A_picks from "data.txt" with delimiter "\n"0 `% Y" Q8 n% Q8 M% |9 B& I
set load type to A_tote: _ p D; [ i! ~1 W. f7 U
if A_tote="tote 1" then set A_induct to 1
( V' C9 b6 r4 n c: G* y0 h; r/ ]- e else if A_tote="tote 2" then set A_induct to 2$ w4 r( U' u) M
else set A_induct to 3 & {5 H$ Z: @$ [
set A_i to 0
( V: N! o6 b4 \; C/ n/ n clone 1 load to P_induction
8 h* D# Y8 e$ E# Q" v4 o wait for A_time sec- u* W+ u( y5 l# v, u) p/ V
end
) _7 u5 h' s+ f6 eend
) K% j7 Z7 J0 u$ v, |! b9 c
; g8 k- l& }# e. C. hbegin P_induction arriving
/ E$ n' p3 l# [6 M/ h! B/ u' z/ K if A_induct=1 then clone 1 load to P_pick1
3 w J& H5 I# w, F; w6 N else if A_induct=2 then clone 1 load to P_pick2
, |. \0 G+ n0 y, F+ T- c$ i else clone 1 load to P_pick35 b0 {2 }. c# A8 B1 d& E9 v/ J$ e
end- s6 o* { g2 M2 Q1 M' V8 G
7 P+ ^; T5 o) D* a3 C, G O
begin P_pick1 arriving8 y+ y7 L' J# H2 A; a& f) L6 @
set A_i to 1* s: x5 M7 h& x! C* f. J
move into Q_induct1% R: E- j9 c0 J+ I! z* X: H
move into pickaisle.induct1
( f4 }& } o y9 ]1 p6 A while A_i<=30 do begin
# x: ?0 ^$ N7 \% V travel to pickaisle.con(A_i)
+ M% _# ?. b+ X if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec+ S1 O4 X+ n2 }4 N: k
else wait for 10 sec
2 z+ }4 t+ v, g3 s, g# T if A_i=A_leave then send to die
2 [2 n7 e* ?1 B0 z else inc A_i by 1
' E# S' u) g# u, x& l end
/ F, O/ u _. z# ?- y+ ], rend C- D) R5 `5 ]" _1 P
3 y6 @- T5 F. h, e) s; o3 w7 k1 F$ u
begin P_pick2 arriving4 F" S9 O8 a( I! J" V3 h
set A_i to 11
3 { c9 I% |# U3 o6 u2 D0 | move into Q_induct2
) F* N" d3 i) U( h& t move into pickaisle.induct23 o/ d' T! n# Q5 C0 {# N+ M: i o
while A_i<=30 do begin! _) {; T( x# \9 J; L: N- q
travel to pickaisle.con(A_i)9 T1 z: f5 [7 \$ ^7 r
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
8 ], A$ b( h1 J& s6 a else wait for 10 sec
/ P6 x0 T' f9 `) }0 W if A_i=A_leave then send to die
/ Z5 Y) a# a# e+ j E- B8 g else inc A_i by 1
( v; L( b$ V' c6 {7 b% } end
3 ]" Y$ J: m4 R- s6 `; Zend. c' i$ U0 Y7 `9 Q. y1 y
) T& {: ]8 h' @) }( M% C
begin P_pick3 arriving
# k7 [( R& B' h5 b set A_i to 218 E& d% O# i; e+ I
move into Q_induct3
- W& T7 q$ O/ C/ g5 J move into pickaisle.induct39 k% k+ z1 q3 v3 O
while A_i<=30 do begin
. |+ B2 m3 t& P6 w3 ^' J- `% k/ G travel to pickaisle.con(A_i)! j; m4 g. }: y+ {# l4 |' K7 r1 Y
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec! g0 \/ V! |9 L" R2 a8 }+ I
else wait for 10 sec
5 N( D }) s/ c. F8 q1 O, m; { if A_i=A_leave then send to die2 w' N- r9 x% ^+ x
else inc A_i by 1
9 j0 n4 v( `& y/ ? end
+ k( w# y4 ^& k8 v9 q$ Send |
最佳答案
查看完整内容
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,其它按你的 ...
|