|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
0 L! {6 I$ V) ]6 G1 F5 g7 P9 m* a! o
我的问题是,在每个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中的数值,不知道会不会有什么不妥。' L9 j+ |0 G) m, g% A' r- ]( e s
. Z) k) Q! J; F
begin P_read arriving4 W) c& Y, x+ D& Z; H# b: ~
while 1=1 do begin3 |* |8 p q7 r# o/ d3 Z. f
read A_tote from "data.txt" with delimiter "\n"
! p( M; w8 q* C: I5 B) ^2 Q, ^, Z read A_time from "data.txt" with delimiter "\n"9 O( X7 A |: D6 T/ Q' C3 h3 r
read A_leave from "data.txt" with delimiter "\n"& g5 e5 b" s! ~0 \* R* U# v
read A_picks from "data.txt" with delimiter "\n"$ r/ T- G4 X; f5 [3 e
set load type to A_tote" s }" q& w+ f
if A_tote="tote 1" then set A_induct to 1
- j% e, V8 R, Z$ o" @2 c else if A_tote="tote 2" then set A_induct to 25 u% @2 V/ K9 }: Y
else set A_induct to 3 2 k" Q% l/ B- l2 O) v& ?5 r; }
set A_i to 0
3 N$ Y) R" C* T clone 1 load to P_induction
! K- R( p( c4 C% U7 V& f wait for A_time sec2 X( P8 R- i9 ~( O/ h3 h9 A3 b7 b
end/ V, l' |1 I# W1 f V
end
2 U) c4 t- P r) I- l- ?8 `
% g( o O! @2 P6 y4 C. F. tbegin P_induction arriving( S9 v' `0 p; h2 P4 n3 Y; F
if A_induct=1 then clone 1 load to P_pick12 k$ t/ M7 l% s" J7 x2 M
else if A_induct=2 then clone 1 load to P_pick2+ S3 B9 }- ?3 Q- H& Z
else clone 1 load to P_pick3
% {9 u+ z* h+ ^5 K( y5 Dend9 f; N! f* g* N; j
- f: o" ] t8 g; M/ y* F! ~begin P_pick1 arriving
; v% w2 R4 {1 K' \ set A_i to 1
" Z/ }* ]& X, ?* w. E% h" B move into Q_induct1/ ]% b) C' ?# d% ]; ]: ~( M2 }$ t
move into pickaisle.induct1" M$ J1 F: d1 V! B6 G
while A_i<=30 do begin
8 d% L& @6 C; ~7 F/ N travel to pickaisle.con(A_i)
* {0 ^; |6 G/ N if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
. g( z7 K4 q u+ X( t8 L else wait for 10 sec9 K+ B1 _4 H; y7 J9 D O
if A_i=A_leave then send to die& x2 T+ M/ v {% O0 L
else inc A_i by 1
' T3 L p+ S$ y- e" n% H7 Q O9 B end% X+ U( U0 h9 z: l" y
end1 `+ I4 Q! A2 e1 |( j
6 p, A2 E* d5 k
begin P_pick2 arriving; o% ^, L ]) d! F% J" q- \$ q; K5 a5 U
set A_i to 119 n* D1 l% t- x- D" k; g
move into Q_induct2) V$ b6 m1 l" f! C5 S
move into pickaisle.induct2: O8 q0 Z1 C9 s" _! W
while A_i<=30 do begin
: }# E: X8 A+ X j' E& X travel to pickaisle.con(A_i)
3 q+ T. N; V; I0 l if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec3 e% a7 y$ g8 k' M k
else wait for 10 sec
; g! t& m9 T+ V* o: @! I! x) v if A_i=A_leave then send to die
9 T m P3 _* r else inc A_i by 19 \6 s z! ?# I
end
- F+ z. R, A2 h+ b, s2 A- B0 Iend8 H, B6 u( u3 H+ T
2 S; x% |. d( Lbegin P_pick3 arriving
4 H# O+ V4 n1 e* i0 {5 I; _" g, w9 X set A_i to 218 M7 T6 a) w' f ]' J7 v
move into Q_induct3: C( Y# s6 Y+ D$ y+ x7 d& Z2 M1 I
move into pickaisle.induct3/ s2 k: e K' q
while A_i<=30 do begin& S9 p' \8 W( l4 o2 i9 N
travel to pickaisle.con(A_i)" y/ K! s" S" c& k, {
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
8 ~9 v0 @ \6 F2 H& B( V+ ] else wait for 10 sec
: A6 l3 w- Z% {: [+ {; C if A_i=A_leave then send to die
+ p' e- W. w1 ~" f: c( m else inc A_i by 1
! q/ Y3 a# X; d: m, M3 J end
. ~6 {/ S$ k. X9 Aend |
最佳答案
查看完整内容
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,其它按你的 ...
|