|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢0 F) r W' c, h8 u
' p/ u! Y9 K! G, 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中的数值,不知道会不会有什么不妥。
7 a% u% E- M! y* V
' K! P: i2 e Q# wbegin P_read arriving
7 \8 N8 u' y* E$ F4 P/ `2 n while 1=1 do begin
_6 i% _* P6 y read A_tote from "data.txt" with delimiter "\n"
* X& j* u- J2 f4 m$ d read A_time from "data.txt" with delimiter "\n"
3 B) m0 q1 _$ ^& S7 H) H read A_leave from "data.txt" with delimiter "\n"
0 S* h- H5 X$ [. M* a read A_picks from "data.txt" with delimiter "\n"' N8 Y1 H ?9 Q" ], I+ z; ^
set load type to A_tote
9 ], M+ n8 K0 a: _) ? Q2 M# F if A_tote="tote 1" then set A_induct to 1
" |# w8 _2 _$ D8 F& m7 g4 | else if A_tote="tote 2" then set A_induct to 27 Z1 U, v7 e# Y
else set A_induct to 3 6 \5 W1 B7 q* \) c
set A_i to 0
. L" V' m% T9 f# G* J3 r3 A clone 1 load to P_induction
8 L2 x% B. C9 C/ { wait for A_time sec4 Z5 S: E- j, x E" H+ {! {
end
, A0 R8 G8 r6 l6 uend
+ L* N% y, i. J: \( e. D! |# z) l
& I( f5 h' z' Rbegin P_induction arriving
% \4 G8 u/ c; `& s, P0 f9 A# t# B, C if A_induct=1 then clone 1 load to P_pick18 o9 k1 p2 b; |6 t
else if A_induct=2 then clone 1 load to P_pick2
) Z' c. X" H1 o$ j& D( ] else clone 1 load to P_pick3
9 w3 x6 {: W' ^4 N: x; Kend
w+ _8 `2 w" R% c, p) g ~4 s1 K+ f) j1 w# D
begin P_pick1 arriving# `! f: N' k9 j1 [0 ?& m* n7 f# v
set A_i to 1. d" J( g$ n' r! {0 Q2 T% ^
move into Q_induct1
% o: u$ \" L8 j4 {$ V; v move into pickaisle.induct1
2 g, u( H+ O' o2 j2 u2 ? @" }- C while A_i<=30 do begin: X+ ~- c4 v' p, M( u2 v
travel to pickaisle.con(A_i)" }! n; N1 N4 C4 D7 {$ {9 P
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- x3 {" T. I1 C# Z% e+ Y9 Y else wait for 10 sec, E0 O3 K1 ], ] S. S0 P& h
if A_i=A_leave then send to die
3 g& e/ z# x& j9 H! l else inc A_i by 1
) ^, c6 a. h5 ^' x! r4 g end5 s: }3 v/ G! a
end
- q) [5 |. @- e3 y
; n3 A }- y5 T9 F* V8 V/ jbegin P_pick2 arriving8 j! f) v/ m$ G
set A_i to 11
) m; {' i, N* m) W: n" O move into Q_induct2
3 W" z5 v1 M( [% V9 E' [/ ? move into pickaisle.induct2 Y" X6 I* D: \2 o" I0 G* q4 ?2 x& x
while A_i<=30 do begin% r1 d( \, l, N( V& c3 {( M0 }
travel to pickaisle.con(A_i)
+ J- F: {# [5 }- N if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec' ]2 W, V7 ?' T' |$ A& a
else wait for 10 sec+ D: s- i% T8 R2 y, v* x1 O& z+ {9 N
if A_i=A_leave then send to die
3 f0 K* R1 U. g8 V* A else inc A_i by 1$ x- j- ]- a, t u# C
end
: d3 i5 K- r6 K5 S# _7 S0 Zend
2 T' x' ~3 F3 k7 \: C8 C- Z3 I- D
begin P_pick3 arriving
! l2 p" p' R$ C, l" z$ C set A_i to 21+ ~' S# G3 e3 Z; x' L
move into Q_induct3
% |, t$ o) h4 x/ L% v move into pickaisle.induct3
; `9 y2 r! ?/ i- t; y4 k while A_i<=30 do begin1 q4 }3 Q6 x; p2 J, T, H2 z2 y9 H
travel to pickaisle.con(A_i)! |- B' x' [: N6 E6 E- l# d) E% k
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
( g4 `! t2 z' @/ k else wait for 10 sec6 u Y6 C4 w2 L
if A_i=A_leave then send to die
' d, ~; F6 `& j else inc A_i by 16 F/ F6 h7 P( ?+ ~. Q3 S
end
5 U7 D, i6 z. F/ [& u' [4 w, O+ ^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,其它按你的 ...
|