|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢0 g3 X' J4 P9 u8 u: F0 a
) T" }5 Q" g3 I2 @! D/ ^' z# L我的问题是,在每个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中的数值,不知道会不会有什么不妥。6 B3 _4 s* d1 Y
9 ~ j, p x5 ?+ e" D% U* m" n4 Xbegin P_read arriving( i6 q+ R) I% y9 V( P/ G) L0 E |
while 1=1 do begin
5 v- [& y9 x6 c0 X: |( y, D* w0 z read A_tote from "data.txt" with delimiter "\n"1 M* f6 s! x2 W! C" Y. @8 J0 `4 A h
read A_time from "data.txt" with delimiter "\n"
2 Q8 U2 [( t9 ?7 ~4 x: d read A_leave from "data.txt" with delimiter "\n"/ Y! N! N; j& F; R
read A_picks from "data.txt" with delimiter "\n"+ s% S6 M/ \7 q+ [" t
set load type to A_tote0 j" d6 S) q( @$ b
if A_tote="tote 1" then set A_induct to 1
# E# h4 f3 s! P3 w* f, o4 g else if A_tote="tote 2" then set A_induct to 2; `" G) V: z' E1 D! D. D: j0 ]
else set A_induct to 3
* e& b, v2 w0 [# m8 ^% @5 k/ } set A_i to 08 a6 O( d: [% A( G) q. N: [2 s7 x: e
clone 1 load to P_induction
3 n* r1 @3 v: r' A wait for A_time sec( V# x" ^# I* L }7 j% S9 B9 Y
end4 D/ z- q) ?9 @/ N- D& x/ s% {5 m. l, i
end
+ z. l2 U y, E9 g! \
/ I4 m$ ]8 [; T" i6 z9 I3 nbegin P_induction arriving
. x; ?. G7 j( G6 U2 X: U if A_induct=1 then clone 1 load to P_pick1# W \; m2 X( V0 S% F$ o) f- W
else if A_induct=2 then clone 1 load to P_pick2# d6 u; `, E$ h! I! D U2 `
else clone 1 load to P_pick3
# i' L( L9 |, f$ D* D# Y7 Y8 rend
% X: N! ?1 A4 j9 n" c- ]: c2 y+ I, H
begin P_pick1 arriving* O/ }; N" J, o) B- m( Q
set A_i to 1' W: D2 Z$ `" S3 E2 U
move into Q_induct1
, G! Y* k3 z6 J; W+ ] move into pickaisle.induct1$ V2 U! Q9 h8 C. R+ m
while A_i<=30 do begin1 Q, l7 i0 u2 W2 i5 ]1 p
travel to pickaisle.con(A_i)9 E; u; c! Y' ~" k3 ]. r6 w4 d9 j
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec, p1 } `6 B& P/ N# l
else wait for 10 sec7 g* e- ?6 |$ }' x
if A_i=A_leave then send to die+ u- G' Q% d2 O4 u
else inc A_i by 1
4 Q) d# M# F0 u' o# T5 U6 m! i end
, `7 V) @$ @, gend( G' H! o- F5 Q- K
, r$ w) t4 I4 |8 t( zbegin P_pick2 arriving2 A" J1 O8 P- @; |
set A_i to 116 J$ ~3 S v( D' U7 A/ a
move into Q_induct2
: Y0 k( l4 X3 e# W move into pickaisle.induct2( P: `; x0 x0 F/ k" I
while A_i<=30 do begin
2 g/ m; Y& U& t+ x$ ]7 X$ ] travel to pickaisle.con(A_i)
: F- Y8 \7 v# S8 D4 ~* W+ T if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
5 c& f7 {4 X) U+ F7 a2 v& x/ Q else wait for 10 sec
8 ?1 U' ` }' ]) d: A if A_i=A_leave then send to die
[& S6 ~) ^; a0 Y else inc A_i by 1" H) T6 A& {1 |1 c
end! ^6 S& n* p& v" y& \/ I
end
" n1 P' I$ T- S; P* j7 @+ Y7 J& _, l, m# u8 v( w
begin P_pick3 arriving! h& W& A: ~: }$ L. N
set A_i to 21
2 q6 k5 U3 w- S# ^; S/ g move into Q_induct33 _$ `, [9 F5 i9 h! e$ L4 X
move into pickaisle.induct3
4 s. M! ~( n% n- B" i while A_i<=30 do begin
1 K$ j) T1 A% ^# V. K4 T8 m travel to pickaisle.con(A_i)
2 Q i4 Q5 t" }7 t1 L% ~& p if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec* q) O! q) B, C. \
else wait for 10 sec
" H9 I# Y$ T8 l \ if A_i=A_leave then send to die& H- j B7 _ o# ~! e
else inc A_i by 1
& h: Q9 d7 R/ \) e/ g end: A1 R' l8 N% t+ }/ h( Q
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,其它按你的 ...
|