|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢" x$ }( u# i4 S$ {
* H: x* B9 z* w @: 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中的数值,不知道会不会有什么不妥。
]& h; c* p H. J
& f" S$ R3 I9 m+ lbegin P_read arriving, J: u; J, f! R9 i& R
while 1=1 do begin: E7 E- N# f( Z; |: T0 D
read A_tote from "data.txt" with delimiter "\n"
% U, h" J& s! H4 Q read A_time from "data.txt" with delimiter "\n"
3 Q" y5 ~# P, _8 B7 {! S& ] read A_leave from "data.txt" with delimiter "\n"
6 w7 _! ^" o6 ? C read A_picks from "data.txt" with delimiter "\n"0 I. S$ D2 h6 q8 J8 k9 e. ~8 V9 B
set load type to A_tote
1 `# ~4 _6 u3 w8 Q6 H' ^/ \# b if A_tote="tote 1" then set A_induct to 1
; f/ G; o# { ^ else if A_tote="tote 2" then set A_induct to 2
& M5 ]1 O- s' U+ }4 ?$ n else set A_induct to 3 . y7 Z2 S& F/ K- h
set A_i to 0
8 B/ s* t5 e9 r! r clone 1 load to P_induction
. U% O1 I Y" F: V wait for A_time sec1 f. {& l4 F) w! l7 l
end
* ?* L t. ^0 A: P7 N$ _4 Xend
6 k4 H' L- C6 M9 F6 j: r1 h* j, ?) p2 d, Q/ u3 k1 H
begin P_induction arriving, v: b% t/ I* S: x! b3 |
if A_induct=1 then clone 1 load to P_pick12 ^- e/ O: _9 ^. c& W
else if A_induct=2 then clone 1 load to P_pick2
% A" ~5 ] o+ [2 v+ g" t3 Y else clone 1 load to P_pick3# _: b' ^ I7 J% p; h% @ A& i7 Q( k! o
end j X6 H6 r5 J* K3 _9 P9 Z
7 L- G' V& N$ \" n2 H; `
begin P_pick1 arriving1 d) H6 W+ g' U, x/ |
set A_i to 1
! O6 B# p+ K4 T4 O# a4 [ move into Q_induct1
% y$ j/ o. R6 K# B6 g; ~ move into pickaisle.induct1
" F) |, w5 S' ` j0 F' ? while A_i<=30 do begin# @0 f- G c5 F# y/ T- f( x' S; z
travel to pickaisle.con(A_i)( d& T* E7 K( r! [& k. N" j0 ~
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
* Q5 x4 A7 t) O8 U5 F- j# M else wait for 10 sec' k" e7 J8 e9 z) ]$ c: |
if A_i=A_leave then send to die
; W- k% n p3 K/ t. ~& T# E8 I$ ^ else inc A_i by 1, @# W1 u7 b, y' B8 C
end& K5 @; m1 q$ l( ]$ d# U
end) p' ~3 p- X' I* g% J% m# e3 b* E3 f
9 S, G; u9 P, s, C* Y( hbegin P_pick2 arriving4 H. C4 B1 }, U/ w5 F
set A_i to 11! x! h% G2 w. |% b
move into Q_induct2) d6 s& j, K! |% l
move into pickaisle.induct21 l0 o) i3 e r9 r! G0 ]* o
while A_i<=30 do begin+ `0 a' f1 {7 m+ D" @
travel to pickaisle.con(A_i)7 _& ]) O- q6 Y9 U
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
. S+ h& _1 p4 w Y6 q# H: m else wait for 10 sec& e* Z# G+ q( C. p* W E
if A_i=A_leave then send to die6 A3 ~! C- I% o
else inc A_i by 1
: d4 i1 Q: V! k1 j) Z M end
6 d0 S7 Y; z# S. P8 ^6 C- Nend
5 I2 ^3 f8 c1 `
3 s3 }% X' t- Z/ q0 rbegin P_pick3 arriving5 v: H6 w f" R0 S
set A_i to 213 D ^0 t% _, a! u; p' \' c
move into Q_induct39 z1 T8 k! l3 P) n
move into pickaisle.induct3
& `) D0 @4 V+ q while A_i<=30 do begin
* L3 ?- N% K6 [/ n1 I1 H% D travel to pickaisle.con(A_i)7 f1 L( D- M, T
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec) e1 o3 m/ w5 D$ @ k
else wait for 10 sec
" \$ E7 J; T I: M( m* G if A_i=A_leave then send to die
2 o/ r3 G4 q8 S% ^/ j4 B" i# q else inc A_i by 14 B$ l0 x( X! U0 b3 o- Y
end& O- ?0 s+ t/ Z6 Z% e
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,其它按你的 ...
|