|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢* r: [; p+ o |) ?6 h/ x) |+ Y
7 o& T$ o4 N# d9 `5 e2 r( d" y& M2 T
我的问题是,在每个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中的数值,不知道会不会有什么不妥。/ ~+ M0 U. u+ p# l+ f
$ W, A P {( Y' y V2 `1 mbegin P_read arriving, O0 Q7 f8 [' K3 M9 v q
while 1=1 do begin- e) E1 M" R7 r9 p# G$ Q6 n
read A_tote from "data.txt" with delimiter "\n"' ~. d9 Z: c( g# _
read A_time from "data.txt" with delimiter "\n"7 w3 R" h( M4 P, l' z3 D
read A_leave from "data.txt" with delimiter "\n"/ j' @. z4 V0 p* D! r' Z# o4 E0 Y
read A_picks from "data.txt" with delimiter "\n"8 i; j* e0 f/ }% j/ h8 u0 Q
set load type to A_tote$ p7 X2 r. V' v3 Q
if A_tote="tote 1" then set A_induct to 1! I1 L8 y0 d( ]+ \
else if A_tote="tote 2" then set A_induct to 2
8 ^ t8 d: N4 I0 T2 D. P8 s X/ @ else set A_induct to 3 ' B7 A1 h$ G1 O& q( s4 S# K( } _
set A_i to 0
) k4 O% a* O( ^* C+ M" L- W clone 1 load to P_induction
3 W9 }9 L( p* N: k# \# F) V: ]: u# X wait for A_time sec
+ v. C: ^( L7 B! l2 x2 ] end
% Y2 I* l5 u y/ F9 T% q# ?4 b( l0 Pend* e2 `. d7 Z+ x; x4 L+ |2 E2 g( e
2 c/ d. q5 N& _! y' \begin P_induction arriving: P V. n- ]) t# b0 w* k
if A_induct=1 then clone 1 load to P_pick11 `" p2 f+ [! L
else if A_induct=2 then clone 1 load to P_pick2 r: t+ ^4 d; P9 ~- I
else clone 1 load to P_pick3
" t5 y" g4 _: l, T; B& m- M: Tend
* H& B& P9 T2 P, Y( h0 `! O* s) d! X, I* W& T
begin P_pick1 arriving
; Q3 U/ d' E& f# d6 r set A_i to 1! p& `4 V/ u) s$ Z. V! Z) t8 g
move into Q_induct13 {8 h, |; |" D. k
move into pickaisle.induct1
$ o$ }3 {0 F/ R2 H/ D while A_i<=30 do begin
6 I* ~# Z. k, X travel to pickaisle.con(A_i)
& z6 I O, Z2 R7 }7 }' `# B if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- r8 h$ ^7 k7 D7 C7 e, R M else wait for 10 sec
/ m* M: X6 u o2 o$ T if A_i=A_leave then send to die) B/ I3 X% j: {$ j6 q
else inc A_i by 1) o; ^3 i- a* I: u$ Z, W8 ?
end
# M( ]* W' z4 [2 n/ |+ Nend) H$ n+ o8 {, p$ B& q5 m; r
1 \7 T" `; m/ M7 Y4 m: A* \+ A
begin P_pick2 arriving4 }4 h" f# a1 G/ |; |
set A_i to 11
+ p& s4 y) w, h' i" x4 }" u move into Q_induct2
`& j; u3 S, k# e8 |9 P6 G l move into pickaisle.induct2
; L7 ]: ]; ]& G2 W. g R, Q3 n while A_i<=30 do begin
* j1 u' B0 l/ i( k* _9 { travel to pickaisle.con(A_i)% [3 p1 ^. O! ~: E; Z
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec4 T6 Z1 z" p4 S" m5 M% e- h
else wait for 10 sec. X( U/ Z7 [- n; s/ \
if A_i=A_leave then send to die
6 ~0 _- m; E* J else inc A_i by 19 C% ~4 p/ v4 ~ N: W: G* C
end3 G0 [ e; p9 g
end. o# K% a2 }+ R
: d; W) g6 X' T( C& [2 kbegin P_pick3 arriving! f* P) w, x G1 t2 h
set A_i to 21) l8 q0 k V! |1 \
move into Q_induct37 y& f" Y6 Q1 l" x
move into pickaisle.induct3
6 I2 B1 B, D$ |6 s while A_i<=30 do begin* q4 d- T9 y' h( h$ o
travel to pickaisle.con(A_i)
, l' i+ \2 Q& G" }, ~+ A if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
. R7 t" L6 _8 A# L, `* Z9 M else wait for 10 sec
! U& A! [4 ^* b if A_i=A_leave then send to die
3 _! N. K4 i( Y else inc A_i by 1
% r( `) h1 _* p end
# L& k$ c4 z& G* c+ i9 ^, ~8 ~$ Pend |
最佳答案
查看完整内容
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,其它按你的 ...
|