|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢& O5 x7 y, G8 {) J
2 Y' Z0 _6 }' b3 d- y5 `& K
我的问题是,在每个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中的数值,不知道会不会有什么不妥。* r( V) |( r- ] H( ]( o) }6 U
% |2 ^* X: ]/ S* I9 Z- o
begin P_read arriving% d6 T; u* v+ t5 H
while 1=1 do begin2 } u3 i! k0 G* T& n
read A_tote from "data.txt" with delimiter "\n"
B8 b5 c3 h0 V/ U$ W% G7 s read A_time from "data.txt" with delimiter "\n"6 p4 v- z: E* b+ Z5 p7 c
read A_leave from "data.txt" with delimiter "\n". h! @* L" G+ g/ n; Q4 c/ }, e, A
read A_picks from "data.txt" with delimiter "\n": w- P4 v: D" A! X% P% z
set load type to A_tote, v1 P- Z6 D9 ~1 q
if A_tote="tote 1" then set A_induct to 19 l5 u( Z+ \% U. B# C' r- }
else if A_tote="tote 2" then set A_induct to 2
4 U. ?/ t/ H; S8 p* R else set A_induct to 3 ; X! i! ]6 e: d8 J u
set A_i to 0
0 C, Q) z% N8 V& P+ q5 o+ h! ~ clone 1 load to P_induction6 t9 k' z. M% F( |# p
wait for A_time sec
$ M( [) a0 e U4 x4 f5 {) i end6 l' l# X9 k, E S8 P6 v( ]
end
" n% `4 t3 d* M& F/ ]
1 R; f0 |8 S( A: Cbegin P_induction arriving
# B- k+ h6 B& `" [; R/ @# a if A_induct=1 then clone 1 load to P_pick1
9 u# Q9 i' m- X% _ else if A_induct=2 then clone 1 load to P_pick2
3 k7 v' ^' R$ O3 p) n; ~ else clone 1 load to P_pick3
x! n4 L3 B3 K }( P+ H' `end9 V! g1 W/ D3 X/ [" f
: T# J, n4 Q* @1 I
begin P_pick1 arriving
5 ?8 \1 n/ H: F# T5 r set A_i to 12 b5 O( Z5 \5 f& p9 A
move into Q_induct15 D5 y7 m% S4 N/ ~5 D
move into pickaisle.induct1
; Y* L) ?% ~1 Q* _- ~' s while A_i<=30 do begin# {& p5 `; I- X9 s% F& n, d0 L
travel to pickaisle.con(A_i)* K% s5 ?& z; ^ F" ]5 m
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
" N, _3 f1 `) A H; C( a) h4 k8 i else wait for 10 sec2 R- \. H6 H# ]% ^
if A_i=A_leave then send to die+ s( W7 n$ M" I* Y L
else inc A_i by 1 o& z; p/ S" u: A
end
+ L! d2 u/ ^9 R9 Z$ Jend3 y M$ s; H* I6 E5 N" m
1 }: Z7 B9 K& f
begin P_pick2 arriving
$ e* D2 O# W& R! \5 H set A_i to 110 K$ j+ K4 V* u" C7 L6 D7 t* J
move into Q_induct2, x3 r! g0 J5 |5 H8 G0 l
move into pickaisle.induct2" |3 O& A( L% h5 r$ ]
while A_i<=30 do begin8 q2 m/ P s- q; o U
travel to pickaisle.con(A_i)
: U) `6 H7 p8 ]! ` C% C if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
! F! M5 t$ Y: R1 l4 o8 @- k4 E else wait for 10 sec
, l8 [* ?- J J* ?* L' [* D if A_i=A_leave then send to die
{6 Q8 Y! X, S3 _ [. s0 X else inc A_i by 14 Q' _- Y* R% k8 a, j
end
" g& R9 t" J+ r" R, vend
( I5 m% [5 e# I2 k
4 u/ N( k4 r* i8 Y2 M& h# @begin P_pick3 arriving
+ b7 ~! J9 T9 O( p4 p set A_i to 211 Y3 P ]9 q8 x: d
move into Q_induct3
1 @2 `3 I* ?% [( x move into pickaisle.induct3; i! g/ ]% y- Q+ b" ~
while A_i<=30 do begin
# N% ?/ G1 V% K; T/ C3 N travel to pickaisle.con(A_i)1 ?+ W( b$ x. P$ x- S
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec! g5 j0 ]- [3 x P- D; L! V9 e
else wait for 10 sec
1 H% U1 M5 G: g* f% j; ]3 W2 { if A_i=A_leave then send to die
" w* G9 x+ t6 D, W else inc A_i by 1+ `1 F% {" T x
end
* `( V' Q l2 x" W3 T+ ~0 X% Lend |
最佳答案
查看完整内容
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,其它按你的 ...
|