|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢& H/ D$ O, z8 {& b
& D V: _. l/ i# ]我的问题是,在每个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中的数值,不知道会不会有什么不妥。, X9 p: S" m) f& D/ S
! P5 S/ A- C& i1 n% \& Ibegin P_read arriving
( L, c( g2 q( Q while 1=1 do begin
$ X' f6 |& D1 Y8 l read A_tote from "data.txt" with delimiter "\n"; l7 F4 g, i: p. N% l1 C4 T
read A_time from "data.txt" with delimiter "\n"; u* P0 c5 M' M6 C
read A_leave from "data.txt" with delimiter "\n"
2 t Y. c; q H: I) u6 N3 n read A_picks from "data.txt" with delimiter "\n", B9 }2 j7 Z6 j9 p- d6 ]
set load type to A_tote
7 I+ d$ j; ?7 f* Q if A_tote="tote 1" then set A_induct to 1
6 Q, [; p. d3 Q6 u) O% _ else if A_tote="tote 2" then set A_induct to 2
& \ F# v( T7 }' L- b( r6 E' F else set A_induct to 3 / D, K2 B1 B q4 c, D. i+ {
set A_i to 0
0 |% Z8 ?/ j r" V+ z% w6 w* c clone 1 load to P_induction; r, o+ e6 M: N5 ?2 h7 j2 d
wait for A_time sec! i, O* j8 ]- l+ g+ d- T+ k
end5 ]5 r$ K9 v' @) w3 j' L; E
end4 y( V2 R3 L m; ^$ ~+ F
# I: ^! @4 @ Q& C! o$ y, R+ i
begin P_induction arriving; q# x$ R6 P% r R) `
if A_induct=1 then clone 1 load to P_pick1( S- N" K6 r8 t9 b5 F
else if A_induct=2 then clone 1 load to P_pick21 ]; {+ E, v9 V% J" i$ _+ ^
else clone 1 load to P_pick3
8 B- h9 p4 W% y3 t4 K7 Bend
" n2 C o) R) V
* @# D9 y4 Y) }# o$ K; R+ z5 ?begin P_pick1 arriving$ U7 p5 d }! r5 a0 r+ [# G
set A_i to 1. m+ x' D: ~1 E
move into Q_induct1
1 B) U& i9 Q. `& \- d. U move into pickaisle.induct1- u" w& T3 U: u) P: b. H
while A_i<=30 do begin4 j% {& Y: c) ]+ {# J
travel to pickaisle.con(A_i)
5 ~0 C T ^; y: T5 b2 n if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
+ K t9 M0 z3 P' \# } else wait for 10 sec
* g9 q- d+ L* e if A_i=A_leave then send to die3 d- [$ a. g# q8 ?2 p8 N: n. }, h6 U
else inc A_i by 1
9 [) F2 T( J/ x; o# k% D9 ? end
9 G9 n; B! Y7 z; I: T: f/ ~6 q' Iend
6 n; Z, g/ N( L6 d- A3 h
; t7 e. T! }% {7 l3 h2 O h5 @. `begin P_pick2 arriving. d- [4 F0 u' |0 j
set A_i to 11; A4 U* p- b* [2 e/ x9 @
move into Q_induct26 U( d" I7 M& X4 M) h- M
move into pickaisle.induct23 Y# B) K. F6 C4 `/ N! @0 m9 t+ D
while A_i<=30 do begin
- f% m A' B" [) j; } travel to pickaisle.con(A_i)* p1 a: L$ ~5 w. {" A- [
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec# z$ _0 }: P* K# ?
else wait for 10 sec
5 }9 f+ l. c" {) P* o R if A_i=A_leave then send to die$ T; p% l4 `# s6 w! ?4 q1 f8 z" a. f
else inc A_i by 1
6 [* K1 J, v8 n) \2 j end
1 P8 ~2 t% C& Jend
2 m: H, |$ c( [ X! u1 ?! R% R
2 ~- [1 _9 h! ?begin P_pick3 arriving
$ F" y3 p0 j {6 T set A_i to 21
) j: P+ ]9 B E+ o move into Q_induct3
- J8 r8 l" o# S9 j& ]7 C6 }1 n move into pickaisle.induct3
6 J. G! s. R* c% C- ? while A_i<=30 do begin: g) q8 c: Q, V* s; f
travel to pickaisle.con(A_i)! B5 ^* q, I/ a9 F% S! ?# ^1 V
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
6 P& d/ W: Y. O: T' l else wait for 10 sec
6 h) M* H& t8 q if A_i=A_leave then send to die5 M* f6 m. c7 B) |8 K% l
else inc A_i by 1 \4 y. k0 H# {# @
end r8 Z, h0 h. Q9 ]/ w( ]; v4 g4 V
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,其它按你的 ...
|