|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢0 z" [# o4 K- R
$ l7 h7 a8 h8 q! f# O$ r7 N% H我的问题是,在每个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中的数值,不知道会不会有什么不妥。/ L. p! a$ ]( E+ F2 [& m; Z9 c# e8 ]
/ b7 r0 ~( S9 x$ }begin P_read arriving& v/ x( ?8 o5 H0 \
while 1=1 do begin
7 o; E% I$ z0 C! v& p% V) @% P8 A read A_tote from "data.txt" with delimiter "\n"/ R1 T) ?+ q- U/ }3 E5 M1 c
read A_time from "data.txt" with delimiter "\n"
9 n( A6 g- O8 u; E# R! i; } read A_leave from "data.txt" with delimiter "\n"8 x1 L2 D" Q+ P. u, B7 ~
read A_picks from "data.txt" with delimiter "\n"3 G0 a9 s* p+ R
set load type to A_tote, O$ d1 h. Z/ }5 ]0 ~
if A_tote="tote 1" then set A_induct to 1
/ |/ G4 j& e0 ]% Z0 Y2 z else if A_tote="tote 2" then set A_induct to 2
, |. m! V9 H' U* v ?1 S! {1 ] else set A_induct to 3
& J! W& M8 s t V8 t set A_i to 0 [: |/ b; Y* [0 c' a
clone 1 load to P_induction
" c; }7 B& m( O. o4 Q7 H$ [ wait for A_time sec
$ p9 S! ?( z/ T1 ~( z7 i end6 k' x+ | |, r5 ^: _0 ~5 R
end; c0 d0 N4 U7 R( B2 n
" q# I( e' {8 _, w4 W4 [. ~begin P_induction arriving
0 V- ^ D% O9 c S2 f2 T if A_induct=1 then clone 1 load to P_pick1
' j+ w, t9 b$ m( t else if A_induct=2 then clone 1 load to P_pick25 T6 L- k7 C, H) u2 O) ^
else clone 1 load to P_pick3
4 f, Q7 [! h+ _6 ^0 fend# v% U: X6 L9 i3 j' i
: T/ e* `$ y$ m" r h. @9 gbegin P_pick1 arriving! g: ~+ S y$ X( u: w, p& G$ W0 U3 I
set A_i to 1
% c: h$ d4 a& {4 t move into Q_induct16 R7 C" a6 L" H( g! \% R
move into pickaisle.induct16 ~+ }" n5 b, N3 ]
while A_i<=30 do begin- D7 R$ \5 S" D+ d. X& V$ G
travel to pickaisle.con(A_i)
5 ~- A8 q, \! m6 S5 c# q3 i if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
$ }8 t' d9 B E else wait for 10 sec! Q; v0 }7 M6 I7 K8 o7 u
if A_i=A_leave then send to die
5 h9 l* J# C+ v" E: | else inc A_i by 1
0 U6 p5 X5 l, R7 q4 S( p end
9 S3 t7 @$ ]: a- oend
2 k7 `. P" { r8 ~
1 M- u3 |1 W( Ibegin P_pick2 arriving
# \* f0 l$ ?: }4 r; ^) }1 l1 A3 f% Q; h set A_i to 119 z" D$ P, t- x8 V5 h; o
move into Q_induct2
4 c4 Z5 i/ [3 V; S5 j7 F" d move into pickaisle.induct2& [3 b9 T' |# g
while A_i<=30 do begin. R) @2 |6 x7 ^9 `" Z R9 x7 U4 a
travel to pickaisle.con(A_i)
/ Z7 i. k$ w4 O if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec; y; t4 h' {- v4 b S$ e& P5 g
else wait for 10 sec' p/ \/ b+ y* G; A: [) b1 t7 I; R
if A_i=A_leave then send to die9 ^, z+ a& U; ?& a O, s/ z" R' v
else inc A_i by 1
* P4 w* D3 o2 H. ?7 u2 |7 S# M0 K, S end
# ] k$ b7 b5 A ]; bend/ x% L3 {- L v) c+ C1 k4 e5 a
: J& e/ f! m% [# b6 R4 Y
begin P_pick3 arriving1 x) f& R+ V' q# I. D* z6 B( p8 a
set A_i to 218 x _" F; p/ ?( o$ `" x4 F: _
move into Q_induct34 ~! _; V, @- O* N) ], }, Y/ I
move into pickaisle.induct3
K7 ?) B% Y4 A! F1 y* G! u while A_i<=30 do begin4 ~% w: \3 n' ?4 M' V$ U3 [ i
travel to pickaisle.con(A_i)$ w' F( v9 t' m2 D' |
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
0 a. f2 O/ x# b9 I# |: J4 j' e else wait for 10 sec R& M6 k6 L# H |
if A_i=A_leave then send to die9 `# z% \/ Z8 b
else inc A_i by 1# m4 F+ c& i3 R3 l6 k0 s% H1 Q- k5 ?
end
- c5 l1 X S4 j( E- E1 Hend |
最佳答案
查看完整内容
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,其它按你的 ...
|