|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢+ p( }6 N8 C* M- v0 W, o K2 r9 l5 V) d
, a$ A3 [1 C. m# {* t5 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中的数值,不知道会不会有什么不妥。
: Y9 G& w/ J* z
3 k# L. F* U! l2 \begin P_read arriving
* J7 u3 o. p2 ]+ J1 y, e) W }6 _! G while 1=1 do begin
% f8 x' A% N" r read A_tote from "data.txt" with delimiter "\n"
5 v! U, G7 @9 b9 X5 A+ A- z1 `+ p read A_time from "data.txt" with delimiter "\n"
$ S& ~% q3 O) u) Z u read A_leave from "data.txt" with delimiter "\n"
- V7 Q+ w/ M1 s; _ read A_picks from "data.txt" with delimiter "\n"
' [3 a# H3 k& a* Y set load type to A_tote1 J/ G( b; I5 ]1 y
if A_tote="tote 1" then set A_induct to 1* Z) }, a/ G. [1 @0 T
else if A_tote="tote 2" then set A_induct to 2$ O9 d# i- I- e: {/ r
else set A_induct to 3 6 A0 ]% ]. L4 H' g; a6 M+ B. R. \
set A_i to 0. m: _" L! c: M% J1 o
clone 1 load to P_induction
; Q1 w" [1 N' e wait for A_time sec
3 v N/ F+ ^+ G. z8 q k# Y+ [ end
; g' Z, m/ I* L! I+ ?+ @( r0 x. Oend
/ E0 I7 l+ d# ~, a1 \$ z
. ?7 h1 p9 U& L+ ^% \$ o, Mbegin P_induction arriving
6 h# A) S( I& ~$ c8 _$ d5 K if A_induct=1 then clone 1 load to P_pick1
1 {6 y, `$ w, x- i' Q2 ? else if A_induct=2 then clone 1 load to P_pick2
. i- ] N: h, H( L else clone 1 load to P_pick3* i5 g+ Q7 ^* j& v, d; V( Z
end. f i% p! R }2 {4 \# h
/ P( v; p5 ^/ M
begin P_pick1 arriving0 F) [# O: J, H# q+ x( _" n$ S
set A_i to 1
1 t1 f6 O8 U2 I2 d- D9 t move into Q_induct1 ]# L: N7 ^1 f7 K/ s
move into pickaisle.induct1( }1 D3 @. L) N. ~0 o% B
while A_i<=30 do begin) m/ d) H7 D" ]' `$ k: x
travel to pickaisle.con(A_i)
0 U: q' L2 I9 }6 N) W9 w, J8 W1 G if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
7 J: J2 S: f7 n7 B! E: W else wait for 10 sec
- \5 o0 V) N) u( q' Q# W if A_i=A_leave then send to die/ J! G; b/ s# P: n* \1 i
else inc A_i by 11 f3 ?& I3 ]- @
end
2 i" K& J9 J2 s# H7 zend( k4 `+ L$ p- O1 M& p3 J* K
' D! Q+ ^3 T5 g+ O* i$ V
begin P_pick2 arriving
1 c' C3 @" U9 A" { set A_i to 11
; Q- I! n3 E5 ~5 K1 r5 G7 B5 V move into Q_induct29 w& q. r @( i$ p T
move into pickaisle.induct2
: s& s& x. O- X* ? while A_i<=30 do begin' I: c& b v3 E/ c9 {
travel to pickaisle.con(A_i)7 p) N( Z7 d/ I3 ?; N
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec" G! E( V, s' \! B+ O
else wait for 10 sec
1 {0 G7 }7 w6 @# Q if A_i=A_leave then send to die2 A7 ]* `- U% l. r4 E8 t
else inc A_i by 1( R, i% F3 {" r
end% P5 E H; t, V- k
end
7 \1 h; Z/ T$ b C& c4 U, P" F
9 k( I O0 H( e- R( a3 v& K: j ^begin P_pick3 arriving
/ Q9 [, I! h, h# v; E: T6 L set A_i to 21+ v; b, w9 B3 L; k5 z
move into Q_induct3. f" M( A; P9 I4 V: P6 {" [) {$ S
move into pickaisle.induct3
9 h4 t" G+ B2 t; C z& M! _ while A_i<=30 do begin- S, n6 B8 u9 L3 g3 g( T% \
travel to pickaisle.con(A_i)9 u/ ]4 |, w! J+ g2 i. j h4 E
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec3 j8 d1 _+ p* J: B2 l
else wait for 10 sec
1 a2 e0 m; p1 |% b- L if A_i=A_leave then send to die
, b* i* q1 L3 n9 G else inc A_i by 1) z. u# N% z$ ^, |. @( d; o
end
0 X1 O& e- |4 T5 q3 D9 _1 [, Q% 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,其它按你的 ...
|