|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
5 b1 C2 G6 A) r5 o* J' {9 ~, z5 ~2 [# G1 P 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中的数值,不知道会不会有什么不妥。
- m" [2 R7 w B# V+ @
4 H5 z. k5 f3 T9 {begin P_read arriving
3 B# P$ m$ R1 q while 1=1 do begin( c* T+ I( o2 h2 w. V
read A_tote from "data.txt" with delimiter "\n"
?) a7 K8 T1 W# ?) G+ U, j read A_time from "data.txt" with delimiter "\n"4 M8 U. `. [7 s8 s, J
read A_leave from "data.txt" with delimiter "\n"
9 x! b1 M- M$ X, C: M read A_picks from "data.txt" with delimiter "\n"
% L5 ]: q3 R" D) W9 {' V% n) ~ set load type to A_tote
' C# Y8 c; U2 v/ r; g2 p if A_tote="tote 1" then set A_induct to 1
% h0 Z" b" Y# ?% j5 T7 q/ T5 C else if A_tote="tote 2" then set A_induct to 2
( X0 L7 [- \9 \# g) F else set A_induct to 3
, G9 ? L8 R3 G3 d" l! | set A_i to 0: z$ [/ ?+ ~; v7 w( @0 I, `! T
clone 1 load to P_induction
2 _7 q6 f. }3 d. l5 s, C. Y" O* \ wait for A_time sec; Q; j; k9 N) R
end! n1 W. o M& x7 T, s" c e
end: {! \$ U1 ~+ K4 d& t
. F7 w# J4 Q X: L* q _begin P_induction arriving ?: c% w: r4 _; \
if A_induct=1 then clone 1 load to P_pick1! J9 G- |: \: g2 K( F
else if A_induct=2 then clone 1 load to P_pick2; q3 a3 G! L4 c+ R' m0 U
else clone 1 load to P_pick39 D2 E/ F# U3 q9 M7 E5 k* r) O
end
5 j7 P, C; y9 f2 Q) ^
0 E( @( t0 F3 H7 p& e0 r0 sbegin P_pick1 arriving- i; s8 \ n# B: | z( q
set A_i to 1
, K4 Y( y0 E$ Q" P' E move into Q_induct1
+ E1 }' P+ ~; K9 o& V4 ^, ^) L5 Q# s move into pickaisle.induct1
" m2 \4 _, ^# e. j+ R* ]! o, s4 f while A_i<=30 do begin
* f6 o, J$ }' O; h# a, N6 w travel to pickaisle.con(A_i)5 {$ M3 ?7 y. x4 T
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
; i. |: p# C h' f/ V else wait for 10 sec% x; q( p) b: _: [( Y
if A_i=A_leave then send to die
1 _$ { A, ^% l2 t& b' K. \ else inc A_i by 17 n- c/ h# l7 ?, _" p
end
4 y2 ~: G0 I, U( U3 @; d8 e- send
' J7 W6 _( w7 ?
& ~4 I& _$ j! D# X4 {& Vbegin P_pick2 arriving
$ W" I7 h1 f5 ]$ ~( j0 C3 r set A_i to 11
8 V+ ]; f, I# V/ w7 G6 P* n; z move into Q_induct24 d o6 ~4 z- K: O5 Z' ^9 j
move into pickaisle.induct2% M3 u9 P2 c7 [6 B6 G. D1 W
while A_i<=30 do begin
1 p6 E: y+ F6 Q travel to pickaisle.con(A_i)$ P/ C5 z1 Y4 V
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec/ k; I) v4 K" C$ m2 L5 H% q
else wait for 10 sec# h* ~! w; W4 l V1 w2 ?
if A_i=A_leave then send to die* C9 S. S: J1 ?3 w2 T! l
else inc A_i by 1
' u+ i2 Z4 k9 b: i. w6 Y) r* E6 G- i% j( w end
$ a. H* W/ W2 q7 e0 _, K( t# mend$ L+ N1 |$ r. @0 ~
1 Y# g3 t+ N9 F+ r# j7 h Y
begin P_pick3 arriving+ v+ _: R7 N ^3 E
set A_i to 217 B( D U2 [2 h( O% u4 u2 ~. \* Z9 i* h
move into Q_induct3" d; [" X) b1 w+ F! ^( W
move into pickaisle.induct3* l- V3 }+ w P
while A_i<=30 do begin& d5 u4 K4 | m. @& [
travel to pickaisle.con(A_i)7 c, Y- W) e! @4 s% {+ F5 `1 o) G
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
7 h! o1 d4 U) q' ~# V8 I/ v else wait for 10 sec( u+ J X% t) w& U+ _
if A_i=A_leave then send to die
' Q+ h1 Y' H" U! t/ g" n else inc A_i by 16 A) Q; G ]' W2 s0 k- p( x9 Y
end- O, x! R, P2 X6 X( E6 w" d- u
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,其它按你的 ...
|