|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢
. K8 H a$ t0 [ j3 j% {, p3 r6 z$ [7 i' E) i7 a" y" V2 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中的数值,不知道会不会有什么不妥。 P! \7 k/ y5 r8 \# Z3 s. i) T& e
8 y3 b! u: P% |* X6 V# Z
begin P_read arriving
- U6 {" H3 b& J% Z while 1=1 do begin
6 m# n& H. q p3 _8 Q read A_tote from "data.txt" with delimiter "\n"( V7 G( c/ q. d( ~$ N1 j* C% D
read A_time from "data.txt" with delimiter "\n"
. C3 ]/ Q5 T$ g" f) {! G; t read A_leave from "data.txt" with delimiter "\n"3 U2 ]" e1 H! F8 n1 ^# E) t0 {6 n, z
read A_picks from "data.txt" with delimiter "\n": {# b! P. c& k9 ]' W5 e$ K
set load type to A_tote' `* R% ?! Q3 d2 ?4 l9 C4 |
if A_tote="tote 1" then set A_induct to 16 `2 z" Z* U' K/ t* [2 o5 _
else if A_tote="tote 2" then set A_induct to 2
6 ]/ u& W5 P4 V" ` else set A_induct to 3 6 M+ r5 F# j' ^5 M) a7 F
set A_i to 01 l" V! H1 i0 k$ G) d# l7 i1 L
clone 1 load to P_induction$ ]- n& e7 B1 l9 @
wait for A_time sec9 q9 Q+ r, N; |6 p. a2 u3 m+ b
end; |# Y+ g8 `% D+ d& j" v
end
0 ]' @$ \8 H' @& _4 I7 `, }( N7 ^5 A* K0 C' l# Q5 Z
begin P_induction arriving
' f% z& {( ?" o" _; K if A_induct=1 then clone 1 load to P_pick1- o4 |" c( Z. U, {1 `
else if A_induct=2 then clone 1 load to P_pick2
6 g" k4 k* ~1 a8 A, i) y1 l& ` else clone 1 load to P_pick3
6 f* V% z9 u4 Z! {0 u% Nend- u& U" J) h1 e
& L2 v5 W, |0 `( q" l* H6 X n
begin P_pick1 arriving
, A+ n8 M$ k, |4 J set A_i to 1* u. d- d$ L) E/ H3 g) e0 P
move into Q_induct1
5 C9 r Q& I9 @" h8 w/ ^9 U move into pickaisle.induct1
; z2 h5 G# y# Y/ r N8 Q while A_i<=30 do begin
/ {. C6 D& f7 o$ Y8 w" f travel to pickaisle.con(A_i)8 g$ Z: S4 Y: p' [; u% B
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
# o% V: T6 E7 b& v" G else wait for 10 sec
2 b2 [6 V! Y" ^- @/ N if A_i=A_leave then send to die
8 V7 o- v; r- H* X else inc A_i by 15 ?0 L- f% C5 p
end) j! _( [7 G% ]% g( {) Q$ H
end
- a, _1 H" _9 _: w. J* n/ w* P1 E& |, h X, O6 |( `% W: Q- \$ c$ f
begin P_pick2 arriving
1 F% S# @! d1 T$ V2 A+ H# y8 u1 R set A_i to 11( O; H6 }0 K8 F; L Q
move into Q_induct2/ R! c+ I- B# [( l+ p' e; o
move into pickaisle.induct2. ?5 G: r' y2 P$ X8 p$ n
while A_i<=30 do begin8 U/ j1 m2 n: U
travel to pickaisle.con(A_i)) y. _8 m3 w# g- R6 m9 g5 o: W
if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 F# N/ O5 e) L# L3 w7 `5 G else wait for 10 sec' K8 l* V: P3 l/ V: V
if A_i=A_leave then send to die
7 L K6 b& A" O, @8 X* \ else inc A_i by 15 G, n2 ^# |+ l
end
. _: A$ ` m: Eend$ R! C% o! s2 f1 n$ y
8 Q: L8 D! T: e( y& y( q" Z4 {
begin P_pick3 arriving+ w/ a8 m: x4 t
set A_i to 219 n; v- l" m$ C0 I; A! A; p
move into Q_induct3% f+ u! B% p) h+ l8 v4 l$ h2 u
move into pickaisle.induct3. l0 T- W( b; c6 V$ H, X
while A_i<=30 do begin
& ]3 k2 m& f1 }# f1 Y/ `. v% t5 j travel to pickaisle.con(A_i)
0 s* r( W! N8 R0 x, `5 | if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
H$ n- o; E% J! C! q% V else wait for 10 sec
9 s+ R! {: m( |) u' ^1 t; }1 ~& ? if A_i=A_leave then send to die& }- Y0 G6 l9 ~6 E- {4 d2 F
else inc A_i by 1
# G, }& ]. i5 S+ |% K/ e x end
* b; p0 S6 L O2 f y' {: send |
最佳答案
查看完整内容
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,其它按你的 ...
|