|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢8 ]+ g- v9 ^9 N1 p& ]% Q
8 u5 w: Y7 R+ D
我的问题是,在每个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中的数值,不知道会不会有什么不妥。+ r" U& c3 X9 e; A, h( `8 p
7 `3 p7 \! {( B7 u/ ~& rbegin P_read arriving
7 S4 R3 C+ `: u4 h6 |/ b2 Y while 1=1 do begin* B/ U# F; [2 z
read A_tote from "data.txt" with delimiter "\n"
+ i# j* c9 A1 B read A_time from "data.txt" with delimiter "\n"
2 q* M- X( g; y) L0 x8 ] read A_leave from "data.txt" with delimiter "\n"
% b% F& y+ ?# m/ _3 `* x! _, ^ read A_picks from "data.txt" with delimiter "\n"
. w$ P! ^& W* B* }$ e" z set load type to A_tote
2 s: V' @: f$ A7 \ ?: M) g if A_tote="tote 1" then set A_induct to 1; {# H1 U" h# J# T9 J+ T
else if A_tote="tote 2" then set A_induct to 2
}% P$ X! s' |& S else set A_induct to 3
3 b6 Q! r7 D7 G& s& R9 Y set A_i to 0
6 R" Q) W; s; q# x3 g/ | clone 1 load to P_induction
& ]+ g( w+ T: O) e wait for A_time sec. M) S$ o z: S% @ D
end
$ M$ G" { o" j+ V Oend+ ?. l* v+ [' f1 w+ ]) B
! V8 d7 y3 o# O9 \+ _$ l: {begin P_induction arriving
) j6 q* z1 d9 U. }* h; ] if A_induct=1 then clone 1 load to P_pick16 T' E6 Y# ~/ ~4 E! ~
else if A_induct=2 then clone 1 load to P_pick22 B+ o! C4 _! }: y
else clone 1 load to P_pick3
7 ?! L# t$ l, x, lend' @+ n( X4 \* A# F4 c1 z2 h
0 Z0 n, Q2 \: B* D6 Pbegin P_pick1 arriving" P0 K5 E7 r+ y5 L$ K# a+ X
set A_i to 1
& o7 ]# ?8 q- M9 k; M% F/ z move into Q_induct1
2 y0 P& [9 Z+ ? move into pickaisle.induct15 S; E. W1 m/ t3 Y
while A_i<=30 do begin
7 `: T$ ]! C( s- e! S3 ~3 ] travel to pickaisle.con(A_i)0 {* E) l8 \! b- U
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec2 Z. _4 @. u6 ` A
else wait for 10 sec1 f8 t8 ]& \6 ]" r( U) Q
if A_i=A_leave then send to die( e! N) {9 T* r# h# `, `5 E& v
else inc A_i by 1
" n( |- J* q' u- X$ ] end
o! b0 }. |8 E- ?2 J0 @5 ^end' G- a& U# I3 k6 A! h" s( _
/ x; m- O; W0 g8 v4 X- U9 T3 x( wbegin P_pick2 arriving
0 [% H% v* D( e0 e. E set A_i to 114 R4 O0 I# |. @9 J
move into Q_induct2
8 o" G0 ~; M8 Z+ k move into pickaisle.induct26 G: u! t% z3 X4 Q4 o. g% ?8 Q+ k, Q
while A_i<=30 do begin
, [5 Z9 |0 l# H travel to pickaisle.con(A_i)
4 A9 g5 K( t( z. ^% x1 J4 ? if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
- f2 y) @5 b4 i/ j# W else wait for 10 sec
9 e8 A- j7 V7 x if A_i=A_leave then send to die9 s) y5 X9 q. X
else inc A_i by 1, n b# h3 c Q8 G0 ~) x
end
- `% S+ Q/ v0 \. A7 Dend& x- m6 R M& ~7 R2 J' Z3 m
0 v1 J' H' ~ W% U3 T+ t% Hbegin P_pick3 arriving. ?8 T' Y# s5 |* `/ x+ ^2 D
set A_i to 21& \6 s- F5 h! k. d( s3 S6 D
move into Q_induct3
g( i: t/ |/ i2 h9 U# Q( M move into pickaisle.induct31 M/ M" [& ^) H' v
while A_i<=30 do begin" b) G n/ b9 L: v, W$ |, k
travel to pickaisle.con(A_i)8 \( g( K! g$ s, u# i
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
( }& I2 e: k R" c' Y! g else wait for 10 sec
% \" v% f; g* P D: ?7 Z+ D. `* [ if A_i=A_leave then send to die9 G8 q. w& \. F% w5 G
else inc A_i by 1+ B. D' B" d- E$ k1 d! u7 n* g8 W
end) v& Y2 \, y; j; d" l- }6 Z _$ m
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,其它按你的 ...
|