|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢' v( d% I$ H) I9 Z8 |* O% f
0 U e+ e3 {" X. J4 [$ B
我的问题是,在每个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中的数值,不知道会不会有什么不妥。( J2 X: K( m9 T( n4 X1 D4 Y$ h/ K
3 _! Y9 q1 ?# _& @) |9 o# Xbegin P_read arriving
- A1 O6 K* z; v% i' @8 a8 H* j5 ` while 1=1 do begin& }* S8 i" E! x8 T
read A_tote from "data.txt" with delimiter "\n"4 F4 `; n, s, ~% H E- f9 h5 d
read A_time from "data.txt" with delimiter "\n"# Z3 G! c6 M1 g3 D/ h6 r" K% o
read A_leave from "data.txt" with delimiter "\n"
% z% e/ s% ^5 h% H2 B read A_picks from "data.txt" with delimiter "\n"
6 R3 N, h) H+ C2 W, i) e! q set load type to A_tote
# P# _$ Q W0 \' |* x* [6 ]6 M if A_tote="tote 1" then set A_induct to 1
8 V; l& [) p# S% T- I; @; c else if A_tote="tote 2" then set A_induct to 2
/ k1 B+ Q- x, O1 h- V else set A_induct to 3 1 g; @- A: q2 _! ]
set A_i to 0) D( V' P: r5 n# U. i; r
clone 1 load to P_induction
/ N6 L- _2 z& f* K& ?% }9 c4 Z# x$ l wait for A_time sec
7 _7 w6 h+ A, B1 `& C- \ end$ U, y# u& C0 w9 n
end
6 G! }" c( ]2 ^: e) U( l6 E+ N: L, Q+ m* |
begin P_induction arriving' Y* N+ v) j9 A( X
if A_induct=1 then clone 1 load to P_pick1
9 k- I" p$ s0 d2 [' t& }2 o else if A_induct=2 then clone 1 load to P_pick2& L3 W3 R7 g& U3 o0 Z
else clone 1 load to P_pick3* ]5 T" N6 H2 A: g- y* z( v* Q
end. @. t7 \+ ` O4 y% I. l" Y
! Q' D# l3 d& B1 D9 Y1 J- i2 \begin P_pick1 arriving/ @( Z$ w2 V6 W; Z+ R
set A_i to 1, P- }4 N' ]1 g
move into Q_induct1
5 v$ H" x2 r U* Y/ @ move into pickaisle.induct1( k0 ], D4 j! J6 q2 {
while A_i<=30 do begin
( t: r9 `" x6 J travel to pickaisle.con(A_i)
' ?9 j6 n6 T7 B) u% W if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec9 K3 X5 v+ V* v8 i$ B
else wait for 10 sec/ z. [7 p/ M6 P( g' C
if A_i=A_leave then send to die. u0 ?. \8 ]9 ] M( J4 C, c3 @3 o
else inc A_i by 1
! ^. M- [6 ~6 a+ H2 } k* \. R end1 _: z0 p5 ^* s6 D/ A( e: d
end' I4 I4 ]4 @ w0 J$ ?5 _: U
6 F7 m. X6 Y9 T) z! E" o
begin P_pick2 arriving2 T; [! R6 V! d; g, ?
set A_i to 11) F' q: t, j% m; g9 k! q* Z
move into Q_induct2" p$ e* @! M& p$ B+ R- `2 j$ @
move into pickaisle.induct2
$ ~& A9 v7 ?; H while A_i<=30 do begin. i# ~) D8 ~+ q
travel to pickaisle.con(A_i)" {# d6 C1 s5 K6 O2 m
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec0 x0 f) }4 U! U2 @% d8 P2 u" _" I
else wait for 10 sec
; R8 }: V" _% G: x" b if A_i=A_leave then send to die
% Q( m9 Z- F& L) Q4 A else inc A_i by 1
7 j0 W" y; j" @0 K- I4 M end2 U$ }. y0 {/ d+ G! R* t$ G2 @' Z
end2 z7 ^& A$ X7 m
; A+ n f0 p2 [; |" ?0 Xbegin P_pick3 arriving% V2 b/ U- W2 @4 t8 J
set A_i to 21# E* B4 V6 S. \- o; E' Y
move into Q_induct36 h7 g& H G# v% @! F
move into pickaisle.induct3
; v1 s! P' D. |' p' _. w7 d while A_i<=30 do begin: r! W( Q& `$ o1 u+ K3 f% z* [! Z
travel to pickaisle.con(A_i)5 ]' Y7 `' n! ~4 ?1 _1 P( W
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec9 |* G5 t, i3 K6 M4 H
else wait for 10 sec
' D! P" R! e' f if A_i=A_leave then send to die+ U) m$ M/ }$ |1 t8 |
else inc A_i by 1
5 e6 R" y" l# z k9 P' B, e+ a end
. c& T v2 {# |/ M7 K* |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,其它按你的 ...
|