|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢% r( b( K, ?. I' B( t
: \" U' h* y+ J F$ _& U
我的问题是,在每个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中的数值,不知道会不会有什么不妥。. b6 ?: ^/ k. J6 n
9 W; X9 Y: ^3 M/ _) jbegin P_read arriving
" M* N" I8 W3 [ while 1=1 do begin+ L7 [- q" L3 R" ^4 T C, m7 p) C6 z
read A_tote from "data.txt" with delimiter "\n"
% _2 p- n3 `7 f' F f read A_time from "data.txt" with delimiter "\n"# n. @, Z" m! w) P
read A_leave from "data.txt" with delimiter "\n". j. E4 m! j+ U, w
read A_picks from "data.txt" with delimiter "\n"' }- [( U, H3 B" n& s: p# ^
set load type to A_tote# a7 l7 ^# ^6 W) ?+ g2 W, C& T
if A_tote="tote 1" then set A_induct to 1
* g: T! t/ N3 h9 _. O1 T else if A_tote="tote 2" then set A_induct to 21 o- o- Z- [0 k5 q+ S" s
else set A_induct to 3
" @. i2 ]+ O, {$ x0 c6 S set A_i to 0' ~2 y6 F: D" w* b! _4 A3 `7 r
clone 1 load to P_induction3 i2 s( _( |+ Y& M* L
wait for A_time sec
+ d) |, `: A1 |+ D( \ end1 x) c) v }' ]' I
end
* D3 P- m5 q) i0 D- P2 }# ^
* _) R7 A, g+ R9 R f0 n+ @begin P_induction arriving
- |: J& h c; E0 h1 u if A_induct=1 then clone 1 load to P_pick1
! Z8 E: M0 W8 S* t9 r. h5 _( C else if A_induct=2 then clone 1 load to P_pick2& V+ u/ @5 {9 w8 g6 N
else clone 1 load to P_pick3+ Z9 ?: f% g! a' U& \/ m
end- T( `& a& _) a8 z
- {' `% R8 s/ U7 \3 m0 J
begin P_pick1 arriving# \' i% l7 Y$ ~6 y
set A_i to 17 z: r: o) _0 b
move into Q_induct1$ i6 r+ G8 M4 t) \( u
move into pickaisle.induct1
o$ Y+ u6 K! o- Q2 U. J& @$ k1 _/ N3 C% U while A_i<=30 do begin
) D( x# D" U8 m9 e: r travel to pickaisle.con(A_i)9 C3 ]' H3 X+ a7 j7 c- i- b9 R- a
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec k- o8 H* S/ Q' I
else wait for 10 sec
. y% M5 P+ S1 C* ^' Z if A_i=A_leave then send to die* g/ r0 {8 n$ q
else inc A_i by 1% y5 I: y, L8 C ]0 p
end
; ]6 C( p' K R2 q7 D. vend% T$ [( t ^; }. i& D3 M
4 A" q) j4 A7 { M# dbegin P_pick2 arriving" m3 A+ R4 n, @% C
set A_i to 11/ U) v" v" W3 r) o1 {
move into Q_induct2( j" @- D9 ^2 [7 F9 H
move into pickaisle.induct2
! v6 m9 s& G, a+ X; r while A_i<=30 do begin$ P' e6 F5 m/ @- x( b; f
travel to pickaisle.con(A_i)% v) f4 @8 J9 I4 D! ?( H |
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
4 G1 X' `% l) j+ t6 x' f7 w else wait for 10 sec5 p# x: t, v, R7 _# ]
if A_i=A_leave then send to die# s: N% ]' |* T3 F$ f
else inc A_i by 1
* i! Y" @& K5 _ h* u! M end
8 R) T! u4 \$ _! T# `+ D2 E9 r3 Yend) Z, Q4 F+ `- e6 Z B% }' n9 ^
! r0 ^! K. l; `' V* cbegin P_pick3 arriving
/ A" \. R& k% x( D5 J% [ set A_i to 21
3 G+ x0 w$ E6 M4 G move into Q_induct3( l2 L5 X. k9 F( o ]: s' G
move into pickaisle.induct33 L& Q; w. K" s! T8 S
while A_i<=30 do begin
, _2 `% T3 Q- L( j* g! q' ] travel to pickaisle.con(A_i)7 H' Y0 c7 Q9 k# x6 Z j3 D
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
# h/ R7 g7 k2 e" \" G else wait for 10 sec
2 ?& Z: H% x6 \7 _ if A_i=A_leave then send to die
$ D0 z" k- O, o) u3 v else inc A_i by 1# G0 E. O& z7 J2 L7 Z
end; `+ b6 L: i5 z" l
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,其它按你的 ...
|