|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢; e& R# J* K0 k, Z7 a. m; G
2 C- F3 b$ @6 o/ l/ 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中的数值,不知道会不会有什么不妥。) ~5 Y; h+ C m$ o4 v
6 [ m p) S, P; B: Tbegin P_read arriving
/ |4 {, l! G( N* z/ Y while 1=1 do begin( f* [6 C7 t) I
read A_tote from "data.txt" with delimiter "\n"" N9 s- H. y2 Y* t: ?
read A_time from "data.txt" with delimiter "\n"
8 c' r- f3 s6 k& g, y ?4 h0 B7 P read A_leave from "data.txt" with delimiter "\n"+ s& t" |$ S- f' A Y
read A_picks from "data.txt" with delimiter "\n"
/ t6 O" X8 O. x0 {$ r/ n2 q0 b! V set load type to A_tote' T3 Z( Y' w% a5 ^
if A_tote="tote 1" then set A_induct to 1, V% o$ D: ` l+ |1 S8 ~, t
else if A_tote="tote 2" then set A_induct to 2 N1 A8 K1 \8 B- C
else set A_induct to 3 9 o/ y7 X( Z/ X6 o0 o4 H2 M3 M
set A_i to 0: U; L7 V$ d3 I
clone 1 load to P_induction8 N% l2 Q4 n) O, q3 [
wait for A_time sec
* o$ U; A, J" ?6 w" T end5 x! j+ i# r. B s
end+ `6 e) m3 @0 `2 X: o7 b
% U% d3 L N- N5 C# `
begin P_induction arriving# i8 S/ q; G {* X
if A_induct=1 then clone 1 load to P_pick1
: {0 s3 ], ]- d2 K else if A_induct=2 then clone 1 load to P_pick2 j! R3 v6 a5 H5 ?" }" ?
else clone 1 load to P_pick33 p. ?( M% \9 [2 q3 j; J
end/ G, ?! p. v" Z" W6 i
) U) V1 ^% v( k6 U4 S- [* M
begin P_pick1 arriving: W* N- e( K+ X2 y( ~1 C, o
set A_i to 1
0 k$ _" ?8 v1 Y& T" k move into Q_induct1
* X, I6 h+ M7 s6 k9 l: s move into pickaisle.induct1
* J+ {/ u3 M- Y5 h while A_i<=30 do begin0 J; Z: b; ]4 T# A Q
travel to pickaisle.con(A_i)! n# R) [4 \; g
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 Z( Y, K7 g" V9 [ else wait for 10 sec
* f M. R6 o7 l2 d | if A_i=A_leave then send to die& d x- l- T9 Q) T. [( _$ m2 ^8 B
else inc A_i by 1; l+ N6 j" B, M1 m
end9 {8 K5 X( ~. H8 ^ |! b
end
* ?) Y- b$ F$ o' f
& J6 h( I2 v6 b) x& ^begin P_pick2 arriving/ m3 ]& ?, c# s9 r
set A_i to 11
1 B& m* X5 ]* \% R move into Q_induct2
( ?1 Z& X9 i! A% Y* ^- C" @ move into pickaisle.induct2! b$ `1 o8 E3 Q3 x. a v# ?
while A_i<=30 do begin
4 j4 q: p& C6 O5 {3 P. r travel to pickaisle.con(A_i)
R# [+ o9 E1 F" f, i if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
2 V6 U5 _& H7 k5 T else wait for 10 sec
$ ~7 `" Z! E# Y) D! F if A_i=A_leave then send to die
* x. l/ V2 N4 m" ~2 q' f) e else inc A_i by 12 }2 C; s3 M- C' V$ I
end
% H! D$ ^) t) a0 y# A8 U! oend
" f$ F$ @4 t H" Z' `3 A6 X$ t* }7 m$ v' A& ~8 q
begin P_pick3 arriving% C( {/ \; t: d& K
set A_i to 21 C, a* e1 _' v% h
move into Q_induct3; U7 x3 C( n. t
move into pickaisle.induct3/ P$ @, j, a3 V. P' ~: `1 f" s! |
while A_i<=30 do begin
6 }) x6 n7 s3 V# D& ] travel to pickaisle.con(A_i)
a* s# s: X- I9 p# z( Y) l if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec7 V$ _: i( F! z9 `( j
else wait for 10 sec
! N7 l g' e. O if A_i=A_leave then send to die
1 {! A8 ?& H9 W" @$ h1 J; J else inc A_i by 1. S' T# e1 X6 Z1 O
end
+ ]9 b* a+ [% ]8 D& Zend |
最佳答案
查看完整内容
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,其它按你的 ...
|