|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢6 |, ?6 r2 ` m; D
* S8 v7 x' b+ q3 Y/ D. q! O
我的问题是,在每个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中的数值,不知道会不会有什么不妥。. D! }9 a7 G ^! t% u* S2 t
2 O3 U0 i* A# s5 ybegin P_read arriving6 V6 U& l; v, @/ \) F
while 1=1 do begin) l+ e4 }4 s; e o- F7 `. o$ ^
read A_tote from "data.txt" with delimiter "\n"% W, k% T3 w3 C$ c9 R: r$ H3 t4 F$ x
read A_time from "data.txt" with delimiter "\n"9 D b* ~, A; }9 R
read A_leave from "data.txt" with delimiter "\n"
8 G) x& q4 }8 F4 S; M read A_picks from "data.txt" with delimiter "\n"% r$ O7 M( a' u, W
set load type to A_tote; t( K# M5 w& q% ^6 w3 L
if A_tote="tote 1" then set A_induct to 1# A( b; D( K" X$ C/ O& `8 N- \
else if A_tote="tote 2" then set A_induct to 28 \+ W$ W! n' u1 Y9 S0 u
else set A_induct to 3
' \+ N/ Y% [6 C! z6 l5 A set A_i to 0
: Y2 [0 @% Z0 \3 {: s& Z3 _. x clone 1 load to P_induction* u/ Z* V/ m& W4 U5 ^1 \1 b' |' q4 R
wait for A_time sec
5 ?( q" T) }. g end
% G+ w2 a2 v0 l: \3 a) tend
1 C _0 q1 D) W( I
. [5 e4 s! F/ u/ x7 rbegin P_induction arriving$ L L% b- ^ O' O
if A_induct=1 then clone 1 load to P_pick1
2 ~. R( b# b9 ?% i9 W [" e7 k else if A_induct=2 then clone 1 load to P_pick2
4 r: p. L+ i r1 `" ] else clone 1 load to P_pick3% \" v0 h, G+ }. a+ c6 b
end6 c9 o, s4 @% c* P
# w' d0 i) X4 a' L2 K. vbegin P_pick1 arriving* O5 D7 ~) h0 O# b
set A_i to 1
# }9 f+ ?5 S; `' V; p move into Q_induct1
0 p1 m+ ]4 U$ d. Z; ] move into pickaisle.induct17 l! V& s, @1 H0 E& f* u4 K" Q5 G
while A_i<=30 do begin5 i( ~( N0 ?, Z+ @0 c( T
travel to pickaisle.con(A_i)7 |9 R4 d3 W1 R. u9 X) e+ D/ d
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
* _7 H7 z7 c' H: t C, E% V else wait for 10 sec5 C( ?) w1 F7 N# L+ `: z
if A_i=A_leave then send to die
1 A# f) U3 k5 ?0 ]; d% ^ else inc A_i by 1, b7 G( N: }9 \2 n
end
L+ ^/ _0 N8 G7 K$ C+ Iend* N: t, C6 l: W$ n8 L: b
( l0 \3 V' c. V& Tbegin P_pick2 arriving
" D$ Q' A7 z# t. ` set A_i to 11
$ T0 y- T$ l L8 O% c: x& ^ move into Q_induct25 N" E9 Q: w% y% R4 x H) u9 {7 r
move into pickaisle.induct29 ]# D3 B7 e. ]: J; g3 v$ l2 W
while A_i<=30 do begin
) X8 y7 m5 n+ f+ U1 s6 w travel to pickaisle.con(A_i)! L, o( i' F1 H4 {( L: _
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
1 h9 G; A2 n# {8 A/ _7 f else wait for 10 sec2 |* |' } p+ Y1 [
if A_i=A_leave then send to die
% b# g P+ }& U; a; p9 V5 {" @ else inc A_i by 1# V- W. t" c2 y6 _# c
end9 J: K" {6 K {/ U: B4 ?" H9 a
end) D6 g9 ~( g3 w
( R+ K1 I8 D5 p) K9 O7 l% R1 ~begin P_pick3 arriving
3 U8 d" l- }* w2 x' e6 e) ^ set A_i to 219 ^8 Z# Q: p" h; g. a9 z
move into Q_induct3: p+ y, @5 U- L K0 l& a
move into pickaisle.induct31 G& ^, O% K' N! B
while A_i<=30 do begin0 m# R2 e2 F: Z# Q2 K ?! e2 `
travel to pickaisle.con(A_i)
# `8 I# J$ O, T, s1 x' Z; N, k! h if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec! c, [1 W3 i% g5 T
else wait for 10 sec
$ ?5 T0 Y1 T7 q" I% O: G+ L# q+ p if A_i=A_leave then send to die1 D1 B! z' r5 `) Q
else inc A_i by 1
8 x7 j/ X& W' | S end, X' R3 @4 [& S7 A4 l( E- |8 e
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,其它按你的 ...
|