|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢& @2 T& @' @ t2 C
/ f& r, X3 P! e& a# \我的问题是,在每个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中的数值,不知道会不会有什么不妥。
$ E! _! W6 X* V
% @: {& ^2 @% t Obegin P_read arriving
, R. K8 L$ H9 t2 s while 1=1 do begin
! i% L" \. D- P read A_tote from "data.txt" with delimiter "\n"
! n v1 t8 U0 a2 L z: r read A_time from "data.txt" with delimiter "\n"
, t! `( Y8 D* z3 @6 e read A_leave from "data.txt" with delimiter "\n"
b( q; i% n5 t0 f& _$ b read A_picks from "data.txt" with delimiter "\n" p$ H( r' O- i4 x4 l, ?, M
set load type to A_tote
4 U& K. r3 x+ F! v0 H! k+ e if A_tote="tote 1" then set A_induct to 14 s, s9 I: ?) o# F9 h1 I, O
else if A_tote="tote 2" then set A_induct to 2
! h" ]9 V+ a& B0 @/ P3 w% V else set A_induct to 3
2 N+ |2 t* g5 y' [$ _' X1 S+ W set A_i to 0
5 j1 U0 Y9 S6 u clone 1 load to P_induction
+ r/ u; `" [9 }+ Q5 q8 H( O6 D wait for A_time sec
2 x; m P" \) v, j+ A0 ~ end
8 n7 h) u+ }$ C/ l2 uend5 `3 H; I. H; Y- t; m4 |: L
+ l" U0 u; a/ Qbegin P_induction arriving( I# j# c% ?! h! C
if A_induct=1 then clone 1 load to P_pick1' f) M- c4 z, L* R/ B* B
else if A_induct=2 then clone 1 load to P_pick2
2 e' s% U! v. i- N( B5 V' L else clone 1 load to P_pick3
& ^) O" z; l# c5 @end7 T3 ^, i4 n2 g
& V) {. [# a2 n1 u% Qbegin P_pick1 arriving
: t1 N: W) V5 I* q set A_i to 1
* J+ C; @8 C) b' P* { move into Q_induct1
9 S7 @2 ?* q1 g: ?! r7 j; P7 r move into pickaisle.induct1! t# x/ m$ M0 k; z
while A_i<=30 do begin8 {% X: @8 j1 |" l% J. S; T8 S
travel to pickaisle.con(A_i)5 v2 P: A" Z* D% _
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec/ I: ?! ]* L: r5 }) a
else wait for 10 sec0 O# ~. x0 m6 `' N
if A_i=A_leave then send to die( [% h2 b! B( y" m$ E9 {2 L/ }
else inc A_i by 1, Y7 e# p6 j" V
end
3 I, d& [9 @9 {. s4 \7 ?end/ g/ ^( g. j; G$ M
* }* y, N4 y( T( Gbegin P_pick2 arriving/ x% Q3 w- E$ b+ r
set A_i to 11/ |( w( J" {% Q0 X1 P" b* ?
move into Q_induct2
# S$ O( Y2 h; ? X) V$ B' a+ F3 } move into pickaisle.induct2
' }, j. e g- U0 s: l while A_i<=30 do begin8 g' N! ^5 u. ~- \* d+ {
travel to pickaisle.con(A_i)" w+ O, x0 g2 I8 k4 w8 T
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
( S6 [8 `7 S; |; \& a, R1 K4 } else wait for 10 sec, e; B5 B% O- s* ~# E0 `: B6 Y
if A_i=A_leave then send to die
* C& a6 W, r; K8 u$ h else inc A_i by 1, l# L) N6 [' k) ]" E
end
1 m7 A/ c% f, O8 K' J" {7 G3 Eend! x$ c$ p4 V% A; [3 U% j
( V' |) \1 \ F6 Z- l
begin P_pick3 arriving
( P% I! l n2 { {0 D C set A_i to 21* \6 i1 p8 y) t9 l& l h
move into Q_induct3
, L5 E, @1 Y" } k! n move into pickaisle.induct3$ S2 H) K( a$ `/ J7 v0 d
while A_i<=30 do begin
. q9 c+ i" J* A; K travel to pickaisle.con(A_i)
7 g9 u3 N; @ ^! \0 O- Y$ O if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec( F% ^! [+ K2 F8 c
else wait for 10 sec
6 P; l$ a* e: r+ T. p/ n+ Q# i) y8 a if A_i=A_leave then send to die: g" q; M2 S! A! S: n8 T
else inc A_i by 1# g# ?0 T( ]* ~5 }) C( G. H* L, Z
end8 V, S' y" I; W0 h# V) y
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,其它按你的 ...
|