|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
- J# S0 m4 o1 G8 P
3 _, @. y7 G/ }* I我的问题是,在每个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中的数值,不知道会不会有什么不妥。2 \1 L7 G, o& W( H; t8 D
6 D% o% P3 L9 `$ [4 s' `+ Pbegin P_read arriving0 M$ E, ?6 M& O% }
while 1=1 do begin
7 P; x% G3 q- R read A_tote from "data.txt" with delimiter "\n"
, u1 T! q/ s4 @& k read A_time from "data.txt" with delimiter "\n"
4 D: j/ k/ o9 s C read A_leave from "data.txt" with delimiter "\n"" C; B( y" a F
read A_picks from "data.txt" with delimiter "\n"" c! r Y2 U4 Y+ k3 C3 z
set load type to A_tote
. _: m/ P) Y: H B2 i6 `* |1 f if A_tote="tote 1" then set A_induct to 1/ r* @* H+ f8 k9 n1 d
else if A_tote="tote 2" then set A_induct to 2% w& n) V1 o* _3 V2 H4 D) V
else set A_induct to 3 ) ]5 g# @0 B; U1 a% k# U3 R
set A_i to 07 q, n0 k3 a! R% A
clone 1 load to P_induction8 p$ v3 t" S8 T9 ^, m
wait for A_time sec- D$ g5 s) i. b! k" G, l
end
- L/ W. n9 t) H; Y& ]" a5 dend2 W7 Q0 V8 _) _4 ~' A" z
2 j! o, _! z& y! n- P# c
begin P_induction arriving
2 f. P4 w/ ^7 Y: G) \; N$ e5 i if A_induct=1 then clone 1 load to P_pick1
9 o5 z% H" y4 T) L else if A_induct=2 then clone 1 load to P_pick22 ?" G+ K' _ p% ]) k3 E( H, U, F5 e5 B
else clone 1 load to P_pick3. c6 {' R8 m8 s2 J
end
4 P& V" O0 \5 }6 X- ~5 N+ K' d
6 d& B# N; F7 l5 z3 sbegin P_pick1 arriving
0 d. i* s) t7 ?+ Q$ O& `; A. D1 v( y set A_i to 1
% i! I8 k- i D9 f move into Q_induct1
3 E4 J8 _, ?) _ move into pickaisle.induct1
) [! b: ~8 F1 t9 ]9 K9 p while A_i<=30 do begin7 d( W5 B& J! `* Z1 p
travel to pickaisle.con(A_i)
' J6 W+ Z7 G# a5 D6 J% C. W0 Q9 w if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec; e& f6 W# s+ {2 _
else wait for 10 sec$ f+ O2 F9 F9 R7 }% h$ \! Z( C
if A_i=A_leave then send to die4 Q+ H# l( H7 g \1 Y8 ^
else inc A_i by 1
. l+ T7 V' a; q2 W. x) Z end4 X' j% u/ v) e6 o8 U* z ]: T
end
! v1 s. {: n; Y- g0 m- \# r+ ?( p# K1 R; ~
begin P_pick2 arriving8 q2 B4 i! T1 U/ \
set A_i to 11
$ C4 f' k. ?, q1 ~7 [" _9 M move into Q_induct21 z9 B! l, y3 O( x
move into pickaisle.induct28 E2 U- v9 h% g* f
while A_i<=30 do begin( M7 J' s! ^% F* u Q
travel to pickaisle.con(A_i)8 e, N1 w; t1 @1 T! D( ` d$ B
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec) `: Q. S) d. S9 l
else wait for 10 sec$ k0 k( h& e5 W; Z5 m; h
if A_i=A_leave then send to die
1 M) s9 E6 e" |: J% Z" A3 q else inc A_i by 1
9 h# y. x. I, D/ ^" s end& w; s+ m8 e6 Y+ @
end
. ]9 G# v3 X( M7 z" J
5 n, z3 V6 U' H0 u+ s7 o% Dbegin P_pick3 arriving5 w1 ^- K7 y/ s. h& m$ d
set A_i to 211 Z# a; l: d- K4 M$ }6 K% d
move into Q_induct36 ?9 b! M8 b1 z9 E+ I# {
move into pickaisle.induct3
' L! o1 Z* q, Z* I8 Y$ M/ i" [ while A_i<=30 do begin8 N5 J, \' {/ e2 W9 ~
travel to pickaisle.con(A_i)* ^4 `- H! u$ t1 l
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
" h1 a" m8 O/ ^/ Q. S1 h else wait for 10 sec- [3 i$ H3 l6 ^
if A_i=A_leave then send to die, P( C; N- }; G6 y1 k- M
else inc A_i by 1( P" Q6 H# m/ j, N q5 _5 S
end
P% M$ b$ g" D; eend |
最佳答案
查看完整内容
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,其它按你的 ...
|