|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢, `6 a! z- p a2 {
% q9 a. K# |: c3 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中的数值,不知道会不会有什么不妥。/ @" Y- u4 C' Y! _
) J/ g3 v; M+ z/ \begin P_read arriving
$ m$ z6 G# v7 C# g7 y6 ?8 e3 l while 1=1 do begin% k! T3 ] ^* R9 i
read A_tote from "data.txt" with delimiter "\n"& }: W! l B& p
read A_time from "data.txt" with delimiter "\n"
5 y' b6 Z- |7 K, F$ w4 x3 b9 { read A_leave from "data.txt" with delimiter "\n"
9 f9 m! E, S( g4 ~) W2 ~ U M, O$ @ read A_picks from "data.txt" with delimiter "\n"
" a4 {) W7 |/ I' K6 p+ N set load type to A_tote
1 q5 ^3 A1 ~: Y) ]# J if A_tote="tote 1" then set A_induct to 1# `5 l5 u7 A7 X! M: g. Q; @0 ^3 U- L
else if A_tote="tote 2" then set A_induct to 2 V9 A+ o# a" |
else set A_induct to 3
. B! v) N+ Z9 D' W( U1 Q/ l set A_i to 0
$ }1 w7 ~+ Q5 a. ?$ p4 w* l6 x clone 1 load to P_induction
/ L$ M1 _. Z7 R+ b wait for A_time sec2 {6 L6 P4 W! H) f9 M$ f9 ~' T& E/ n2 |
end2 ?6 ~' y2 s7 [5 W6 d
end6 F& j+ A3 v- }
9 k0 O/ b0 f$ x0 W0 {begin P_induction arriving
! `. r7 R2 Q5 W) k0 y- ]( r if A_induct=1 then clone 1 load to P_pick1
, g( I9 ~, w9 |6 l1 m else if A_induct=2 then clone 1 load to P_pick2" Z8 y, i( V& n; a0 m' D0 L
else clone 1 load to P_pick39 |& ^, A q* g4 T
end {2 k- n b q r# M$ p0 `
2 g5 N6 I( s& s0 }* i; Q
begin P_pick1 arriving' F8 F' k6 y& d0 \/ _. E. m% b
set A_i to 17 p- Z* b% c) c- A3 k
move into Q_induct1
+ @* e R- y2 z: q6 c( ^# A' y move into pickaisle.induct1 M) _; r0 |( k2 L# o
while A_i<=30 do begin
s9 V- l! x8 P$ h% p. t8 t travel to pickaisle.con(A_i)! W7 F E6 B* n8 M
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec1 W5 F! S- `* N# A" N( l
else wait for 10 sec
: q5 M7 t( H" E) v6 r% I J4 I; s if A_i=A_leave then send to die; W. r! E x: R
else inc A_i by 1
& c6 `2 a# N3 V1 @% S! g end
( c8 X, r4 N" \, Mend
# b! L) n! U$ T- p; u& ~& ^9 J: w/ O7 ?8 l6 r" z, ^" T* \- B, z
begin P_pick2 arriving: [' |: T x1 e, ?; C
set A_i to 11
! [- M0 _, o3 D: k6 c1 R- B( X move into Q_induct21 O! M: l7 p/ s, f: l0 {1 E
move into pickaisle.induct2
( S; B5 i+ C3 Y0 h3 `3 o while A_i<=30 do begin
1 g/ f1 ~8 j& }+ j0 G, k5 d travel to pickaisle.con(A_i)# `* S7 R% d% S7 K, R) R0 w* J, q
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
" O% J" Q' M, r" U! O else wait for 10 sec" u" E& Y/ C0 `8 d( \) q; Y8 g
if A_i=A_leave then send to die
! _2 e* S0 m: T1 l" q$ t else inc A_i by 1
G: s- x" a- [4 ?5 y: Z% U end
; R2 ~; z a, `: V- {4 t( bend) \8 ^8 v) A) S3 r3 ^
& z8 w6 S9 I- X' V& P
begin P_pick3 arriving# { p6 e- t: J+ e; L0 P- r
set A_i to 21
. \* ~ ?- X% I! k move into Q_induct3. Z6 n. z5 j/ z/ Q; p7 T9 f
move into pickaisle.induct3
# j4 f T5 y$ c4 U) U) M1 Q9 d- f while A_i<=30 do begin0 W& k$ a% x+ C. [7 u& w( M3 f
travel to pickaisle.con(A_i)
: L; [1 ]4 l3 n- r& b: l if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec2 L( ]0 x7 g0 g& t4 @: ~
else wait for 10 sec
9 L b# n; d" ?% L+ S+ ?4 a- B if A_i=A_leave then send to die
6 W, m* o' {0 G @ else inc A_i by 1/ I( z. e# w( g. e7 v3 N( [# e
end
0 n% p# u% v) r& [1 Z6 `+ ~6 ]$ pend |
最佳答案
查看完整内容
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,其它按你的 ...
|