|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢/ a0 i4 ~: R( E: Z( i
; O: S3 o. j4 n% _! \/ M8 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中的数值,不知道会不会有什么不妥。
3 t/ {& Y0 P% }' i% A7 h; R/ q$ Q0 \: w/ U
begin P_read arriving
8 J( e* E* R1 W. R% i/ R while 1=1 do begin
6 e6 f' x/ f/ K8 `$ J" z+ k) h read A_tote from "data.txt" with delimiter "\n"
+ N& v( |& }2 j read A_time from "data.txt" with delimiter "\n"2 m z$ o' M4 E" b& [, ~2 U
read A_leave from "data.txt" with delimiter "\n"/ x$ Q# h2 f( b3 O" r% s
read A_picks from "data.txt" with delimiter "\n"
; m( J' G$ j. n; C5 e& v# s- u set load type to A_tote
Q' p8 M( S0 q# `! O4 I if A_tote="tote 1" then set A_induct to 1
( B% k* P1 W1 |# L3 M0 z else if A_tote="tote 2" then set A_induct to 2
( \3 S: N/ b- p& Q1 p' H$ f else set A_induct to 3
2 B D- i& P( [. S! D' N5 r/ Q set A_i to 0/ {2 F \0 f W" r
clone 1 load to P_induction, g+ i5 }) V0 i
wait for A_time sec
7 I7 ~7 z& D& k end
. P& _+ a8 k. wend7 k- ?1 `, d$ V) j
6 _: b& n' N+ z- l7 Q& Ibegin P_induction arriving8 u- X; j% J G- r7 [# x0 X; y
if A_induct=1 then clone 1 load to P_pick1
- \$ ^9 r" K) ? else if A_induct=2 then clone 1 load to P_pick24 }- v+ }& T: W5 n
else clone 1 load to P_pick38 W+ w* W2 X% l/ |; w L
end
{- @8 b& J' C8 w. s5 ?# H2 j; c
, a7 w( g4 k' k; ] M5 p) u# i& mbegin P_pick1 arriving& x9 }7 A! V5 k0 {# @$ Q# D$ I
set A_i to 1. H7 I- g, L$ ~- [
move into Q_induct1 C7 ~0 H2 y5 W3 Q' n1 ]
move into pickaisle.induct1& @" ~& H7 h9 f6 a& a8 U: k7 ^
while A_i<=30 do begin
! E& @2 v3 }. ]8 T travel to pickaisle.con(A_i)
! Z2 P9 z& `6 H' i/ q if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
5 B2 j o4 o: f! \ else wait for 10 sec
) X3 O* |8 x: I& [$ F6 _: f if A_i=A_leave then send to die
; E \* u( J! t9 j' g8 ` else inc A_i by 1
6 p) i, M* Q2 ~6 }" z+ { end
& C/ s; J8 t) c& }1 o) wend( y% m- o- A- `. B
_/ r. g4 b0 h/ J$ e, kbegin P_pick2 arriving
' D$ G9 e7 q+ Z9 y4 F2 K) { set A_i to 11
7 @3 G* d& X6 B; x- `, D ?$ ] move into Q_induct2% Y! m& k0 h0 `" v
move into pickaisle.induct29 X8 ]! x$ ^: f& o
while A_i<=30 do begin
7 T8 H7 J* X/ T0 Z, [- Q! P travel to pickaisle.con(A_i)3 k9 F+ S6 u4 Z/ h: F
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
% J6 l3 m i. N* ~ else wait for 10 sec' o) c @0 X+ g9 _% X1 V& Q
if A_i=A_leave then send to die. ]/ e! z! ^: m p7 O
else inc A_i by 1
3 o( V" u* I" \" P6 [2 H end0 a, x# L4 Y4 n" `2 g0 ~3 ^
end) h1 v, a5 g; i4 E! d
9 O* b7 {; Z+ s2 m" x; p8 S
begin P_pick3 arriving
$ J& r2 ^. K; x set A_i to 21
9 y: R z' @ l5 ^/ X2 ^+ y6 D# S move into Q_induct3
- l6 L7 j0 ~. ?1 M8 \% ^ move into pickaisle.induct3
$ E9 B5 C8 Z5 k, Q. k while A_i<=30 do begin9 v5 ]' M7 n. l, F) d* r
travel to pickaisle.con(A_i)+ @+ j" a! k$ N5 V, f4 L; G
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
) A% k) w! ~8 e/ w. i# P4 P( v) b else wait for 10 sec
7 W& B3 j H" B# ? if A_i=A_leave then send to die
2 q* x+ D5 J5 I else inc A_i by 1
% Q9 F9 v8 y. t! t3 l end6 s) B/ S5 _! j1 [& D9 T
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,其它按你的 ...
|