|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢4 r: S, J4 \/ T* y$ |4 g
x, A2 a8 ?$ `( T! E我的问题是,在每个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中的数值,不知道会不会有什么不妥。" Y5 U, ~; D! L
3 k* ?) l6 Q: _
begin P_read arriving
" f8 b% g g( \ while 1=1 do begin+ ?& `. A; ^8 b# D# y$ X6 n/ _
read A_tote from "data.txt" with delimiter "\n") ~: _7 V7 x% [1 l% b0 R) \
read A_time from "data.txt" with delimiter "\n"
! X8 V" P: N0 Y* K2 B read A_leave from "data.txt" with delimiter "\n"
$ Z; {9 x7 p+ z$ ^$ I, D3 Q read A_picks from "data.txt" with delimiter "\n"
! r" L7 T ~9 y3 ^8 K set load type to A_tote' O" h# z2 z6 R* d& }
if A_tote="tote 1" then set A_induct to 1
' |6 ?( z4 W2 C else if A_tote="tote 2" then set A_induct to 2+ U6 V4 f! G& i
else set A_induct to 3 0 q1 ?' b$ z/ n6 H" N9 y% n
set A_i to 0! p* `- P, g; I. Z" z0 A# B
clone 1 load to P_induction
/ L- @1 z/ M$ H3 F wait for A_time sec
5 n! p4 m; C6 b0 s8 b5 V: ~ end
4 y/ A& D# v' {0 i7 cend
1 O; _+ _, g' f a# H" g9 Y
. m$ W2 Z0 Y# i3 P! d6 a; V7 hbegin P_induction arriving
' }9 v2 b/ |, i. ?+ f if A_induct=1 then clone 1 load to P_pick1, H& I! x; Y% Z; w( o1 y
else if A_induct=2 then clone 1 load to P_pick2
0 Z+ ~# f$ w8 U h! w else clone 1 load to P_pick3
. l! Y: N; B5 T; hend$ R, W/ i2 e) ]. {% t2 w+ U
) `, a: O, l. U/ |" Q; N
begin P_pick1 arriving4 m, Q7 p3 n: e: N2 ]) I P
set A_i to 10 D0 o* j3 ~; s! c* `
move into Q_induct1
' O5 ?2 U( @2 H4 {; b" d move into pickaisle.induct16 S# U5 d7 ]0 v1 H5 A# K% M
while A_i<=30 do begin
+ t1 V, R7 Z: |' r0 q0 g8 q3 @ travel to pickaisle.con(A_i)
$ R# l0 e% E: E( e# w5 ^" z if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec/ Q" z3 E2 V# Z9 M' K8 X5 N
else wait for 10 sec
/ [6 G* t. e( ]; V( `+ m2 C2 D d if A_i=A_leave then send to die/ W) V" O( _: B8 M, S' E/ Q. f1 w
else inc A_i by 18 \# `2 z- j0 F/ ? A- U7 Q
end
$ ^5 y( T6 I ~+ D% Vend
3 W3 |- Z( a: D. i$ [
0 |5 t5 n' Y& Q5 q! d" ^9 X; Obegin P_pick2 arriving
- g- y- d2 ~& ~2 u/ g set A_i to 11
0 c& q: k4 m) Y- R& A) h4 g move into Q_induct2" }4 }: H: Y. O* E
move into pickaisle.induct2
( X. |$ ?/ A7 @) O while A_i<=30 do begin
* m8 r6 s4 [7 O/ c* z! Z( @ travel to pickaisle.con(A_i)- ^9 |& y+ R6 E8 H
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
7 t v+ W: g% W% C; f else wait for 10 sec+ _* Y# \0 m$ U; d B3 p
if A_i=A_leave then send to die) @/ G7 P! @+ v/ ]2 L) G
else inc A_i by 1
' l7 }+ a5 L/ O& Q/ G5 D end
9 }% V2 `2 L# @. \ p' b* Oend! S2 C) f5 m* s/ L% _( X" `
) @. q& B0 k; e* d4 F
begin P_pick3 arriving5 ?: T, b! a8 Y! n9 X+ v2 R+ U" Y
set A_i to 212 q0 ]: e" k0 v( i; u
move into Q_induct32 f5 I( Q0 K& A" A/ Q" j5 }; C
move into pickaisle.induct3 W: j* w, V! V1 y
while A_i<=30 do begin2 L# z1 z6 \. y. a5 c0 h
travel to pickaisle.con(A_i) g; R0 m U3 q6 c! n2 D. E6 s0 X# w
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
1 w9 a+ _* k* r4 y2 `& [ else wait for 10 sec5 P7 k& y; f: {2 l& T
if A_i=A_leave then send to die
8 S- S# A7 \. Q" `* T/ k6 [ else inc A_i by 1
; J1 d, c/ V7 c1 M3 [) p) a end
2 u( G# e3 ~( B' ?# h+ }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,其它按你的 ...
|