|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢7 F3 p# `8 m b( W! d
2 c. a/ L' w+ D我的问题是,在每个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中的数值,不知道会不会有什么不妥。9 t% @8 z: _0 M/ t7 A
* k0 w1 `, H2 Z+ b4 Nbegin P_read arriving
7 { `+ K' Y D1 u& W while 1=1 do begin9 T/ P$ [" n8 u% A3 t! M+ J" c
read A_tote from "data.txt" with delimiter "\n"
/ o+ k1 E; N. z: @; E read A_time from "data.txt" with delimiter "\n"8 X C8 x) E. o* c! k, @
read A_leave from "data.txt" with delimiter "\n"" S9 C6 ]' d# R) ~0 N3 Y1 o8 i
read A_picks from "data.txt" with delimiter "\n"
; M6 @' g5 y+ w* M set load type to A_tote
: r+ @3 ]- J+ e" q* K4 q if A_tote="tote 1" then set A_induct to 11 f& A$ a6 Q8 N' M3 v
else if A_tote="tote 2" then set A_induct to 2
! ]. K5 x6 U: B, r else set A_induct to 3 $ c0 q+ H6 F9 v7 S+ j
set A_i to 06 U8 ^3 v& N. r
clone 1 load to P_induction
0 R( |5 h: a2 S$ _; k wait for A_time sec
9 O9 V8 g% E( j$ \3 v' m4 L end
* l* x: j& S4 r* c- u0 w Cend2 ]" O' A* m' C E' B d
3 X+ Z/ {/ n' g; W' Z$ s
begin P_induction arriving) X% Z, C2 G7 A H6 j
if A_induct=1 then clone 1 load to P_pick1, g8 s* x& n8 J
else if A_induct=2 then clone 1 load to P_pick2/ R% {7 C v% w! q* T
else clone 1 load to P_pick34 j0 z3 K$ S6 G6 ?2 W% Y7 s
end1 X$ h- r! P* U) U9 f# s$ g) k: N
$ z4 h' ~1 V4 [& r* U: ?7 U* r
begin P_pick1 arriving. p/ h& G4 N, J1 A3 x
set A_i to 1
& O* n* [! ~$ W" n, Y% ~. d move into Q_induct1
# b. ~& _8 k3 R3 u* ?4 r move into pickaisle.induct15 E, a! w! @1 R# R
while A_i<=30 do begin
6 |! ?- R* C5 w+ g$ Q travel to pickaisle.con(A_i)9 P7 @. ^8 V( S u( }' H% Y ]
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
m; R1 I& E/ M+ [8 J0 T else wait for 10 sec2 }: H% f' m, A! P" z
if A_i=A_leave then send to die
% j; d* f! m+ P9 l; |; c else inc A_i by 1
* |8 z: a7 t3 v( q end
: c, o( Z8 [; a5 z1 k5 fend
/ t0 M: e, J* ]' f4 I' j# |2 R$ T' Y H3 V
begin P_pick2 arriving6 e% U- R, Q# t1 W. V
set A_i to 111 x, ~; ~. c% j7 v! Z+ ~$ _
move into Q_induct2! N! F% M, W# f7 x/ x
move into pickaisle.induct21 Y( g" N# X" B9 b( \, `
while A_i<=30 do begin
* C3 @8 b- O) ?7 b9 Y: R! P travel to pickaisle.con(A_i)
# l) U. z- Z5 }- C5 W$ D- V if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
9 J4 n( G: a* j4 } else wait for 10 sec' u6 w! G( s% G; x
if A_i=A_leave then send to die. s' r6 \2 [% }0 F$ M9 f
else inc A_i by 14 X4 Q, h: f7 F% x" |% h
end' [. s& [% X" U+ Q( |2 K
end% | `+ ~: s4 N) T& h ^2 a
: w. }' [$ l& ^) X! F( Y( F* b+ X
begin P_pick3 arriving, U# W! H5 _0 ]; R1 k
set A_i to 210 d. U* \9 y3 H* m# K3 R. ~0 a
move into Q_induct3
1 \# v a4 a- K3 d move into pickaisle.induct3
+ d1 i9 ^ A4 e* v0 q9 {; C6 j while A_i<=30 do begin" J6 [, T/ o3 ]
travel to pickaisle.con(A_i)* |! f D; a! ]9 b! c
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
( G7 j" f7 G6 Y- z; v7 R else wait for 10 sec
5 O5 w' k( t' y8 k if A_i=A_leave then send to die
: F: E% b3 Q$ ~/ a# }: g+ s+ K else inc A_i by 1
8 A: V& t. m1 }* c# t; i8 [3 C end
& s0 R* ~% X7 W, M, p+ uend |
最佳答案
查看完整内容
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,其它按你的 ...
|