|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢: V: a& G$ _, L6 M
, C# {! q: H S+ z
我的问题是,在每个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中的数值,不知道会不会有什么不妥。# W- v) \8 d3 ]
6 Y) a: _9 h* h+ X z+ t" qbegin P_read arriving
/ v, H: ~2 o5 ~ while 1=1 do begin7 z& y9 F& H* j0 B e
read A_tote from "data.txt" with delimiter "\n"
* B3 i8 V, g3 ]# z5 Q read A_time from "data.txt" with delimiter "\n"
. ~6 Z: I5 @' W0 L9 M5 f read A_leave from "data.txt" with delimiter "\n"6 u' p5 q# G6 C9 O
read A_picks from "data.txt" with delimiter "\n"
+ Y* o' k7 I- f" C3 f; M set load type to A_tote! {: y7 Z8 a* m( X5 ?5 H2 {
if A_tote="tote 1" then set A_induct to 10 P2 c+ o6 T* C/ I8 R
else if A_tote="tote 2" then set A_induct to 2
# } \4 t2 n! F" ^: x" q else set A_induct to 3
+ E W$ N' K- Q7 v% a0 b set A_i to 0/ K" r# |9 Y( o4 i8 F% k
clone 1 load to P_induction% H$ }. ]4 V9 T/ g* `& Q; i# C
wait for A_time sec
. r7 d8 {. b0 A end
, M: {# _6 W+ `' z9 P$ tend
* M, A& m, F8 P
3 P+ j- M& \' c2 J* Zbegin P_induction arriving
) L5 e1 @) S6 p if A_induct=1 then clone 1 load to P_pick1
2 c7 o* H) h& X/ f$ V% O( V4 s9 V else if A_induct=2 then clone 1 load to P_pick2# B9 u) @) ]- y9 w- C* C9 S
else clone 1 load to P_pick3, K1 S# l7 y: X! w# i
end
6 J. n9 H2 }) G
& u# c- `) T0 g) J( |2 a, Sbegin P_pick1 arriving( {( p3 I$ {/ D% k" U
set A_i to 1* U$ o( K1 O; T P5 P1 d
move into Q_induct15 p+ v+ ?$ W! r1 v
move into pickaisle.induct1
" u6 ~0 p% x/ Z1 M1 p while A_i<=30 do begin
5 u8 E4 B- Z1 f3 H' w, ~8 p4 u travel to pickaisle.con(A_i)
/ n% H/ N, p6 E$ N* d, Q- {4 ^ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec3 y1 \/ B& b* }8 p- x
else wait for 10 sec
0 @6 z* l) Q3 y0 w5 s9 K2 T if A_i=A_leave then send to die, @) j# X" a$ `3 m) G0 t+ V1 V6 T" d
else inc A_i by 1' ]" [/ Y6 F/ ]' c
end
$ C% j' C. F tend
2 E. S8 V4 @, O* |
: N- `, ~* D& v/ m# Ubegin P_pick2 arriving J( Z) O: [+ ]0 g7 o
set A_i to 11* r7 V8 J4 s6 O H6 K6 E
move into Q_induct2
$ {, e3 R* e2 [# B- a move into pickaisle.induct2, P( \/ `# g8 M- u5 P
while A_i<=30 do begin
( M3 y! v; M- T0 z8 j x8 ? travel to pickaisle.con(A_i)1 I3 N$ [$ i7 K/ [" R0 I, u- B
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
4 t: Y% G6 k! h+ o& |( W else wait for 10 sec
* {, I; x/ Y& W/ W if A_i=A_leave then send to die$ Q/ U; E: l# b5 U: z3 Q3 \8 Y9 \
else inc A_i by 1
: P4 Z& W* d7 z2 z end- f% d% Z( n# \; g) E2 M
end
: N6 }4 J) c3 H" r5 a2 _
: H$ y7 G: a2 [! i, J9 ?begin P_pick3 arriving
E6 C w9 H" r) |: A) u set A_i to 21 V2 n( D: O2 G8 \
move into Q_induct3
| _% w1 T- K, W# {4 U( M5 i* k move into pickaisle.induct3
2 V. A( Z1 D8 @' E5 k while A_i<=30 do begin
9 g# J& w( Z+ F' S4 f4 E travel to pickaisle.con(A_i) p* c. C3 \/ [5 Z
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ Y" @* ]7 p" G$ N3 I# X else wait for 10 sec
# U" m! b( m# X5 N) g$ b W if A_i=A_leave then send to die2 k( h' j/ g! r& b! A4 }% @
else inc A_i by 1
, f/ t9 m+ q# ]1 u/ `* D+ v& a end
& q# h. N6 g, I$ Dend |
最佳答案
查看完整内容
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,其它按你的 ...
|