|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢+ b, X) V. L* L, w7 \% {" [. ]
4 @* V+ F4 R1 l5 l我的问题是,在每个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中的数值,不知道会不会有什么不妥。( X6 \7 T! _. }7 j
3 d4 p7 b' y7 n& [3 g) x
begin P_read arriving7 c+ {) [2 Z4 ]( r; ]! q% s
while 1=1 do begin
* M8 Z; {' K3 b% _; i read A_tote from "data.txt" with delimiter "\n"
; S1 B+ Q0 o# j, C' ^9 |: b read A_time from "data.txt" with delimiter "\n"
, I! R- _" B6 p/ |8 V read A_leave from "data.txt" with delimiter "\n"/ O: U n1 w( C* j" j$ d1 ?; l0 S
read A_picks from "data.txt" with delimiter "\n") a. }7 Z m! T, K. A
set load type to A_tote
7 W7 D5 x7 Q( T% X2 Y W if A_tote="tote 1" then set A_induct to 1$ G3 B/ X: ^6 C' i( M1 f
else if A_tote="tote 2" then set A_induct to 2% r3 p3 v( A/ X) I! b) e$ K
else set A_induct to 3
7 n% y9 j3 w0 j6 n set A_i to 00 s4 t; R& P( c$ j; n: ~
clone 1 load to P_induction
# {+ F( a( e+ X8 Z' k+ | wait for A_time sec
/ y% G* Q: P: s0 B+ k end
8 w) L; m" q1 y: pend. n* ^+ A1 C: L; H3 Z J
9 Q2 G- W: T- j6 m2 cbegin P_induction arriving2 V2 t8 w* j% v; _" E G, f7 S
if A_induct=1 then clone 1 load to P_pick1
! ^ L5 V. g/ ]( U% J else if A_induct=2 then clone 1 load to P_pick2' `8 h/ b5 a7 p, ^1 L
else clone 1 load to P_pick3
l' Q$ [* U8 Mend
_% N5 P; Q4 v% t, h0 F/ G7 c* \9 s
! g" w& H$ y- g# w( h) qbegin P_pick1 arriving
0 K0 b' F$ }7 _/ E4 j set A_i to 1
' d. W! w; c0 r9 o2 f move into Q_induct1
* k; |8 \) k+ i7 Y move into pickaisle.induct1
* r, U9 r: w5 p while A_i<=30 do begin
5 p. H- J0 b0 [9 u9 }5 X travel to pickaisle.con(A_i)6 V9 x& T* \! l6 r& a
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
* \' U1 _' P1 W# q% _) A- I# `- j else wait for 10 sec( T- I& P: P' q) W
if A_i=A_leave then send to die7 m4 H7 l7 P/ \+ w# r! s# p
else inc A_i by 13 |/ \# U2 a0 p" V J# D) F( F
end
+ K$ P0 R- B% w4 l+ T) \end, f. _& S3 R0 N6 ^) A8 @3 B$ C
! V9 ?! y. Q1 h
begin P_pick2 arriving E6 r0 R6 g7 a k) a0 _2 G5 d- t
set A_i to 112 h$ W) R* k$ h0 A4 O+ m
move into Q_induct2
& | ^) F; m! h* \$ \ move into pickaisle.induct23 f# { J1 B0 j* a. K
while A_i<=30 do begin( n3 c C& {" V9 [* h: x7 ]
travel to pickaisle.con(A_i)
: H7 x4 x; g) U& [8 W" ?. N if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
, O2 W! J5 e" U$ u, v else wait for 10 sec
: g: s, ~, h# D* _1 @ if A_i=A_leave then send to die3 } \: y6 |3 S. c- y4 B1 u% R
else inc A_i by 10 d* Q6 Q$ I% T8 j+ _' k
end$ ^$ J' }, a6 S# \' J
end: U# y1 J) K* D4 }" @. D
& |/ L/ `$ R& m
begin P_pick3 arriving) t9 t' }6 d8 |( o6 s- {
set A_i to 21
2 L; d3 F2 C2 Z- Q7 W" _8 O, k move into Q_induct3
& `6 i( S% r% A. O4 J; X move into pickaisle.induct3
; q! ]6 S1 L0 J while A_i<=30 do begin3 N; I, i7 b" q" ^2 @5 r
travel to pickaisle.con(A_i)4 L) Y5 A! X4 L! S' F, V
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec1 m$ O) ^; p5 d, Q8 I
else wait for 10 sec
4 c( h" i; o4 X2 e/ b if A_i=A_leave then send to die- s G4 T2 `- \7 q6 s
else inc A_i by 17 i. e/ w) ~( A
end
\- X5 [: {" G/ z) Yend |
最佳答案
查看完整内容
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,其它按你的 ...
|