|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢7 A$ i2 d7 s5 g6 m
5 s g6 F+ x& I" v
我的问题是,在每个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中的数值,不知道会不会有什么不妥。0 K" j; ?5 c( C9 m u0 x
6 W7 K' V! @$ d! r
begin P_read arriving
# _1 O9 b+ i, }& o3 Q while 1=1 do begin
# y# W0 e4 t$ b! `' O read A_tote from "data.txt" with delimiter "\n"
m$ Q/ v7 P* g6 C read A_time from "data.txt" with delimiter "\n"
2 b4 H. B* P% p- c) E read A_leave from "data.txt" with delimiter "\n"
# f0 t- u0 M6 G4 j }7 \6 a read A_picks from "data.txt" with delimiter "\n"
1 r* q% s4 P% ]- m# Z2 I" d set load type to A_tote
1 S3 A3 N9 w! `" o8 T9 G/ o) W if A_tote="tote 1" then set A_induct to 15 z% ~5 j" Z, A% Q9 S
else if A_tote="tote 2" then set A_induct to 2
" [0 C- ^0 t$ g% N8 W else set A_induct to 3
# M( C: p0 z# f( a% K% c" J set A_i to 07 V; G: }* s/ t: D
clone 1 load to P_induction
* j$ b& N y" i' G% L wait for A_time sec9 {0 u; s" |0 M$ {
end
% f+ g" t+ j3 }, k! pend; I+ d1 ^4 K$ C' }
1 i" T% ?1 E$ @! jbegin P_induction arriving: a. P/ z- e+ E0 P
if A_induct=1 then clone 1 load to P_pick1, R8 {3 e, a( g& W T: Y, k
else if A_induct=2 then clone 1 load to P_pick2
2 R/ B% G; Z8 ^' x2 }% f else clone 1 load to P_pick3( p" }3 a; B: V" P( h9 q
end0 I* H2 F; [- b t" D* }3 ^+ |
6 ^; s L4 r, r; e+ N) p0 R" P9 |
begin P_pick1 arriving
! Z9 M! [2 _8 ~5 J( P set A_i to 1' U) d: X8 ^7 l u9 X
move into Q_induct1
g6 f* f2 S+ m% S move into pickaisle.induct1
% z1 B' ~, H6 i2 O while A_i<=30 do begin
6 H" H I- L- F& M3 b( m* o y travel to pickaisle.con(A_i)5 s& [+ t7 _; N$ M, M' P
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec- f) B) R9 B# G
else wait for 10 sec1 ~7 b6 o [5 z! [. T9 x' T
if A_i=A_leave then send to die
2 A5 ]0 m5 @% u9 F6 H2 A# a else inc A_i by 1! L& g% Y, z# c1 a J9 o b6 {% w
end. n' }8 N' F7 V7 A% Q4 _# o
end
3 f0 m8 d& R) l2 h8 V
: r9 U$ k+ ~, ]3 B' T2 F/ ]8 \begin P_pick2 arriving
0 `. U5 M3 v& n1 ^% e: U set A_i to 11
" A3 U; W& x$ g# g! F move into Q_induct2* @1 y+ k7 N% U+ T2 e
move into pickaisle.induct2! N5 g! W2 o1 v+ @- B
while A_i<=30 do begin
9 l# m- L3 Z* N- Y2 R travel to pickaisle.con(A_i)3 m% S$ R1 o* A/ H
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec* J9 r5 b( `5 q5 a5 z% f4 u' P* A' P
else wait for 10 sec" [& D* [& I+ L2 M$ U
if A_i=A_leave then send to die( X- N% \+ c" s1 l7 @( y
else inc A_i by 14 k# q8 J7 J" @* S" [& c* l0 |
end
: L2 v2 \; J+ l1 \5 @+ y, D; Qend3 R- _8 x9 b% q2 u0 x1 v
4 w. A$ R. g }/ j% u9 r& w rbegin P_pick3 arriving
k6 w. N g# w$ P) a set A_i to 210 h& E5 z/ t, D0 u
move into Q_induct3
* }2 J+ S+ L# p; y6 W move into pickaisle.induct3
' t& z! [3 e) A8 e/ g! O. K, [ while A_i<=30 do begin/ u- L8 V# d/ p6 R
travel to pickaisle.con(A_i)! b! U5 L2 q+ S" r8 g
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec" M! S' `5 z4 v+ t6 N
else wait for 10 sec( n" ^ p" h' G( O7 e7 L
if A_i=A_leave then send to die
% D7 g% R$ V# R' R& ?) A8 |0 s2 r else inc A_i by 1& A* }. Z7 |6 v8 \4 C
end1 G7 c7 |) Y5 \* A. i8 E1 x
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,其它按你的 ...
|