|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢7 J; Y x' C1 x- ]' ?" `7 c
. n Z1 J# D6 x* Y0 \我的问题是,在每个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中的数值,不知道会不会有什么不妥。
( }5 L5 y2 N' s2 o b1 h- Z7 b
* m. l5 W5 @2 X2 g+ Ibegin P_read arriving
9 x4 A; L7 U7 s5 D' N4 b! _! [+ g while 1=1 do begin
& u, Y6 T- j' u/ g* T' \% y read A_tote from "data.txt" with delimiter "\n"
! d# n) p2 u0 k* s! m2 y read A_time from "data.txt" with delimiter "\n"9 g ]1 _$ Z: L0 w! M. I/ T
read A_leave from "data.txt" with delimiter "\n"4 r7 G4 G0 V2 U# O" {
read A_picks from "data.txt" with delimiter "\n"$ G1 k- [4 A0 o0 K
set load type to A_tote
5 Q8 y) e( @6 A/ ]. t- o } if A_tote="tote 1" then set A_induct to 1
0 ~4 \2 C( \! X* G else if A_tote="tote 2" then set A_induct to 28 S* e$ a* H! Z* j6 Z8 ]
else set A_induct to 3 6 { p u! m# w2 u; p
set A_i to 0
V' s9 P2 f! y2 l clone 1 load to P_induction, l9 |/ y# E$ f8 N8 l
wait for A_time sec8 T9 k! P* G/ ]$ Q( {8 L. {% c
end# A0 N4 ?. x1 N8 a3 B
end; G: b' i0 y/ K! I9 | Y' k+ V
% l! d# o8 \: ]& P" W1 r2 ebegin P_induction arriving
, f) s+ ?+ |' ~/ x. W if A_induct=1 then clone 1 load to P_pick1
; l- X. E# r, x4 C6 F else if A_induct=2 then clone 1 load to P_pick2& s/ v& T9 k& z& L3 ^8 c. O5 w
else clone 1 load to P_pick3
& `& m5 [# b/ w( r `6 Z* B/ D! ?end6 F4 v3 H I. x1 A, A/ J
0 T7 b2 f% ^! @begin P_pick1 arriving! C! n$ B% v" p* `, f$ w2 G
set A_i to 1
$ b" R F' B. c% C. N: l- j: } move into Q_induct1& p1 F) F* [" J( M6 q$ H9 b# o
move into pickaisle.induct1
2 b( `8 |. v1 U. P4 r* T. Z) H. l while A_i<=30 do begin3 T# R9 M6 b: e& W* p% ]
travel to pickaisle.con(A_i)" ?' _3 P7 Z: ]! S5 |8 {! O
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
, i# k$ @+ J8 G, _$ _ else wait for 10 sec
8 V9 E9 K& N) D5 v- H/ {" u. V if A_i=A_leave then send to die$ M+ t6 @1 `; _# t
else inc A_i by 17 `4 K9 a% N$ D! l, C3 w
end5 s3 O# ?- i- \/ I9 f
end1 t2 Q" x( k# [) |# p7 m* E
$ R$ B! U4 M; M
begin P_pick2 arriving
' u0 }# w$ Z+ a0 {0 `! [ set A_i to 11# y8 O6 `/ R7 q) ? G7 Y! z5 g
move into Q_induct2
0 {* `( U3 F# o" k! J% E move into pickaisle.induct2, M' l% W% n% z6 @" o
while A_i<=30 do begin5 g8 q8 R2 M. W
travel to pickaisle.con(A_i)
" U8 o8 o$ R4 Z& l5 m: B* ~ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec- @+ T9 g6 S6 _9 s
else wait for 10 sec5 q/ E# M; ^7 a5 M: l
if A_i=A_leave then send to die' h& l5 D! [) C" D
else inc A_i by 1
0 t* m5 |/ A( P) X, T) K* i. ?! u end
6 A9 T) L) n: Q3 Fend
, D0 x$ j! |7 m# g6 _# K* M" @2 a/ ^6 \9 }8 O
begin P_pick3 arriving
5 b6 T% k2 y+ n8 e: _' D+ R' { set A_i to 21( J, [7 G. A: r) C4 p" w
move into Q_induct32 B- ~) ] f" f$ @8 f
move into pickaisle.induct3
1 a2 s, i+ s: c6 `" W while A_i<=30 do begin3 R4 s5 @# I0 f! B
travel to pickaisle.con(A_i)6 }: N$ s8 z1 c8 }
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
0 N& v: V" m+ u. G# d9 e: S4 | else wait for 10 sec6 k" T3 z% t, {6 c7 |% n
if A_i=A_leave then send to die- H4 f' p( r& ]/ P- N( P
else inc A_i by 1# |( o5 g/ c- }% a9 H9 J& G
end; f& ]2 T# z4 e9 ?" {& X% O ~
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,其它按你的 ...
|