|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢* {# o/ g0 K( D1 i' D5 L0 A
- ]- h, A9 s1 T1 Y( @( X' @& X; X
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
( k( ^( h- m/ u' _& B7 R# G+ s9 m8 A; h
begin P_read arriving
+ A, _- I+ i. ?8 a while 1=1 do begin
( Q# f8 ^/ K& A5 S1 Z: R read A_tote from "data.txt" with delimiter "\n"$ O& D" I" }/ R0 I
read A_time from "data.txt" with delimiter "\n"
2 y# ?1 m/ \4 ]2 W4 U+ e read A_leave from "data.txt" with delimiter "\n" p2 V( @% ~$ M. s% C( l
read A_picks from "data.txt" with delimiter "\n"
* C1 R% \) G( I set load type to A_tote7 O& K% a+ a: J% H2 A* U4 r* R/ _3 U
if A_tote="tote 1" then set A_induct to 13 M1 B: \, W- m9 k
else if A_tote="tote 2" then set A_induct to 29 ~' {0 }5 ~, I# W3 S% k' e
else set A_induct to 3 1 f3 Y7 u0 ^2 q+ K: l% Q7 i- H5 E) N
set A_i to 0. h1 `0 s4 J2 Q* z$ B% [% i! V
clone 1 load to P_induction; S% ^3 T; r: F2 W) E8 \
wait for A_time sec; ]8 H" `: q; z5 j" D; L- `
end0 M4 B( s! ~+ |' n u6 {
end9 D. r- ^+ J1 o' { q$ A
! X+ i5 [3 m$ a7 a% X% R9 u3 a# Rbegin P_induction arriving( E# p) [: S8 T7 r* b' j9 ^$ u, v4 @
if A_induct=1 then clone 1 load to P_pick1# l. Z# Y. ^; U$ e7 H
else if A_induct=2 then clone 1 load to P_pick28 m7 z$ {2 K' B3 w" E
else clone 1 load to P_pick3
6 Q4 ^3 y! c' z: h) X' P$ `end
& d$ B# ^- ]) y& T- q: ~4 t2 \6 g& D! f; ^% l: l) e
begin P_pick1 arriving0 f1 b+ s" j2 z7 X
set A_i to 13 U/ G6 v8 s: n) G
move into Q_induct1! q$ C( P; l3 t& ]0 [
move into pickaisle.induct1 a# y" U8 {" r, H4 {' O
while A_i<=30 do begin) T; w0 l7 a5 l2 Z/ k6 P- l& D$ N
travel to pickaisle.con(A_i)4 E# f# `8 X( n! P- M9 r
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec/ {6 S$ V7 @0 F$ e3 N: X9 i/ Y
else wait for 10 sec
7 Q% E D% F% k1 i% G3 g if A_i=A_leave then send to die& g7 a9 o. [( z. t
else inc A_i by 1 j e: ?) P& E
end" t4 F. P5 G9 ~
end# z+ J, J3 ^; x; L
# Q p! `' C' f7 Dbegin P_pick2 arriving8 O; L* O6 Y6 E) z) i0 i; E8 b% G2 }. [
set A_i to 11
" ?) e" m& N) Z) { move into Q_induct2- z) g5 m$ s- n) l
move into pickaisle.induct2, U; O1 \/ d* V0 I) y" i
while A_i<=30 do begin
% L0 F8 C5 Y- A travel to pickaisle.con(A_i)* c) {9 A! d' l% K* V8 C
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- i. Q1 n0 m6 V$ W3 N else wait for 10 sec
. J0 Y4 e' [, j$ _* e3 Z& E if A_i=A_leave then send to die3 A- a# @' j# O# l' H
else inc A_i by 1 R+ M. y2 ?+ @- v
end2 @9 m5 t+ P% m) E
end: V" ~9 m7 a% w% d, b- J# q
2 G8 B- R' ?' V8 `5 ybegin P_pick3 arriving
5 D2 U5 v# G) W% f set A_i to 21" U o0 | G9 V8 _5 y
move into Q_induct3
8 Q. P* g2 }9 O! t8 u move into pickaisle.induct3: @, D' {3 r7 G1 c3 [) S7 z
while A_i<=30 do begin
% ^: c4 t* t# E7 J travel to pickaisle.con(A_i)6 P9 ~' Y* `# @
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec f( O% x, I0 c. @! \7 V+ t. H
else wait for 10 sec
, m$ H9 L8 T! p% b/ R# C if A_i=A_leave then send to die. e+ I' t3 S7 A$ R, u4 L
else inc A_i by 1
% T# P$ @: l5 a3 I( u end2 V' ^/ v9 u+ ~; Z" z- z
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,其它按你的 ...
|