|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢% {5 L; l% ]( M/ x {# c
' C4 X+ D4 p: I6 D1 P( w
我的问题是,在每个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中的数值,不知道会不会有什么不妥。+ W P$ P; q( R9 a
+ q8 f/ W0 d/ H# [5 W: b& e5 |. S- _
begin P_read arriving
6 g2 t) O1 }1 }: v0 x6 p0 q4 T' h4 J while 1=1 do begin
3 d4 z7 R6 T$ c( A read A_tote from "data.txt" with delimiter "\n": R! A N2 t; L2 c
read A_time from "data.txt" with delimiter "\n"4 g: y' u) a7 W* N" W
read A_leave from "data.txt" with delimiter "\n"8 I* L% i9 ^. B. h, C- S
read A_picks from "data.txt" with delimiter "\n"4 ]* s5 n. I, L$ s2 o. ?" x
set load type to A_tote
# V, T7 F* c$ K/ {' b) m5 }, H% ~ if A_tote="tote 1" then set A_induct to 1* L/ m* [& B& S7 L
else if A_tote="tote 2" then set A_induct to 29 m$ ]+ @/ E0 e5 t. r
else set A_induct to 3 7 v$ Y9 V" p7 t }2 W
set A_i to 0
( r2 C% l/ R$ e8 Y clone 1 load to P_induction8 v9 B% S0 o5 h* F& f
wait for A_time sec
4 I( g* i) W; T* {2 T& N end6 _) }4 _5 q9 W% d; Y
end, |8 A) F: p; h3 B) D' G
" N& f& |2 W B/ ~# q
begin P_induction arriving8 [1 i) N, F/ q& I! [
if A_induct=1 then clone 1 load to P_pick1
3 D6 k t) M3 D, ^- R- c) e+ r# y+ E else if A_induct=2 then clone 1 load to P_pick2, F' c3 [ E9 j9 [; P, v5 b
else clone 1 load to P_pick3
% Y$ W0 |/ G+ H- Z8 a8 U4 Kend
0 ~: F+ n! y6 C$ H8 v1 Z7 K1 U$ [
$ W( m3 j+ j/ v& |! k7 g- W1 ebegin P_pick1 arriving' x F! p' |+ G
set A_i to 1
0 V$ [5 |. G9 t1 O: g move into Q_induct1
$ H( h4 x8 c! R5 W B2 R move into pickaisle.induct1% ~) i3 K D& m, n9 u
while A_i<=30 do begin# x# t& H4 h ~8 L
travel to pickaisle.con(A_i)
7 w7 o( q1 g% M; P if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
% C' q$ m1 @+ P Z+ Q6 W else wait for 10 sec( m( r, l. S% ]' Q/ ]/ m6 M5 a
if A_i=A_leave then send to die o' h) b4 r" T* A( v( ]
else inc A_i by 1
! N% }+ ~" l6 A" _( w- }, o end$ k# }8 y+ g% l5 \, _8 w
end
( r" }1 g. k' T4 d& U! j! d( d( p8 |7 R& q
begin P_pick2 arriving* y8 M' o4 u. J% D0 H+ E
set A_i to 11
$ v7 w. G" \ ~% k; J. g" p/ S move into Q_induct2
. H+ @1 Z' H6 Z$ v1 g# C move into pickaisle.induct2' ^4 M$ x/ T) `2 S1 K5 u
while A_i<=30 do begin
* G) l/ Q; }8 Z* g travel to pickaisle.con(A_i)5 [* m: E. r# W9 v& _" _( d6 S; O' A
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
# k" B5 I1 M' y- } Y& H else wait for 10 sec
5 K+ [$ c, s% b, A: G if A_i=A_leave then send to die
: u5 g# S5 u6 A5 I9 v else inc A_i by 10 Z' _; F+ K: N; z- S* y
end
. r: O; s3 Y. ?; x( H" S& hend
4 a- M% h r- U. M) r7 y C( Y; H( @
begin P_pick3 arriving2 ]# K% r. ?- w5 r/ X
set A_i to 21
! R9 G2 A4 i; k% {2 I move into Q_induct31 F# ?& y3 v- T0 w
move into pickaisle.induct3$ k1 G. L/ F% _0 c' c B+ x. }
while A_i<=30 do begin* p0 B7 b: q! O Q! `
travel to pickaisle.con(A_i)$ H/ C0 D2 L N- T4 V1 Y4 Q
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
, u# n- V, q$ N8 y( q& B# d else wait for 10 sec
' W6 A2 @5 B, g) v% _ if A_i=A_leave then send to die; n/ T- X4 {5 r
else inc A_i by 1
( i, a" ~( c2 C& i! f3 m end2 S$ G. [5 Q6 Y1 B/ C
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,其它按你的 ...
|