|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢' c2 R' y% _; }# h
' h/ k7 v8 E+ G$ f
我的问题是,在每个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中的数值,不知道会不会有什么不妥。4 |$ N+ C" h& ~- ~) C! C/ B* p7 q) @
- A2 q+ D0 K: F9 l& x0 G! A
begin P_read arriving
( A- e. }; }) T- \* N+ V while 1=1 do begin8 N7 y; c U3 ]9 E. X
read A_tote from "data.txt" with delimiter "\n"9 f+ r- p, C0 B. n. K
read A_time from "data.txt" with delimiter "\n"
3 l3 L% e! B Z" n9 q4 W N* c read A_leave from "data.txt" with delimiter "\n"# `% u4 V' M: q1 T+ R$ |
read A_picks from "data.txt" with delimiter "\n"
' Y2 ]; ]! Q1 B: s- t0 A8 [ set load type to A_tote; s; L; f/ }. {8 k
if A_tote="tote 1" then set A_induct to 1
' L9 e) N( A/ x7 n% G# v; R* U else if A_tote="tote 2" then set A_induct to 2
+ Y8 M7 ~: |7 q# x else set A_induct to 3 ; ?2 v+ b d M3 t
set A_i to 05 M S2 ?9 ?3 ^0 f8 l: |/ t
clone 1 load to P_induction H L! U6 I! z
wait for A_time sec
! _3 D7 e% B7 ]- g end
8 d0 Y3 m5 b, r2 @' Cend
4 r& M& F& A3 t [) d5 T
6 T; d' a m) N% ebegin P_induction arriving9 I9 ?0 G$ O4 X
if A_induct=1 then clone 1 load to P_pick1! @" P" W+ w0 W# g4 M
else if A_induct=2 then clone 1 load to P_pick2
/ s" z/ C6 t& ^$ q, ~" M else clone 1 load to P_pick3
9 f7 W9 z0 z) v& |end
{7 o. k4 H. O+ b, y1 m6 l1 w6 {6 E
begin P_pick1 arriving* ^" Z" X; s; ] e$ z- y3 T
set A_i to 1
9 L' u# T7 p$ _8 X move into Q_induct1: n4 T% q; O# Q; E- H
move into pickaisle.induct1% h( n, e8 @4 M0 Z. T8 ]+ v! @
while A_i<=30 do begin6 n! @* D9 C! x, b- ~
travel to pickaisle.con(A_i): R( f, p! \+ f( V. T5 ~" h
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec+ Z! c# U9 \* D; M
else wait for 10 sec( t( Q+ v4 ~3 q
if A_i=A_leave then send to die9 O n: }3 A' V4 E$ [
else inc A_i by 1
, s6 V' ]9 Q+ p end
% D6 Q- F- Z: r' X1 Nend
9 F4 B7 p6 t1 u% R" w3 `" P H+ _* {4 ~
begin P_pick2 arriving
5 f( j( P1 q& O% s set A_i to 11' [; S6 S' N& Y
move into Q_induct2
$ ]& G1 {: l4 p5 i move into pickaisle.induct2! `6 \6 a5 X+ l7 A2 q. O9 G
while A_i<=30 do begin
( a; @, ^2 }1 B" I, K$ S' ^ H* d travel to pickaisle.con(A_i)
& h. s5 C# p3 Q) P if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec) u6 L' F1 q+ f! K( n p
else wait for 10 sec
9 E5 B7 z9 S z) `: X6 l if A_i=A_leave then send to die
- S! T7 M, c T( g" U else inc A_i by 1
' T3 P6 A3 B$ {" B* U+ c/ o end
0 R3 I# Q! r, aend# w* x3 E$ \1 U
- c, B8 [! q6 I( w8 tbegin P_pick3 arriving I+ A% J f! T) E* t0 v! z
set A_i to 21
5 [' n8 S3 Q& ~) s move into Q_induct3$ }$ f' E8 l Y: S
move into pickaisle.induct3
4 n5 @! I+ R' s( w while A_i<=30 do begin
) |) e" a6 m' ] travel to pickaisle.con(A_i); K7 Q+ z4 V' @5 X0 a4 o9 {: S
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
2 _: G/ m ~- _6 u+ ]; z else wait for 10 sec
3 S9 m# l3 l6 n, N5 ]8 }- C( i3 J if A_i=A_leave then send to die
! s* L: a {8 B" a else inc A_i by 1
; g* h6 @) o, @3 ?' f2 B5 x) [ end
% ]' r8 D# E0 Nend |
最佳答案
查看完整内容
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,其它按你的 ...
|