|
|
5仿真币
想请版上的人帮我看看我这段code中的一个错误,我刚学Automod没多久,实在找不出错在什么地方了,谢谢( L9 ^, [$ p+ f
1 M q, O$ ^+ z7 q7 c
我的问题是,在每个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中的数值,不知道会不会有什么不妥。
: ~1 s+ H1 E4 ^
. p3 x( c0 {, Q; \4 d; Xbegin P_read arriving2 w# a2 y& A& A/ g3 z1 ?
while 1=1 do begin2 d7 h' Q4 i* K6 B' [9 E
read A_tote from "data.txt" with delimiter "\n"
, a; S0 u+ e7 v. q1 S3 r4 ` read A_time from "data.txt" with delimiter "\n"
$ z" z! z) x+ q6 E: k9 {- j read A_leave from "data.txt" with delimiter "\n"8 S# ^9 W$ P! F6 v/ H: v8 p
read A_picks from "data.txt" with delimiter "\n"
) i' J* \9 i! `% }" C3 b _' z set load type to A_tote
& |3 b5 I+ k& P6 Q: c3 {( K if A_tote="tote 1" then set A_induct to 1
+ G8 Q$ U# L" u else if A_tote="tote 2" then set A_induct to 20 |; h. n5 v1 S' \% g5 c0 P) l% \$ [8 U/ }
else set A_induct to 3
0 R) g z( d7 ?- R set A_i to 0
' l# d8 _) Y- O5 f" { clone 1 load to P_induction; U4 _& C/ H! }4 ?; b7 Y
wait for A_time sec
9 v6 R" ~: \+ j$ \ end0 O+ i2 |& w( N
end: D3 ^5 q9 e/ {# f
$ N# E; Y5 }6 }( W9 H- ?' ?
begin P_induction arriving
/ Z) R$ n5 \9 }: X" c if A_induct=1 then clone 1 load to P_pick1
9 z, v& S# t( o4 A6 n else if A_induct=2 then clone 1 load to P_pick25 z( B. C3 N; O4 {: y( u5 \9 N
else clone 1 load to P_pick3
4 D1 u" D$ J2 p/ V- H/ o1 t Mend
" Z$ B% ]/ l4 J; ]1 R* K: t( g4 r6 L( H: R0 V# H+ O& S
begin P_pick1 arriving' E$ Z# W+ g% g# }4 g' w
set A_i to 1
/ q* O& X1 s6 M; [$ ] move into Q_induct1# z f) E8 e2 ~
move into pickaisle.induct1
' @4 l6 M) r( a4 J3 z9 y: @* A while A_i<=30 do begin
. E1 U& L: n0 K( h3 x9 m travel to pickaisle.con(A_i)
/ |7 Y1 ]8 m( `; a if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
. Y6 `6 B8 K8 T else wait for 10 sec& Z/ w# Y0 |9 [" K
if A_i=A_leave then send to die% F; q6 F/ d& c' R
else inc A_i by 1
4 u8 s; Q- @$ D end- O% M5 h8 L1 J3 ~6 [9 V
end& i, D2 ]* u% ^4 W, i
. t5 a9 h. z, t0 y* z. Rbegin P_pick2 arriving
2 U1 K z- [, l5 V( b. m( J" T set A_i to 11* S/ _5 ?5 T3 }2 H; y3 M6 B
move into Q_induct2
2 n# T$ k: c" G0 Q: j move into pickaisle.induct2
' E, }2 v8 b6 ], v" t while A_i<=30 do begin2 L$ F/ }2 W( H8 I
travel to pickaisle.con(A_i)
0 @6 c* Q/ a2 a; C if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec
3 ]) [. T# @2 f' o else wait for 10 sec7 K% l* o0 q/ w. _5 D6 h; l% c
if A_i=A_leave then send to die
# Q+ c0 m$ Z! l: I! P else inc A_i by 1+ [2 `) X7 F1 Z% \. R# H
end& r/ o/ D3 m+ N; u: z
end
5 F$ f; Y5 E4 Q9 a: C( Q6 B* Q/ H/ f- ~- d2 o
begin P_pick3 arriving6 L; S" ?3 C9 w8 ^
set A_i to 21
8 J8 z6 f& G- a6 D; n1 ]) m move into Q_induct3# h% b0 Q. n: k. q
move into pickaisle.induct31 K+ o$ l/ I6 V7 K* g5 E1 y
while A_i<=30 do begin2 _" N/ k: ]! k3 j$ ~0 l& f
travel to pickaisle.con(A_i)
7 @4 _3 G5 C0 {0 ~; \7 @ if A_picks(A_i)<5 then wait for 5*A_picks(A_i) sec2 R+ K, H8 G- _# y
else wait for 10 sec/ E0 ^) `2 B- M* X+ [& z
if A_i=A_leave then send to die
% A9 z0 ^$ s& d0 s% [ else inc A_i by 1
8 v: }; l& x8 H end4 a# o0 j! _( k4 V ^/ h
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,其它按你的 ...
|