|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢+ ?/ i% `- b( m% H% c6 b" }6 h( _+ a
/ h! `! B3 O6 P$ d, S4 L
我的问题是,在每个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中的数值,不知道会不会有什么不妥。$ Z4 M) j1 V" t" D) K
( Y9 w- \% V; n
begin P_read arriving4 l' n |5 E4 m! C( T
while 1=1 do begin2 c; G: E& X. _# d+ _- l& } j2 V
read A_tote from "data.txt" with delimiter "\n"
+ l `5 l: v$ N( [! z# B read A_time from "data.txt" with delimiter "\n"
/ ]0 f2 l. H2 G read A_leave from "data.txt" with delimiter "\n"
4 h' a9 p+ L1 j+ ^6 W, V read A_picks from "data.txt" with delimiter "\n"
1 `. w; \$ o5 p, |1 H) c* A set load type to A_tote; [/ }, \3 @) \6 c0 K
if A_tote="tote 1" then set A_induct to 1! }" M' c; ?% }9 k- ^
else if A_tote="tote 2" then set A_induct to 2( j) w8 O% J! g6 ?3 S, u
else set A_induct to 3 7 d8 o S* V. ^8 \7 }$ V
set A_i to 0
3 h- p( A0 q" L clone 1 load to P_induction! D( q$ k3 Z& d
wait for A_time sec6 H9 e$ H0 K9 E
end( i) u9 V. h1 A
end
1 X3 }7 i0 ~9 e6 }
0 [/ V4 A& j# z* G- pbegin P_induction arriving5 f( d. V u9 Z7 P' p
if A_induct=1 then clone 1 load to P_pick1+ F9 ]3 ^% V# T* I& o% d
else if A_induct=2 then clone 1 load to P_pick2. l. ^1 w% n+ ?
else clone 1 load to P_pick3
2 P8 K/ v3 c! r) b* D; h- e% v4 wend
- @3 H5 `4 y( s S) j; ~/ U* @0 J. A' F$ X2 r8 U
begin P_pick1 arriving- C' _. _0 {7 ~5 q1 `
set A_i to 1) [0 r+ ^& G8 x9 Q
move into Q_induct1 o. n" ^" `0 I \) p( b
move into pickaisle.induct1: G6 ^9 @. T o( E, H" A3 b9 e9 W
while A_i<=30 do begin4 O8 q. i2 ^" ~0 O1 S
travel to pickaisle.con(A_i)/ }& j! p2 |/ `
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
) {. R) ~1 Z7 c+ l6 D. ~2 a; S' x else wait for 10 sec) P1 T& R, H( m
if A_i=A_leave then send to die3 H+ i1 _: l! P: q/ M5 P
else inc A_i by 1' \, F+ |. e/ b$ `. Q) O
end
; l2 E1 n, D, Q1 b) k l; Dend
5 W4 i3 R0 t- c7 \6 w
' Q9 c9 W$ W. z8 d4 ?6 Lbegin P_pick2 arriving
|, W$ y) F0 e9 M4 ?/ h: q( n set A_i to 11' A+ ^+ V0 f6 I" r
move into Q_induct2
8 ?& b# {$ S. h/ i5 D move into pickaisle.induct28 j* |/ C. f! J+ D1 A3 v, S
while A_i<=30 do begin5 u: Q/ ~' R# n) N
travel to pickaisle.con(A_i)
' }. {1 [3 W5 s" j a if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
1 j: |# t' X. @: g4 W0 R; t9 W# v else wait for 10 sec
" G$ `* K* Q' m* O if A_i=A_leave then send to die
8 @9 B$ N2 y$ R( h* W( @2 j4 w else inc A_i by 1
: c- \' l. R/ s; W' `% u end
) x$ y) \+ X# Send
" e7 z) _* E4 u# Z
) x0 n5 l( w1 \. }' m' R3 b/ Z, Fbegin P_pick3 arriving
! t$ Y8 U, @2 c6 f: c7 u6 d0 b* A$ }/ T set A_i to 21
2 x! m$ E1 E* @3 {, ~1 B move into Q_induct3
( Z* Y+ Q' `% @) x: v move into pickaisle.induct3
% l% U# w' f* d- ~ while A_i<=30 do begin
3 c" N, G, T& \ travel to pickaisle.con(A_i)
8 F' }) {# S5 R, l; `8 u7 K" Y if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec5 V, `' y# p$ k) H
else wait for 10 sec
# `1 J4 B8 r/ z* A& |8 z0 J if A_i=A_leave then send to die1 d4 J: ~; ]' P
else inc A_i by 1
( X0 T8 s0 e; x8 e- j6 ^) d1 L end
0 d1 a- \8 f& z9 e3 Pend |
最佳答案
查看完整内容
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,其它按你的 ...
|