|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
( ]5 ]6 }8 F2 B3 p# F1 B" I- p, V7 f2 O: m) N
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
( `8 }7 _1 g7 C
# T: v$ x0 r+ @4 g& |begin P_read arriving
% ~' d1 L: E! v2 a0 L) Q while 1=1 do begin) [% B2 T. L" {3 {& D# [- m
read A_tote from "data.txt" with delimiter "\n", x1 R& |. Z3 _; T) Z2 j
read A_time from "data.txt" with delimiter "\n"
( l* r% i. V5 y/ E$ A% B o7 G read A_leave from "data.txt" with delimiter "\n"* M D( t0 H1 A
read A_picks from "data.txt" with delimiter "\n"
; Y' X8 B# O7 u6 w% \0 P7 f set load type to A_tote( s6 H5 R. j& m" h
if A_tote="tote 1" then set A_induct to 1
" b# n8 i# ?7 u( R9 {9 ^ else if A_tote="tote 2" then set A_induct to 2
8 j$ R4 |6 t8 _# k else set A_induct to 3 $ N; G+ G( Y9 e; r7 Z: ?) E
set A_i to 0
) O% Q0 ?3 l9 c- A: K% J: c clone 1 load to P_induction
2 Q8 f: M* M) A9 S! C5 N wait for A_time sec8 W" {) _4 J; K/ X C
end
7 [$ L5 ]$ v8 _' _: P' gend
# V i6 c, x/ Y$ t
k% f4 D* n' A: q; U! Gbegin P_induction arriving
5 M5 n2 u8 l- W+ u# s if A_induct=1 then clone 1 load to P_pick1
, K; c% G5 q5 H: Q4 V- t- L ], a else if A_induct=2 then clone 1 load to P_pick21 z Q; j6 b; u; a8 n, g% o8 i
else clone 1 load to P_pick3* @1 y, V- O$ ?) q
end
' w. {7 s% k2 Q# A3 V+ Z7 p2 K+ E- d3 O4 v6 z
begin P_pick1 arriving
/ V: R3 w! w0 x0 b7 k set A_i to 14 \( @( o" p5 J( @. s1 B, r
move into Q_induct15 `% W2 r) `) W
move into pickaisle.induct1$ z% _* g! b! ^0 }! P
while A_i<=30 do begin* t; R( e3 H. p! \1 u/ A' V
travel to pickaisle.con(A_i)
' v1 `/ u; X2 _) |6 g/ y& o0 X: A, N if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
& p5 W. r1 ^. x# l5 S7 Y, c2 G0 m; Q: ^ else wait for 10 sec
- ~& ^$ V% M4 \2 g if A_i=A_leave then send to die& _7 Z: ?2 a6 ?' y; _- P/ |
else inc A_i by 1
! Y! ~, |& x7 p1 J3 p+ X6 Q end
; p, r1 q$ f( m+ z- Lend
( Q5 h3 E, z/ n- u) F% c
' M A y8 t- D$ s4 m+ I+ E+ Zbegin P_pick2 arriving
" r6 w' O# z2 M- ~. i set A_i to 113 q5 A. e( ]) F5 [! M3 J/ {9 k
move into Q_induct2
2 s4 o- v p1 _: m0 [4 c move into pickaisle.induct2
$ j0 z. u5 c: A& X3 D while A_i<=30 do begin. t! L9 k& |( p2 h% ^5 r2 B# P2 A; g
travel to pickaisle.con(A_i); S. ^: Y# N5 I% r2 N
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec0 c( w: F2 F. h
else wait for 10 sec* z( @( j% _5 [! u, ^2 h7 k
if A_i=A_leave then send to die
4 N% P- v/ t$ x) R' s else inc A_i by 19 c+ ?2 w7 O0 {; x; `5 Y: ]
end* i4 d+ C/ I, Z A) s
end# ^$ o8 A! A5 f) n/ _
2 H9 |) y- Y( ?4 i
begin P_pick3 arriving
/ }) L" H# H' P5 i2 x set A_i to 21
& i; E2 ]* E- ~! t0 X) w0 u3 m move into Q_induct33 |6 Q' C' w. P2 I2 \
move into pickaisle.induct3; P o7 u% ~; E, v' w+ j$ g& V z
while A_i<=30 do begin" u' G/ a$ _5 J I2 h
travel to pickaisle.con(A_i)
6 B: N3 o4 i9 e+ W( |; ?4 C if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec0 G: ?/ G, ]- y! m
else wait for 10 sec" k$ K E% @" d5 `* B4 T1 A
if A_i=A_leave then send to die" S, k$ n+ x4 e$ n8 Q8 @' q$ j
else inc A_i by 1; p2 A- S7 I+ ^: b' G
end6 r6 Z$ B4 L' n8 v7 J8 f6 W% H! w
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,其它按你的 ...
|