|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢* U8 O! @0 {* s
" J2 t( M, ]' K3 @; W X, p* A0 F6 {5 D我的问题是,在每个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中的数值,不知道会不会有什么不妥。
6 k) V1 t7 @* s' R, [$ D% a
7 }9 ]7 }9 d/ z2 O/ qbegin P_read arriving
F, H+ n: E( ~9 t while 1=1 do begin
2 o) X8 E- I# ], S; p( j read A_tote from "data.txt" with delimiter "\n"
~) |7 _6 V! w$ W6 C1 y" h% v3 x read A_time from "data.txt" with delimiter "\n"" e% f5 N9 w2 p+ u- j5 t8 N
read A_leave from "data.txt" with delimiter "\n"
4 @* Q% V& Y0 d# r4 R1 A1 z Z2 V/ o read A_picks from "data.txt" with delimiter "\n"
1 u# M/ q1 |* Q7 ~; U9 ` set load type to A_tote' w$ L2 N6 @% _0 L
if A_tote="tote 1" then set A_induct to 1; _' h' |. ?( q
else if A_tote="tote 2" then set A_induct to 2- l3 y7 k9 g' [) H
else set A_induct to 3
4 t( P7 S+ G! E4 q X" ?6 I1 t set A_i to 04 k; ^* Q/ C, c2 o$ p, A1 Y# a. t l
clone 1 load to P_induction6 U, C: L2 h5 \
wait for A_time sec
/ r& \# I. n: U end
' Z+ Q0 Q x8 r2 x3 D# @end+ L# u4 m# ~8 V5 u; _
. }+ F4 J3 b0 n' x
begin P_induction arriving/ O/ B5 q9 m7 I8 l
if A_induct=1 then clone 1 load to P_pick13 |$ R% t: n2 z" B
else if A_induct=2 then clone 1 load to P_pick2
/ z; S( h* k) e/ A else clone 1 load to P_pick3
3 J) R) s) u; B) i, B+ d; V6 c V8 Q0 Send! k; c5 U- p$ H$ S( Z
# k, @) F2 f0 {% h" tbegin P_pick1 arriving
. V+ ]# N* e2 @% P) |4 I set A_i to 10 f" e& z, W* _( ^9 c' X2 [8 K
move into Q_induct1$ Y9 F5 v3 h5 ?. n) m
move into pickaisle.induct1* Z; E* p! Z# O4 [6 [) B. U
while A_i<=30 do begin, x& \( ]! N5 X5 {/ B& f
travel to pickaisle.con(A_i)# e% }7 [% i2 P2 x- X$ n
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec3 B( h4 v6 k. V; I9 f
else wait for 10 sec
" i1 L$ _5 b) S; e+ o if A_i=A_leave then send to die
2 i6 w$ H/ d m. F0 f else inc A_i by 1
! J; T2 i- O' P; ` end+ C' j$ U1 o. L; i* E" ?; L% x
end
5 C" W3 m' B( e' B; [ T& A
- B3 }5 Q5 j+ V0 k# }; S6 bbegin P_pick2 arriving6 \# k! `' f) K- t @4 v
set A_i to 11: d7 U& b# L7 b! |8 i3 u& b
move into Q_induct2) n# m8 }4 S, O* X* X
move into pickaisle.induct2
j+ H1 a2 r. r" w8 Q4 q. _1 \ while A_i<=30 do begin. p2 {; f- s) I3 ?* k- T
travel to pickaisle.con(A_i)# {# ?' C6 r. n
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
( Z, v2 G, l) k* V1 q3 S6 z else wait for 10 sec9 j2 N1 I: T9 H% @! V: Q
if A_i=A_leave then send to die
) a# S5 d# _; ] else inc A_i by 1
' k& n- n/ @8 a; p. U1 J! {* M end* ^$ r" B* W. n" }3 }" P$ n6 v
end
- O% C7 L5 ]4 [- W: D4 c" u# J3 B5 z
begin P_pick3 arriving7 \' q7 R4 R) u" B2 r
set A_i to 217 l, f+ b6 W+ U$ s- c. \+ o
move into Q_induct3
8 [9 P6 o$ w( P; L' ? c move into pickaisle.induct3% V' }) S0 @& w# i1 G3 Y' Q5 I; b
while A_i<=30 do begin4 l5 L; n# Y9 b
travel to pickaisle.con(A_i): Y" Y7 \6 m9 L9 K% f6 z
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
+ N8 |! e0 [; K, m4 w else wait for 10 sec
2 e- i$ t0 U6 x4 }8 A if A_i=A_leave then send to die
' G. a; M8 T. L else inc A_i by 18 l* X0 X/ o6 y& n2 Q$ M+ D
end* W) R7 R1 W, j9 w9 i( a% j' ?" x- m
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,其它按你的 ...
|