|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢: J- m3 F7 a) `6 O) v
' n5 z1 R9 [0 J' I: a: J3 C# B3 I7 C
我的问题是,在每个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 c. H* h3 g" [# X; S3 f4 C1 Z' c D5 @5 _2 M
begin P_read arriving
, @, r. z' F: k& P8 g while 1=1 do begin) |: i3 g& G' s
read A_tote from "data.txt" with delimiter "\n"
9 F; L+ h3 e. z: b4 ?- h" P# B read A_time from "data.txt" with delimiter "\n"
4 p J8 Z. l! B4 ]6 g read A_leave from "data.txt" with delimiter "\n"8 {; A5 j0 Z" X! w# r9 P R
read A_picks from "data.txt" with delimiter "\n"
7 i- P+ A" r8 ~8 ^6 ]$ o4 G set load type to A_tote
% }9 I$ W. E+ o( [2 a$ h7 @ if A_tote="tote 1" then set A_induct to 1: l1 K% x- ] F7 p' j; K
else if A_tote="tote 2" then set A_induct to 2
& L( C3 [% `6 K/ M# N6 G$ S else set A_induct to 3
" N4 s/ \/ R5 ] c7 `5 z set A_i to 0
( W! @1 b" d/ K; @, g clone 1 load to P_induction
" j( a$ Q/ W* l wait for A_time sec) S w1 M- @( O1 a/ `
end
1 q- L. `- ^. I3 `end0 H }% l0 F, O) {
/ J- G3 s D* m2 M% m# R) ~$ S
begin P_induction arriving& c1 g) }2 r4 y4 P/ a# s d3 ?
if A_induct=1 then clone 1 load to P_pick1! p9 t2 c* k+ ?, b9 a( `" R) O
else if A_induct=2 then clone 1 load to P_pick2
A+ ^) A7 ^% c% z( g else clone 1 load to P_pick38 b) _6 v# E) X' r; ^2 t% E
end
. _+ |: M* z7 }3 q: `( o. R9 D- p" V( c
begin P_pick1 arriving* _$ y) M* w( Y. \$ {
set A_i to 1
_) h$ \' T. Y move into Q_induct1
, k9 D, ]" |3 X$ G R; P1 g1 X move into pickaisle.induct1
8 f' e6 Q9 u- S9 @' X" B I5 u while A_i<=30 do begin
" W' r. o% y6 d" A6 q travel to pickaisle.con(A_i)
5 i# |5 d7 c/ Y/ _ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec: q! u3 V* ]' P; t
else wait for 10 sec
6 d: R" }0 t. [- T) L) J if A_i=A_leave then send to die
; Q2 J: M$ I3 y! x" T3 e+ N else inc A_i by 1
0 \: N. V/ z' f: X end+ u. b8 J1 X' b$ |$ d, E' i3 s
end/ a0 T' E* g- k# \6 _% ]
$ V( h5 N/ y* D/ ~& x' Y( Wbegin P_pick2 arriving3 C# ~0 l7 E( {1 q; D2 ?
set A_i to 114 O& A4 y- z& `2 [. C
move into Q_induct2$ e5 w- z4 n% i8 O
move into pickaisle.induct2
. c; Y6 u. Y: b; P while A_i<=30 do begin
- L, D/ u7 g1 p q7 T+ `9 o* s3 X travel to pickaisle.con(A_i)6 P2 E& |% Y3 s7 d& t
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec! V6 o6 D0 `9 F2 f$ ]0 K
else wait for 10 sec6 W. t/ X! v5 a! ~- v, G" N: U$ [
if A_i=A_leave then send to die
* Y1 b4 M$ x! @4 u- {9 H else inc A_i by 12 p+ p; Q H; ]
end
# {7 D% o& X. X4 oend
3 x3 P) e, s8 f- P, Y; b6 Z# {
# x |) U/ ~4 B% G3 ebegin P_pick3 arriving7 @- ^' I7 y- @! K
set A_i to 210 U8 \/ p/ R2 H/ w" W
move into Q_induct3
. B% h# ~4 `9 J move into pickaisle.induct3
! S% F1 f0 h( q9 c) y while A_i<=30 do begin& y- H4 k5 P+ Y9 D
travel to pickaisle.con(A_i)5 b$ G) k0 Y3 e4 y% o6 |) ^7 M
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec- S* e5 A8 T( m
else wait for 10 sec2 p7 w3 y9 O' R7 u7 \ O
if A_i=A_leave then send to die( M% @5 f8 H( H6 O5 }
else inc A_i by 1
. R, \4 ]9 r) ?& j end
, @/ `' B* }. y/ ~- w7 Tend |
最佳答案
查看完整内容
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,其它按你的 ...
|