|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢; I# m3 p# z9 [8 i8 P3 G
8 m P A7 N" f: U5 I7 U, p% C
我的问题是,在每个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中的数值,不知道会不会有什么不妥。+ \+ h( M- E$ {# l! y1 d) U( _
' \: ?3 U8 n9 p' E gbegin P_read arriving
0 X: B* x+ h9 C6 } while 1=1 do begin2 M7 }# l* b, E4 j! x: P2 I
read A_tote from "data.txt" with delimiter "\n"
s: I' @- K' t- l1 r read A_time from "data.txt" with delimiter "\n"1 R @- M' Z* `# r. L/ @+ J
read A_leave from "data.txt" with delimiter "\n"; x, D8 u# [ M. O
read A_picks from "data.txt" with delimiter "\n"7 I- v' |- s6 k3 p! Z0 w
set load type to A_tote' a, h1 B7 g5 E" \9 y
if A_tote="tote 1" then set A_induct to 1 v. B4 e* ^% ]$ x
else if A_tote="tote 2" then set A_induct to 2) z" @$ u# l0 b3 [$ G# P
else set A_induct to 3 6 | p& c8 d' w; Q* `# d
set A_i to 0
4 @" r+ M* c+ y6 |% {1 ?$ Q clone 1 load to P_induction, Q, u/ J) \, B
wait for A_time sec
' u+ y0 f9 E6 ~1 {4 p* _1 V end6 r0 O( `1 D( F! g1 q! v( q/ |
end0 |, E4 n% |* B
/ W$ t8 w5 x% D9 p
begin P_induction arriving
/ \- y5 E- \* w2 z3 e B5 O* V( j if A_induct=1 then clone 1 load to P_pick1
( e& X3 f3 e: G# W' Z else if A_induct=2 then clone 1 load to P_pick2
2 x7 m7 X) b6 P$ `. A% X G- N9 G else clone 1 load to P_pick3& j; ^! ?5 F) S9 ^( A7 }! t
end
( ]; h9 w" P3 x; n; L" x1 l: k, `
" Q: c' q$ I! i; ?# O" e* }) \+ l- cbegin P_pick1 arriving1 U' k/ Y8 e$ h; O3 u
set A_i to 1
1 t5 H1 Q+ a+ x move into Q_induct19 N4 F+ I7 e3 g0 a7 P- f2 [+ p7 D
move into pickaisle.induct1& N7 L, E3 C# v) P. a2 C
while A_i<=30 do begin! T$ p, p) _2 Y' S
travel to pickaisle.con(A_i)
$ }0 |4 I0 ]/ \; H( X3 z p if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
2 T, ?8 X5 }1 |/ Y0 j else wait for 10 sec7 x1 i: a, Z; z, G9 t* M4 [
if A_i=A_leave then send to die
; s, h6 A: F) v- t else inc A_i by 1
7 D" Q+ \: P) ~! N6 V; R end: g/ a6 H+ G) s0 {
end T' z4 }9 P K. d5 |6 X- X% u
& K( ?5 [/ p' O9 b
begin P_pick2 arriving
# O. X9 \! s& P! S4 M( \ set A_i to 11
; [* S* L& C# | move into Q_induct2/ j* G( n7 W& l1 K; S; H
move into pickaisle.induct2: @9 [* A" V3 Z3 z0 F& p. H
while A_i<=30 do begin" v: M1 `- ~7 J6 S
travel to pickaisle.con(A_i)
. ?3 A; |5 E- Q( Q if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec- [5 T) Q& ?& P) q# j
else wait for 10 sec
2 h6 I9 H) @6 t3 G* A3 t6 t4 y9 l if A_i=A_leave then send to die
4 g3 t$ u2 E w& G! [5 D else inc A_i by 1
; H/ D( q& [% b2 } end* e3 j3 z* A& M
end
+ Y2 \3 R5 G% M8 w, {3 o
! |7 [3 s9 s: Cbegin P_pick3 arriving( i7 M ]9 G) x2 L% Q. \6 |% c( ^
set A_i to 21
9 s4 t. d+ T5 E3 O move into Q_induct3
. n# C; w o' G move into pickaisle.induct3
0 A5 B* ?+ N) p3 P* L5 I5 e while A_i<=30 do begin
- C9 z( O9 l9 t& L4 d! g5 w travel to pickaisle.con(A_i)
: Z0 i* h1 s2 K8 F if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
) p, x: Q' [4 @ else wait for 10 sec
7 V7 a# h' q$ \* {1 U* z/ n) e2 ` if A_i=A_leave then send to die
5 }2 N, U, g* {$ f0 p) F. H: V( e else inc A_i by 1& z6 q6 ^% w# X$ Y
end: W/ ^. r z# |
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,其它按你的 ...
|