|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
- B# j# x) n: F$ }
! M0 y! O7 [! }我的问题是,在每个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中的数值,不知道会不会有什么不妥。* W/ i' i! f. N n
; d" z+ t9 n+ s7 z7 a+ z: G% B# C
begin P_read arriving
$ S. `! T0 r: } while 1=1 do begin: ?! W5 A# Y( l/ ]4 ]$ W8 u
read A_tote from "data.txt" with delimiter "\n"+ U" u9 w# P" \0 c ]6 [
read A_time from "data.txt" with delimiter "\n"
S- i& C3 A- z; I6 E read A_leave from "data.txt" with delimiter "\n"* M1 S5 O- z! |! [
read A_picks from "data.txt" with delimiter "\n"
) m) D5 B" ^* W* U set load type to A_tote; I. y8 S7 _7 X9 ^
if A_tote="tote 1" then set A_induct to 18 b/ Y( S1 |1 E- j1 J8 }
else if A_tote="tote 2" then set A_induct to 2
! B. n9 h! G* |7 W3 N( } m else set A_induct to 3 & n O# h. r6 }! A
set A_i to 0: u- r6 ^4 R6 B1 v) x4 E6 z
clone 1 load to P_induction
; W* o$ L! e6 Y* W& D& k" x& F wait for A_time sec5 i: |* _) @. e
end
5 i2 b, W8 r- d; s2 ^% {end
; j1 f1 h2 [2 J3 f, H
6 W( x n1 ?4 jbegin P_induction arriving. A& H. w+ }- Z; e
if A_induct=1 then clone 1 load to P_pick1
& ~& o9 s V8 I4 j- @( v else if A_induct=2 then clone 1 load to P_pick20 u3 l6 w( s! d) N" X
else clone 1 load to P_pick3) R6 V& V2 b" H. B# _7 T3 W
end
& `/ |. d* E1 v3 E; [5 R* a3 v
" F: ^/ _- B) B" c/ ~2 W- Nbegin P_pick1 arriving2 a9 Z5 i/ s/ w& O! O9 }
set A_i to 15 a& l5 |4 E+ Y' ]
move into Q_induct1; V* \" C. o E; @, D+ X
move into pickaisle.induct1
7 n8 C8 |* D: L8 U/ { while A_i<=30 do begin
. f9 p& u" @# c2 ^# P travel to pickaisle.con(A_i)
" D8 f. v. g' y5 w4 x2 X& S3 V2 Z if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
4 X- H8 h* l9 Z, |" F9 J$ s else wait for 10 sec
; `& f5 D( J* w7 h; e' ]( K! g if A_i=A_leave then send to die/ n1 O* L" q. B1 z$ V
else inc A_i by 1 `3 L- S5 k3 M2 \' z
end
" @& b0 t. `- A6 g/ T" D6 e, x! i" \end
# s8 h! S. x+ y7 D0 G, k+ {+ `: J& ?* o; d* k
begin P_pick2 arriving4 s4 w* {4 R% A4 a! ~2 p. R. ?1 C
set A_i to 117 q K3 D0 p7 W6 w
move into Q_induct2! E! ]" v' f4 h5 J8 h
move into pickaisle.induct26 V; ^+ ] z% j
while A_i<=30 do begin
! {3 N- K, W: Z @, P; Y( w travel to pickaisle.con(A_i)
' ]" K, E3 g8 V5 Z: e if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec! a. N- }: f9 Y% J# j2 d3 A
else wait for 10 sec1 H+ a* [/ s/ a
if A_i=A_leave then send to die
* N# U8 Z3 J6 H! p# J' f4 S else inc A_i by 12 q" P) S- {8 |
end
- V8 Y3 i; }- `9 f. xend
4 U, F5 `% V1 m" p" n& e0 v5 `. \6 H! p% b$ _4 e( X7 @
begin P_pick3 arriving
2 }3 n6 v9 \/ I& e set A_i to 21
5 h# X+ F3 E: v7 Y$ i1 I7 K) N8 s move into Q_induct3. o* A5 ^- Q4 Q& \% l1 [! |
move into pickaisle.induct34 I% }2 y1 A% Q* u4 q# \
while A_i<=30 do begin0 T- z; _1 ]4 y3 G- W
travel to pickaisle.con(A_i)
4 q; ?, C9 n# b& S. y+ u T( {1 X if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
7 e4 h- K( t$ o2 o7 @( F8 \ else wait for 10 sec" N9 R% `5 @% @8 Z+ c) i# Z
if A_i=A_leave then send to die; E `( f& C6 [1 ? p) D
else inc A_i by 13 {+ C( c; v, q! X) K2 Z, L4 y# {; z
end
1 |7 W. c5 l+ ?8 @ j7 R& N4 |/ Gend |
最佳答案
查看完整内容
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,其它按你的 ...
|